Completed
Branch master (5990e5)
by Christophe
06:03
created
GoogleCharts/Chart.php 2 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace CMEN\GoogleChartsBundle\GoogleCharts;
4 4
 
5
-use CMEN\GoogleChartsBundle\Exception\GoogleChartsException;
6
-use CMEN\GoogleChartsBundle\GoogleCharts\Charts\Diff\DiffChart;
5
+use CMEN\GoogleChartsBundle\Exception\GoogleChartsException;
6
+use CMEN\GoogleChartsBundle\GoogleCharts\Charts\Diff\DiffChart;
7 7
 use CMEN\GoogleChartsBundle\GoogleCharts\Options\ChartOptionsDraw;
8 8
 
9 9
 /**
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function getName()
48 48
     {
49
-        return 'chart' . ucfirst($this->elementID);
49
+        return 'chart'.ucfirst($this->elementID);
50 50
     }
51 51
 
52 52
     /**
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function getDataName()
58 58
     {
59
-        return 'data'. ucfirst($this->getName());
59
+        return 'data'.ucfirst($this->getName());
60 60
     }
61 61
 
62 62
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function getOptionsName()
68 68
     {
69
-        return 'options'. ucfirst($this->getName());
69
+        return 'options'.ucfirst($this->getName());
70 70
     }
71 71
 
72 72
     /**
@@ -117,18 +117,18 @@  discard block
 block discarded – undo
117 117
             throw new GoogleChartsException('Container is not defined.');
118 118
         }
119 119
 
120
-        $js = 'var ' . $this->getName() . ' = new google.' . $this->getLibrary() . '.' . $this->getType() .
121
-            '(document.getElementById("' . $this->elementID . '"));';
120
+        $js = 'var '.$this->getName().' = new google.'.$this->getLibrary().'.'.$this->getType().
121
+            '(document.getElementById("'.$this->elementID.'"));';
122 122
 
123 123
         if (!$this instanceof DiffChart) {
124 124
             $js .= $this->data->draw($this->getDataName());
125 125
 
126 126
         } else {
127
-            $js .= $this->getOldChart()->getData()->draw('old_' . $this->getDataName()) .
128
-                $this->getNewChart()->getData()->draw('new_' . $this->getDataName()) .
129
-                'var ' . $this->getDataName() . ' = ' . $this->getName() .
130
-                    '.computeDiff(old_' . $this->getDataName() . ',
131
-                 new_' . $this->getDataName() . ');';
127
+            $js .= $this->getOldChart()->getData()->draw('old_'.$this->getDataName()).
128
+                $this->getNewChart()->getData()->draw('new_'.$this->getDataName()).
129
+                'var '.$this->getDataName().' = '.$this->getName().
130
+                    '.computeDiff(old_'.$this->getDataName().',
131
+                 new_' . $this->getDataName().');';
132 132
         }
133 133
 
134 134
         $js .= $this->options->draw($this->getOptionsName());
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function endDraw()
145 145
     {
146
-        return $this->events->draw(). $this->getName() .
147
-            '.draw('. $this->getDataName() . ', '. $this->getOptionsName() .');';
146
+        return $this->events->draw().$this->getName().
147
+            '.draw('.$this->getDataName().', '.$this->getOptionsName().');';
148 148
     }
149 149
 
150 150
     /**
Please login to merge, or discard this patch.
GoogleCharts/Charts/Diff/DiffBarChart.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     }
60 60
 
61 61
     /**
62
-     * @return BarChart|ColumnChart
62
+     * @return BarChart
63 63
      */
64 64
     public function getOldChart()
65 65
     {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     }
68 68
 
69 69
     /**
70
-     * @return BarChart|ColumnChart
70
+     * @return BarChart
71 71
      */
72 72
     public function getNewChart()
73 73
     {
Please login to merge, or discard this patch.
GoogleCharts/Charts/Diff/DiffColumnChart.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     }
58 58
 
59 59
     /**
60
-     * @return BarChart|ColumnChart
60
+     * @return BarChart
61 61
      */
62 62
     public function getOldChart()
63 63
     {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     }
66 66
 
67 67
     /**
68
-     * @return BarChart|ColumnChart
68
+     * @return BarChart
69 69
      */
70 70
     public function getNewChart()
71 71
     {
Please login to merge, or discard this patch.
GoogleCharts/Charts/OrgChart.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
     /**
66 66
      * @param $options OrgChartOptions
67 67
      *
68
-     * @return Map
68
+     * @return OrgChart
69 69
      */
70 70
     public function setOptions($options)
71 71
     {
Please login to merge, or discard this patch.
GoogleCharts/Data.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@
 block discarded – undo
55 55
             $lastKeyValue = key($row);
56 56
             foreach ($row as $key => $value) {
57 57
                 if ($value instanceof \DateTime) {
58
-                    $js .= 'new Date(' . $value->format('Y') . ', ' . ($value->format('n')-1) . ', ' .
59
-                        $value->format('d') . ')';
58
+                    $js .= 'new Date('.$value->format('Y').', '.($value->format('n')-1).', '.
59
+                        $value->format('d').')';
60 60
                 } else {
61 61
                     $js .= json_encode($value);
62 62
                 }
Please login to merge, or discard this patch.
GoogleCharts/Events.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
         $js = '';
47 47
 
48 48
         foreach ($this->listeners as $listener) {
49
-            $js .= "google.visualization.events.addListener(" . $this->chart->getName() . ", '" . $listener->getType() .
50
-                "', " . $listener->getFunction() . ");";
49
+            $js .= "google.visualization.events.addListener(".$this->chart->getName().", '".$listener->getType().
50
+                "', ".$listener->getFunction().");";
51 51
         }
52 52
 
53 53
         return $js;
Please login to merge, or discard this patch.
GoogleCharts/Options/AnnotationChart/AnnotationChartOptions.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,6 @@
 block discarded – undo
210 210
      *   over each series will display its true value.
211 211
      * - 'allfixed' - Same as 'fixed,' but used when multiple scales are displayed. This setting adjusts each scale
212 212
      *   to the series to which it applies (use this in conjunction with scaleColumns).
213
-
214 213
      * If you specify the min and/or max options, they will take precedence over the minimum and maximum values
215 214
      * determined by your scale type.
216 215
      *
Please login to merge, or discard this patch.
GoogleCharts/Options/ChartOptionsDraw.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,6 +40,6 @@
 block discarded – undo
40 40
 
41 41
         $options = $this->optionsFormat->renameRecursivelyKeys($options);
42 42
 
43
-        return "var $optionsName = " . json_encode($options) . ";\n";
43
+        return "var $optionsName = ".json_encode($options).";\n";
44 44
     }
45 45
 }
Please login to merge, or discard this patch.
GoogleCharts/Options/GeoChart/GeoChartOptions.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,6 @@
 block discarded – undo
95 95
      *    - A country, specified by its ISO 3166-1 alpha-2 code, e.g., 'AU' for Australia.
96 96
      *    - A state in the United States, specified by its ISO 3166-2:US code, e.g., 'US-AL' for Alabama. Note that
97 97
      *      the resolution option must be set to either 'provinces' or 'metros'.
98
-
99 98
      * @var string
100 99
      */
101 100
     protected $region;
Please login to merge, or discard this patch.