@@ -94,8 +94,8 @@ discard block |
||
94 | 94 | $options = input()->get(); |
95 | 95 | |
96 | 96 | if (empty($options)) { |
97 | - $_GET[ 'host' ] = 'localhost'; |
|
98 | - $_GET[ 'port' ] = 8000; |
|
97 | + $_GET['host'] = 'localhost'; |
|
98 | + $_GET['port'] = 8000; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | parent::execute(); |
@@ -107,12 +107,12 @@ discard block |
||
107 | 107 | ->setNewLinesAfter(1) |
108 | 108 | ); |
109 | 109 | |
110 | - $_SERVER[ 'DOCUMENT_ROOT' ] = PATH_PUBLIC; |
|
110 | + $_SERVER['DOCUMENT_ROOT'] = PATH_PUBLIC; |
|
111 | 111 | |
112 | 112 | output()->write( |
113 | 113 | (new Format()) |
114 | 114 | ->setContextualClass(Format::INFO) |
115 | - ->setString(language()->getLine('CLI_SERVE_DOC_ROOT', [$_SERVER[ 'DOCUMENT_ROOT' ]])) |
|
115 | + ->setString(language()->getLine('CLI_SERVE_DOC_ROOT', [$_SERVER['DOCUMENT_ROOT']])) |
|
116 | 116 | ->setNewLinesAfter(1) |
117 | 117 | ); |
118 | 118 |
@@ -85,11 +85,11 @@ |
||
85 | 85 | $subNamespace |
86 | 86 | )) . '\\'; |
87 | 87 | |
88 | - $vars[ 'CREATE_DATETIME' ] = date('d/m/Y H:m'); |
|
89 | - $vars[ 'NAMESPACE' ] = trim($classNamespace, '\\'); |
|
90 | - $vars[ 'PACKAGE' ] = '\\' . trim($classNamespace, '\\'); |
|
91 | - $vars[ 'CLASS' ] = $className; |
|
92 | - $vars[ 'FILEPATH' ] = $filePath; |
|
88 | + $vars['CREATE_DATETIME'] = date('d/m/Y H:m'); |
|
89 | + $vars['NAMESPACE'] = trim($classNamespace, '\\'); |
|
90 | + $vars['PACKAGE'] = '\\' . trim($classNamespace, '\\'); |
|
91 | + $vars['CLASS'] = $className; |
|
92 | + $vars['FILEPATH'] = $filePath; |
|
93 | 93 | |
94 | 94 | $phpTemplate = <<<PHPTEMPLATE |
95 | 95 | <?php |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | public function optionName($name) |
40 | 40 | { |
41 | - if(empty($this->optionPath)) { |
|
41 | + if (empty($this->optionPath)) { |
|
42 | 42 | $this->optionPath = PATH_APP . 'Modules' . DIRECTORY_SEPARATOR; |
43 | 43 | } |
44 | 44 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | exit(EXIT_ERROR); |
86 | 86 | } |
87 | 87 | |
88 | - $jsProps[ 'name' ] = readable( |
|
88 | + $jsProps['name'] = readable( |
|
89 | 89 | pathinfo($modulePath, PATHINFO_FILENAME), |
90 | 90 | true |
91 | 91 | ); |
@@ -98,10 +98,10 @@ discard block |
||
98 | 98 | ) . '\\'; |
99 | 99 | } else { |
100 | 100 | $namespace = $this->namespace; |
101 | - $jsProps[ 'namespace' ] = rtrim($namespace, '\\') . '\\'; |
|
101 | + $jsProps['namespace'] = rtrim($namespace, '\\') . '\\'; |
|
102 | 102 | } |
103 | 103 | |
104 | - $jsProps[ 'created' ] = date('d M Y'); |
|
104 | + $jsProps['created'] = date('d M Y'); |
|
105 | 105 | |
106 | 106 | loader()->addNamespace($namespace, $modulePath); |
107 | 107 |
@@ -72,13 +72,13 @@ |
||
72 | 72 | exit(EXIT_ERROR); |
73 | 73 | } |
74 | 74 | |
75 | - $vars[ 'CREATE_DATETIME' ] = date('d/m/Y H:m'); |
|
76 | - $vars[ 'HELPER' ] = underscore( |
|
75 | + $vars['CREATE_DATETIME'] = date('d/m/Y H:m'); |
|
76 | + $vars['HELPER'] = underscore( |
|
77 | 77 | snakecase( |
78 | 78 | pathinfo($filePath, PATHINFO_FILENAME) |
79 | 79 | ) |
80 | 80 | ); |
81 | - $vars[ 'FILEPATH' ] = $filePath; |
|
81 | + $vars['FILEPATH'] = $filePath; |
|
82 | 82 | |
83 | 83 | $phpTemplate = <<<PHPTEMPLATE |
84 | 84 | <?php |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | exit(EXIT_ERROR); |
69 | 69 | } |
70 | 70 | |
71 | - $jsProps[ 'name' ] = readable( |
|
71 | + $jsProps['name'] = readable( |
|
72 | 72 | pathinfo($widgetPath, PATHINFO_FILENAME), |
73 | 73 | true |
74 | 74 | ); |
@@ -81,10 +81,10 @@ discard block |
||
81 | 81 | ) . '\\'; |
82 | 82 | } else { |
83 | 83 | $namespace = prepare_class_name($this->namespace); |
84 | - $jsProps[ 'namespace' ] = rtrim($namespace, '\\') . '\\'; |
|
84 | + $jsProps['namespace'] = rtrim($namespace, '\\') . '\\'; |
|
85 | 85 | } |
86 | 86 | |
87 | - $jsProps[ 'created' ] = date('d M Y'); |
|
87 | + $jsProps['created'] = date('d M Y'); |
|
88 | 88 | |
89 | 89 | loader()->addNamespace($namespace, $widgetPath); |
90 | 90 |
@@ -72,9 +72,9 @@ |
||
72 | 72 | exit(EXIT_ERROR); |
73 | 73 | } |
74 | 74 | |
75 | - $vars[ 'CREATE_DATETIME' ] = date('d/m/Y H:m'); |
|
76 | - $vars[ 'CONFIG' ] = '$' . camelcase(pathinfo($filePath, PATHINFO_FILENAME)); |
|
77 | - $vars[ 'FILEPATH' ] = $filePath; |
|
75 | + $vars['CREATE_DATETIME'] = date('d/m/Y H:m'); |
|
76 | + $vars['CONFIG'] = '$' . camelcase(pathinfo($filePath, PATHINFO_FILENAME)); |
|
77 | + $vars['FILEPATH'] = $filePath; |
|
78 | 78 | |
79 | 79 | $phpTemplate = <<<PHPTEMPLATE |
80 | 80 | <?php |
@@ -151,16 +151,16 @@ discard block |
||
151 | 151 | $options = input()->get(); |
152 | 152 | |
153 | 153 | if (empty($options)) { |
154 | - $_GET[ 'switch' ] = 'ON'; |
|
155 | - $_GET[ 'mode' ] = 'default'; |
|
156 | - $_GET[ 'lifetime' ] = 300; |
|
157 | - $_GET[ 'title' ] = language()->getLine(strtoupper('CLI_MAINTENANCE_TITLE')); |
|
158 | - $_GET[ 'message' ] = language()->getLine(strtoupper('CLI_MAINTENANCE_MESSAGE')); |
|
154 | + $_GET['switch'] = 'ON'; |
|
155 | + $_GET['mode'] = 'default'; |
|
156 | + $_GET['lifetime'] = 300; |
|
157 | + $_GET['title'] = language()->getLine(strtoupper('CLI_MAINTENANCE_TITLE')); |
|
158 | + $_GET['message'] = language()->getLine(strtoupper('CLI_MAINTENANCE_MESSAGE')); |
|
159 | 159 | } else { |
160 | - $_GET[ 'mode' ] = 'default'; |
|
161 | - $_GET[ 'lifetime' ] = 300; |
|
162 | - $_GET[ 'title' ] = language()->getLine(strtoupper('CLI_MAINTENANCE_TITLE')); |
|
163 | - $_GET[ 'message' ] = language()->getLine(strtoupper('CLI_MAINTENANCE_MESSAGE')); |
|
160 | + $_GET['mode'] = 'default'; |
|
161 | + $_GET['lifetime'] = 300; |
|
162 | + $_GET['title'] = language()->getLine(strtoupper('CLI_MAINTENANCE_TITLE')); |
|
163 | + $_GET['message'] = language()->getLine(strtoupper('CLI_MAINTENANCE_MESSAGE')); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | parent::execute(); |
@@ -173,11 +173,11 @@ discard block |
||
173 | 173 | (new Format()) |
174 | 174 | ->setContextualClass(Format::DANGER) |
175 | 175 | ->setString(language()->getLine('CLI_MAINTENANCE_ALREADY_STARTED', [ |
176 | - $maintenanceInfo[ 'mode' ], |
|
177 | - $maintenanceInfo[ 'datetime' ], |
|
178 | - date('r', strtotime($maintenanceInfo[ 'datetime' ]) + $maintenanceInfo[ 'lifetime' ]), |
|
179 | - $maintenanceInfo[ 'title' ], |
|
180 | - $maintenanceInfo[ 'message' ], |
|
176 | + $maintenanceInfo['mode'], |
|
177 | + $maintenanceInfo['datetime'], |
|
178 | + date('r', strtotime($maintenanceInfo['datetime']) + $maintenanceInfo['lifetime']), |
|
179 | + $maintenanceInfo['title'], |
|
180 | + $maintenanceInfo['message'], |
|
181 | 181 | ])) |
182 | 182 | ->setNewLinesAfter(1) |
183 | 183 | ); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | { |
24 | 24 | public function &__get($property) |
25 | 25 | { |
26 | - $get[ $property ] = false; |
|
26 | + $get[$property] = false; |
|
27 | 27 | |
28 | 28 | // CodeIgniter property aliasing |
29 | 29 | if ($property === 'load') { |
@@ -38,6 +38,6 @@ discard block |
||
38 | 38 | return models('controller'); |
39 | 39 | } |
40 | 40 | |
41 | - return $get[ $property ]; |
|
41 | + return $get[$property]; |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | \ No newline at end of file |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | // or a multidimensional one, we need to do a little prepping. |
286 | 286 | if ( ! is_array($meta)) { |
287 | 287 | $meta = [['name' => $meta, 'content' => $content, 'type']]; |
288 | - } elseif (isset($meta[ 'name' ])) { |
|
288 | + } elseif (isset($meta['name'])) { |
|
289 | 289 | // Turn single array into multidimensional |
290 | 290 | $meta = [$meta]; |
291 | 291 | } |
@@ -295,11 +295,11 @@ discard block |
||
295 | 295 | foreach ($meta as $attributes) { |
296 | 296 | $element = new \O2System\Html\Element('meta'); |
297 | 297 | $element->attributes->addAttribute('type', |
298 | - (isset($attributes[ 'type' ]) && $attributes[ 'type' ] !== 'name') ? 'http-equiv' : 'name'); |
|
298 | + (isset($attributes['type']) && $attributes['type'] !== 'name') ? 'http-equiv' : 'name'); |
|
299 | 299 | $element->attributes->addAttribute('name', |
300 | - isset($attributes[ 'content' ]) ? $attributes[ 'content' ] : ''); |
|
300 | + isset($attributes['content']) ? $attributes['content'] : ''); |
|
301 | 301 | $element->attributes->addAttribute('name', |
302 | - isset($attributes[ 'content' ]) ? $attributes[ 'content' ] : ''); |
|
302 | + isset($attributes['content']) ? $attributes['content'] : ''); |
|
303 | 303 | |
304 | 304 | if (count($attributes)) { |
305 | 305 | foreach ($attributes as $meta => $value) { |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | } |
339 | 339 | |
340 | 340 | foreach ($xml->attributes() as $key => $node) { |
341 | - $attributes[ $key ] = (string)$node; |
|
341 | + $attributes[$key] = (string)$node; |
|
342 | 342 | } |
343 | 343 | } |
344 | 344 | |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | $html = preg_match_all("/(\<" . $tag . ")(.*?)(" . $tag . ">)/si", $html, $matches); |
401 | 401 | |
402 | 402 | $result = ''; |
403 | - foreach ($matches[ 0 ] as $item) { |
|
403 | + foreach ($matches[0] as $item) { |
|
404 | 404 | $result = preg_replace("/\<[\/]?" . $tag . "\>/", '', $item); |
405 | 405 | } |
406 | 406 |