| @@ -59,7 +59,7 @@ | ||
| 59 | 59 | }'; | 
| 60 | 60 | |
| 61 | 61 | $view = $this->getView(); | 
| 62 | -        $view->registerJsFile('https://www.google.com/jsapi',['position' => View::POS_HEAD]); | |
| 62 | +        $view->registerJsFile('https://www.google.com/jsapi', ['position' => View::POS_HEAD]); | |
| 63 | 63 |          $view->registerJs('google.load("visualization", "' . $this->loadVersion . '", {packages:["' . $this->packages . '"]});', View::POS_HEAD, __CLASS__ . '#' . $id); | 
| 64 | 64 | $view->registerJs($script, View::POS_HEAD, $id); | 
| 65 | 65 | } | 
| @@ -5,5 +5,5 @@ | ||
| 5 | 5 | |
| 6 | 6 | class ChartPizza extends GoogleChart | 
| 7 | 7 |  { | 
| 8 | - public $visualization = 'PieChart'; | |
| 8 | + public $visualization = 'PieChart'; | |
| 9 | 9 | } | 
| 10 | 10 | \ No newline at end of file | 
| @@ -5,5 +5,5 @@ | ||
| 5 | 5 | |
| 6 | 6 | class ChartPie extends GoogleChart | 
| 7 | 7 |  { | 
| 8 | - public $visualization = 'PieChart'; | |
| 8 | + public $visualization = 'PieChart'; | |
| 9 | 9 | } | 
| 10 | 10 | \ No newline at end of file | 
| @@ -5,5 +5,5 @@ | ||
| 5 | 5 | |
| 6 | 6 | class ChartColumn extends GoogleChart | 
| 7 | 7 |  { | 
| 8 | - public $visualization = 'ColumnChart'; | |
| 8 | + public $visualization = 'ColumnChart'; | |
| 9 | 9 | } | 
| @@ -49,16 +49,16 @@ | ||
| 49 | 49 | protected function getData() | 
| 50 | 50 |      { | 
| 51 | 51 | // adapter as title as optional | 
| 52 | - $data = array($this->title? ['label_0', $this->title]: ['label_0']); | |
| 52 | + $data = array($this->title ? ['label_0', $this->title] : ['label_0']); | |
| 53 | 53 | |
| 54 | -        foreach($this->dataProvider->models as $key => $model){ | |
| 54 | +        foreach ($this->dataProvider->models as $key => $model) { | |
| 55 | 55 | // name column | 
| 56 | 56 | $data [$key + 1] = [strip_tags(array_shift($model))]; | 
| 57 | 57 | // values columns | 
| 58 | -            foreach($model as $attribute => $value) { | |
| 58 | +            foreach ($model as $attribute => $value) { | |
| 59 | 59 | $data[$key + 1][] = $value; | 
| 60 | 60 | // add columns legends | 
| 61 | -                if(count($data[0]) < count($data[$key + 1])) { | |
| 61 | +                if (count($data[0]) < count($data[$key + 1])) { | |
| 62 | 62 | $data[0][] = $attribute; | 
| 63 | 63 | } | 
| 64 | 64 | } | 
| @@ -5,5 +5,5 @@ | ||
| 5 | 5 | |
| 6 | 6 | class ChartArea extends GoogleChart | 
| 7 | 7 |  { | 
| 8 | - public $visualization = 'AreaChart'; | |
| 8 | + public $visualization = 'AreaChart'; | |
| 9 | 9 | } | 
| @@ -5,5 +5,5 @@ | ||
| 5 | 5 | |
| 6 | 6 | class ChartLine extends GoogleChart | 
| 7 | 7 |  { | 
| 8 | - public $visualization = 'LineChart'; | |
| 8 | + public $visualization = 'LineChart'; | |
| 9 | 9 | } |