PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 1.7.0
Visualizer – Tables & Charts Manager with Built-in AI Generator v1.7.0
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | classes/Visualizer/Module/Sources.php +9 -10 1.6.61.7.0 View file →
@@ -18,9 +18,8 @@
18 18 // | MA 02110-1301 USA |
19 19 // +----------------------------------------------------------------------+
20 20 // | Author: Eugene Manuilov <eugene@manuilov.org> |
21 21 // +----------------------------------------------------------------------+
22 -
23 22 /**
24 23 * Sources module class.
25 24 *
26 25 * @category Visualizer
@@ -66,18 +65,18 @@
66 65 * @param int $chart_id The chart id.
67 66 * @return Visualizer_Source The source object if source exists, otherwise FALSE.
68 67 */
69 68 private function _getSource( $chart_id ) {
70 - if ( !isset( $this->_sources[$chart_id] ) ) {
69 + if ( ! isset( $this->_sources[ $chart_id ] ) ) {
71 70 $class = get_post_meta( $chart_id, Visualizer_Plugin::CF_SOURCE, true );
72 - if ( !class_exists( $class, true ) ) {
71 + if ( ! class_exists( $class, true ) ) {
73 72 return false;
74 73 }
75 74
76 - $this->_sources[$chart_id] = new $class();
75 + $this->_sources[ $chart_id ] = new $class();
77 76 }
78 77
79 - return $this->_sources[$chart_id];
78 + return $this->_sources[ $chart_id ];
80 79 }
81 80
82 81 /**
83 82 * Filters chart sereis.
@@ -85,14 +84,14 @@
85 84 * @since 1.1.0
86 85 *
87 86 * @access public
88 87 * @param array $series The array of chart series.
89 - * @param int $chart_id The chart id.
88 + * @param int $chart_id The chart id.
90 89 * @return array The array of filtered series.
91 90 */
92 91 public function filterChartSeries( $series, $chart_id ) {
93 92 $source = $this->_getSource( $chart_id );
94 - if ( !$source ) {
93 + if ( ! $source ) {
95 94 return $series;
96 95 }
97 96
98 97 return $source->repopulateSeries( $series, $chart_id );
@@ -104,14 +103,14 @@
104 103 * @since 1.1.0
105 104 *
106 105 * @access public
107 106 * @param array $data The array of chart data.
108 - * @param int $chart_id The chart id.
107 + * @param int $chart_id The chart id.
109 108 * @return array The array of filtered data.
110 109 */
111 110 public function filterChartData( $data, $chart_id ) {
112 111 $source = $this->_getSource( $chart_id );
113 - if ( !$source ) {
112 + if ( ! $source ) {
114 113 return $data;
115 114 }
116 115
117 116 return $source->repopulateData( $data, $chart_id );
@@ -116,5 +115,5 @@
116 115
117 116 return $source->repopulateData( $data, $chart_id );
118 117 }
119 118
120 -}
119 +}