@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | */ |
8 | 8 | return [ |
9 | 9 | // Retrieve list of modules used in this application. |
10 | - 'modules' => require __DIR__ . '/modules.config.php', |
|
10 | + 'modules' => require __DIR__.'/modules.config.php', |
|
11 | 11 | |
12 | 12 | // These are various options for the listeners attached to the ModuleManager |
13 | 13 | 'module_listener_options' => [ |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | // modules are loaded. These effectively override configuration |
25 | 25 | // provided by modules themselves. Paths may use GLOB_BRACE notation. |
26 | 26 | 'config_glob_paths' => [ |
27 | - realpath(__DIR__) . '/autoload/{{,*.}global,{,*.}local}.php', |
|
27 | + realpath(__DIR__).'/autoload/{{,*.}global,{,*.}local}.php', |
|
28 | 28 | ], |
29 | 29 | |
30 | 30 | // Whether or not to enable a configuration cache. |
@@ -11,7 +11,7 @@ |
||
11 | 11 | ], |
12 | 12 | // Configuration overrides during development mode |
13 | 13 | 'module_listener_options' => [ |
14 | - 'config_glob_paths' => [realpath(__DIR__) . '/autoload/{,*.}{global,local}-development.php'], |
|
14 | + 'config_glob_paths' => [realpath(__DIR__).'/autoload/{,*.}{global,local}-development.php'], |
|
15 | 15 | 'config_cache_enabled' => false, |
16 | 16 | 'module_map_cache_enabled' => false, |
17 | 17 | ], |
@@ -13,6 +13,6 @@ |
||
13 | 13 | |
14 | 14 | public function getConfig() |
15 | 15 | { |
16 | - return include __DIR__ . '/../config/module.config.php'; |
|
16 | + return include __DIR__.'/../config/module.config.php'; |
|
17 | 17 | } |
18 | 18 | } |
@@ -50,13 +50,13 @@ |
||
50 | 50 | 'not_found_template' => 'error/404', |
51 | 51 | 'exception_template' => 'error/index', |
52 | 52 | 'template_map' => [ |
53 | - 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', |
|
54 | - 'application/index/index' => __DIR__ . '/../view/application/index/index.phtml', |
|
55 | - 'error/404' => __DIR__ . '/../view/error/404.phtml', |
|
56 | - 'error/index' => __DIR__ . '/../view/error/index.phtml', |
|
53 | + 'layout/layout' => __DIR__.'/../view/layout/layout.phtml', |
|
54 | + 'application/index/index' => __DIR__.'/../view/application/index/index.phtml', |
|
55 | + 'error/404' => __DIR__.'/../view/error/404.phtml', |
|
56 | + 'error/index' => __DIR__.'/../view/error/index.phtml', |
|
57 | 57 | ], |
58 | 58 | 'template_path_stack' => [ |
59 | - __DIR__ . '/../view', |
|
59 | + __DIR__.'/../view', |
|
60 | 60 | ], |
61 | 61 | ], |
62 | 62 | ]; |
@@ -22,7 +22,7 @@ |
||
22 | 22 | $configOverrides = []; |
23 | 23 | |
24 | 24 | $this->setApplicationConfig(ArrayUtils::merge( |
25 | - include __DIR__ . '/../../../../config/application.config.php', |
|
25 | + include __DIR__.'/../../../../config/application.config.php', |
|
26 | 26 | $configOverrides |
27 | 27 | )); |
28 | 28 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | { |
27 | 27 | $params = $this->params()->fromRoute(); |
28 | 28 | |
29 | - $indicador_id = (int)$params['indicador_id']; |
|
29 | + $indicador_id = (int) $params['indicador_id']; |
|
30 | 30 | |
31 | 31 | $response = []; |
32 | 32 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | { |
30 | 30 | $params = $this->params()->fromRoute(); |
31 | 31 | |
32 | - $ano = (int)$params['ano']; |
|
32 | + $ano = (int) $params['ano']; |
|
33 | 33 | |
34 | 34 | $response = []; |
35 | 35 | |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | $response = []; |
76 | 76 | $arrGraphData = []; |
77 | 77 | |
78 | - $ano = (int)$params['ano']; |
|
79 | - $sector_id = (int)$params['sector_id']; |
|
78 | + $ano = (int) $params['ano']; |
|
79 | + $sector_id = (int) $params['sector_id']; |
|
80 | 80 | |
81 | 81 | $sql = 'SELECT SUM(e.valor) as total, a.id, a.nombre |
82 | 82 | FROM emision e |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | { |
229 | 229 | $params = $this->params()->fromRoute(); |
230 | 230 | |
231 | - $ano = (int)$params['ano']; |
|
231 | + $ano = (int) $params['ano']; |
|
232 | 232 | |
233 | 233 | $response = []; |
234 | 234 | |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | { |
261 | 261 | $params = $this->params()->fromRoute(); |
262 | 262 | |
263 | - $ano = (int)$params['ano']; |
|
263 | + $ano = (int) $params['ano']; |
|
264 | 264 | |
265 | 265 | $response = []; |
266 | 266 |
@@ -224,37 +224,37 @@ |
||
224 | 224 | /** |
225 | 225 | * |
226 | 226 | */ |
227 | - public function getGasesDistributionAction() |
|
228 | - { |
|
229 | - $params = $this->params()->fromRoute(); |
|
227 | + public function getGasesDistributionAction() |
|
228 | + { |
|
229 | + $params = $this->params()->fromRoute(); |
|
230 | 230 | |
231 | - $ano = (int)$params['ano']; |
|
231 | + $ano = (int)$params['ano']; |
|
232 | 232 | |
233 | - $response = []; |
|
233 | + $response = []; |
|
234 | 234 | |
235 | - $sql = 'SELECT e.gas_id, g.nombre, g.color, sum(e.valor) as total |
|
235 | + $sql = 'SELECT e.gas_id, g.nombre, g.color, sum(e.valor) as total |
|
236 | 236 | FROM emision e |
237 | 237 | LEFT JOIN gas g ON (e.gas_id = g.id) |
238 | 238 | where e.ano = ? GROUP BY e.gas_id ORDER BY total DESC'; |
239 | 239 | |
240 | - $parameters = [ |
|
240 | + $parameters = [ |
|
241 | 241 | $ano, |
242 | 242 | ]; |
243 | 243 | |
244 | - $statement = $this->db->createStatement($sql, $parameters); |
|
244 | + $statement = $this->db->createStatement($sql, $parameters); |
|
245 | 245 | |
246 | - $results = $statement->execute(); |
|
246 | + $results = $statement->execute(); |
|
247 | 247 | |
248 | - $response['gases'][] = 'x'; |
|
249 | - $response['valores'][] = 'Gases'; |
|
248 | + $response['gases'][] = 'x'; |
|
249 | + $response['valores'][] = 'Gases'; |
|
250 | 250 | |
251 | - while ($a = $results->next()) { |
|
252 | - $response['gases'][] = (strpos($a['nombre'], ',')) ? '"'.$a['nombre'].'"' : $a['nombre']; |
|
253 | - $response['valores'][] = round($a['total']); |
|
254 | - $response['colores'][] = $a['color']; |
|
255 | - } |
|
256 | - return new JsonModel($response); |
|
257 | - } |
|
251 | + while ($a = $results->next()) { |
|
252 | + $response['gases'][] = (strpos($a['nombre'], ',')) ? '"'.$a['nombre'].'"' : $a['nombre']; |
|
253 | + $response['valores'][] = round($a['total']); |
|
254 | + $response['colores'][] = $a['color']; |
|
255 | + } |
|
256 | + return new JsonModel($response); |
|
257 | + } |
|
258 | 258 | |
259 | 259 | public function getSectoralGasesDistributionAction() |
260 | 260 | { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $arrValores = []; |
58 | 58 | $arrColores = []; |
59 | 59 | |
60 | - for ($i=1990;$i<=2014;$i++) { |
|
60 | + for ($i = 1990; $i <= 2014; $i++) { |
|
61 | 61 | $arrAnos[] = $i; |
62 | 62 | } |
63 | 63 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | while ($sector = $arrSectores->next()) { |
67 | 67 | $response['column_'.$column][] = $sector['nombre']; |
68 | - $response['colores'][] = $sector['color']; |
|
68 | + $response['colores'][] = $sector['color']; |
|
69 | 69 | |
70 | 70 | foreach ($arrAnos as $ano) { |
71 | 71 | // ATENCION, CABECEADA |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | { |
98 | 98 | $params = $this->params()->fromRoute(); |
99 | 99 | |
100 | - $sector_id = (int)$params['sector_id']; |
|
100 | + $sector_id = (int) $params['sector_id']; |
|
101 | 101 | |
102 | 102 | $response = []; |
103 | 103 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $arrValores = []; |
136 | 136 | $arrColores = []; |
137 | 137 | |
138 | - for ($i=1990;$i<=2014;$i++) { |
|
138 | + for ($i = 1990; $i <= 2014; $i++) { |
|
139 | 139 | $arrAnos[] = $i; |
140 | 140 | } |
141 | 141 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | |
144 | 144 | while ($sector = $arrSectores->next()) { |
145 | 145 | $response['column_'.$column][] = $sector['nombre']; |
146 | - $response['colores'][] = $sector['color']; |
|
146 | + $response['colores'][] = $sector['color']; |
|
147 | 147 | |
148 | 148 | foreach ($arrAnos as $ano) { |
149 | 149 | // ATENCION, CABECEADA |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | { |
177 | 177 | $params = $this->params()->fromRoute(); |
178 | 178 | |
179 | - $sector_id = (int)$params['sector_id']; |
|
179 | + $sector_id = (int) $params['sector_id']; |
|
180 | 180 | |
181 | 181 | $response = []; |
182 | 182 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $arrValores = []; |
221 | 221 | $arrColores = []; |
222 | 222 | |
223 | - for ($i=1990;$i<=2014;$i++) { |
|
223 | + for ($i = 1990; $i <= 2014; $i++) { |
|
224 | 224 | $arrAnos[] = $i; |
225 | 225 | } |
226 | 226 | |
@@ -263,8 +263,8 @@ discard block |
||
263 | 263 | { |
264 | 264 | $params = $this->params()->fromRoute(); |
265 | 265 | |
266 | - $sector_id = (int)$params['sector_id']; |
|
267 | - $subactividad_id = (int)$params['subactividad_id']; |
|
266 | + $sector_id = (int) $params['sector_id']; |
|
267 | + $subactividad_id = (int) $params['subactividad_id']; |
|
268 | 268 | |
269 | 269 | $response = []; |
270 | 270 | |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | $arrColores = array(); |
315 | 315 | |
316 | 316 | |
317 | - for ($i=1990;$i<=2014;$i++) { |
|
317 | + for ($i = 1990; $i <= 2014; $i++) { |
|
318 | 318 | $arrAnos[] = $i; |
319 | 319 | } |
320 | 320 |
@@ -13,6 +13,6 @@ |
||
13 | 13 | |
14 | 14 | public function getConfig() |
15 | 15 | { |
16 | - return include __DIR__ . '/../config/module.config.php'; |
|
16 | + return include __DIR__.'/../config/module.config.php'; |
|
17 | 17 | } |
18 | 18 | } |