@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function getName() |
51 | 51 | { |
52 | - return 'chart' . ucfirst($this->elementID); |
|
52 | + return 'chart'.ucfirst($this->elementID); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function getDataName() |
61 | 61 | { |
62 | - return 'data' . ucfirst($this->getName()); |
|
62 | + return 'data'.ucfirst($this->getName()); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function getOptionsName() |
71 | 71 | { |
72 | - return 'options' . ucfirst($this->getName()); |
|
72 | + return 'options'.ucfirst($this->getName()); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -123,17 +123,17 @@ discard block |
||
123 | 123 | throw new GoogleChartsException('Container is not defined.'); |
124 | 124 | } |
125 | 125 | |
126 | - $js = 'var ' . $this->getName() . ' = new google.' . $this->getLibrary() . '.' . $this->getType() . |
|
127 | - '(document.getElementById("' . $this->elementID . '"));'; |
|
126 | + $js = 'var '.$this->getName().' = new google.'.$this->getLibrary().'.'.$this->getType(). |
|
127 | + '(document.getElementById("'.$this->elementID.'"));'; |
|
128 | 128 | |
129 | 129 | if (!$this instanceof DiffChart) { |
130 | 130 | $js .= $this->data->draw($this->getDataName()); |
131 | 131 | } else { |
132 | - $js .= $this->getOldChart()->getData()->draw('old_' . $this->getDataName()) . |
|
133 | - $this->getNewChart()->getData()->draw('new_' . $this->getDataName()) . |
|
134 | - 'var ' . $this->getDataName() . ' = ' . $this->getName() . |
|
135 | - '.computeDiff(old_' . $this->getDataName() . ', |
|
136 | - new_' . $this->getDataName() . ');'; |
|
132 | + $js .= $this->getOldChart()->getData()->draw('old_'.$this->getDataName()). |
|
133 | + $this->getNewChart()->getData()->draw('new_'.$this->getDataName()). |
|
134 | + 'var '.$this->getDataName().' = '.$this->getName(). |
|
135 | + '.computeDiff(old_'.$this->getDataName().', |
|
136 | + new_' . $this->getDataName().');'; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | $js .= $this->options->draw($this->getOptionsName()); |
@@ -152,12 +152,12 @@ discard block |
||
152 | 152 | $options = $this->getOptionsName(); |
153 | 153 | } else { |
154 | 154 | /* Options conversion for material charts */ |
155 | - $options = 'google.' . $this->getLibrary() . '.' . $this->getType() . |
|
156 | - '.convertOptions(' . $this->getOptionsName() . ')'; |
|
155 | + $options = 'google.'.$this->getLibrary().'.'.$this->getType(). |
|
156 | + '.convertOptions('.$this->getOptionsName().')'; |
|
157 | 157 | } |
158 | 158 | |
159 | - return $this->events->draw() . $this->getName() . |
|
160 | - '.draw(' . $this->getDataName() . ', ' . $options . ');'; |
|
159 | + return $this->events->draw().$this->getName(). |
|
160 | + '.draw('.$this->getDataName().', '.$options.');'; |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |