| @@ -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 | +} | |