@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * |
15 | 15 | * @credit <a href="https://codeigniter.com">CodeIgniter 4.2 - number_helper</a> |
16 | 16 | */ |
17 | -if (! function_exists('number_to_size')) { |
|
17 | +if (!function_exists('number_to_size')) { |
|
18 | 18 | /** |
19 | 19 | * Formats a numbers as bytes, based on size, and adds the appropriate suffix |
20 | 20 | * |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | // ignore sub part |
36 | 36 | $generalLocale = $locale; |
37 | - if (! empty($locale) && ($underscorePos = strpos($locale, '_'))) { |
|
37 | + if (!empty($locale) && ($underscorePos = strpos($locale, '_'))) { |
|
38 | 38 | $generalLocale = substr($locale, 0, $underscorePos); |
39 | 39 | } |
40 | 40 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | } |
60 | 60 | |
61 | -if (! function_exists('number_to_amount')) { |
|
61 | +if (!function_exists('number_to_amount')) { |
|
62 | 62 | /** |
63 | 63 | * Converts numbers to a more readable representation |
64 | 64 | * when dealing with very large numbers (in the thousands or above), |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | // ignore sub part |
89 | 89 | $generalLocale = $locale; |
90 | - if (! empty($locale) && ($underscorePos = strpos($locale, '_'))) { |
|
90 | + if (!empty($locale) && ($underscorePos = strpos($locale, '_'))) { |
|
91 | 91 | $generalLocale = substr($locale, 0, $underscorePos); |
92 | 92 | } |
93 | 93 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | } |
114 | 114 | |
115 | -if (! function_exists('number_to_currency')) { |
|
115 | +if (!function_exists('number_to_currency')) { |
|
116 | 116 | function number_to_currency(float $num, string $currency, ?string $locale = null, int $fraction = 0): string |
117 | 117 | { |
118 | 118 | return format_number($num, 1, $locale, [ |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | } |
124 | 124 | } |
125 | 125 | |
126 | -if (! function_exists('format_number')) { |
|
126 | +if (!function_exists('format_number')) { |
|
127 | 127 | /** |
128 | 128 | * A general purpose, locale-aware, number_format method. |
129 | 129 | * Used by all of the functions of the number_helper. |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | } |
173 | 173 | } |
174 | 174 | |
175 | -if (! function_exists('number_to_roman')) { |
|
175 | +if (!function_exists('number_to_roman')) { |
|
176 | 176 | /** |
177 | 177 | * Convert a number to a roman numeral. |
178 | 178 | * |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use BlitzPHP\Utilities\String\Inflector; |
13 | 13 | |
14 | -if (! function_exists('camelize')) { |
|
14 | +if (!function_exists('camelize')) { |
|
15 | 15 | /** |
16 | 16 | * Camelize |
17 | 17 | * |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | } |
26 | 26 | } |
27 | 27 | |
28 | -if (! function_exists('classify')) { |
|
28 | +if (!function_exists('classify')) { |
|
29 | 29 | /** |
30 | 30 | * Returns model class name ("Person" for the database table "people".) for given database table. |
31 | 31 | * |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | } |
40 | 40 | } |
41 | 41 | |
42 | -if (! function_exists('dasherize')) { |
|
42 | +if (!function_exists('dasherize')) { |
|
43 | 43 | /** |
44 | 44 | * Returns the input CamelCasedString as an dashed-string. |
45 | 45 | * |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | -if (! function_exists('delimit')) { |
|
58 | +if (!function_exists('delimit')) { |
|
59 | 59 | /** |
60 | 60 | * Expects a CamelCasedInputString, and produces a lower_case_delimited_string |
61 | 61 | * |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
73 | -if (! function_exists('humanize')) { |
|
73 | +if (!function_exists('humanize')) { |
|
74 | 74 | /** |
75 | 75 | * Humanize |
76 | 76 | * |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
88 | -if (! function_exists('plural')) { |
|
88 | +if (!function_exists('plural')) { |
|
89 | 89 | /** |
90 | 90 | * Plural |
91 | 91 | * |
@@ -99,30 +99,30 @@ discard block |
||
99 | 99 | { |
100 | 100 | $result = (string) $str; |
101 | 101 | |
102 | - if (! is_countable($result)) { |
|
102 | + if (!is_countable($result)) { |
|
103 | 103 | return $result; |
104 | 104 | } |
105 | 105 | |
106 | 106 | $plural_rules = [ |
107 | - '/(quiz)$/' => '\1zes', // quizzes |
|
108 | - '/^(ox)$/' => '\1\2en', // ox |
|
109 | - '/([m|l])ouse$/' => '\1ice', // mouse, louse |
|
110 | - '/(matr|vert|ind)ix|ex$/' => '\1ices', // matrix, vertex, index |
|
111 | - '/(x|ch|ss|sh)$/' => '\1es', // search, switch, fix, box, process, address |
|
112 | - '/([^aeiouy]|qu)y$/' => '\1ies', // query, ability, agency |
|
113 | - '/(hive)$/' => '\1s', // archive, hive |
|
114 | - '/(?:([^f])fe|([lr])f)$/' => '\1\2ves', // half, safe, wife |
|
115 | - '/sis$/' => 'ses', // basis, diagnosis |
|
116 | - '/([ti])um$/' => '\1a', // datum, medium |
|
117 | - '/(p)erson$/' => '\1eople', // person, salesperson |
|
118 | - '/(m)an$/' => '\1en', // man, woman, spokesman |
|
119 | - '/(c)hild$/' => '\1hildren', // child |
|
120 | - '/(buffal|tomat)o$/' => '\1\2oes', // buffalo, tomato |
|
121 | - '/(bu|campu)s$/' => '\1\2ses', // bus, campus |
|
122 | - '/(alias|status|virus)$/' => '\1es', // alias |
|
123 | - '/(octop)us$/' => '\1i', // octopus |
|
124 | - '/(ax|cris|test)is$/' => '\1es', // axis, crisis |
|
125 | - '/s$/' => 's', // no change (compatibility) |
|
107 | + '/(quiz)$/' => '\1zes', // quizzes |
|
108 | + '/^(ox)$/' => '\1\2en', // ox |
|
109 | + '/([m|l])ouse$/' => '\1ice', // mouse, louse |
|
110 | + '/(matr|vert|ind)ix|ex$/' => '\1ices', // matrix, vertex, index |
|
111 | + '/(x|ch|ss|sh)$/' => '\1es', // search, switch, fix, box, process, address |
|
112 | + '/([^aeiouy]|qu)y$/' => '\1ies', // query, ability, agency |
|
113 | + '/(hive)$/' => '\1s', // archive, hive |
|
114 | + '/(?:([^f])fe|([lr])f)$/' => '\1\2ves', // half, safe, wife |
|
115 | + '/sis$/' => 'ses', // basis, diagnosis |
|
116 | + '/([ti])um$/' => '\1a', // datum, medium |
|
117 | + '/(p)erson$/' => '\1eople', // person, salesperson |
|
118 | + '/(m)an$/' => '\1en', // man, woman, spokesman |
|
119 | + '/(c)hild$/' => '\1hildren', // child |
|
120 | + '/(buffal|tomat)o$/' => '\1\2oes', // buffalo, tomato |
|
121 | + '/(bu|campu)s$/' => '\1\2ses', // bus, campus |
|
122 | + '/(alias|status|virus)$/' => '\1es', // alias |
|
123 | + '/(octop)us$/' => '\1i', // octopus |
|
124 | + '/(ax|cris|test)is$/' => '\1es', // axis, crisis |
|
125 | + '/s$/' => 's', // no change (compatibility) |
|
126 | 126 | '/$/' => 's', |
127 | 127 | ]; |
128 | 128 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
140 | -if (! function_exists('pluralize')) { |
|
140 | +if (!function_exists('pluralize')) { |
|
141 | 141 | /** |
142 | 142 | * Return $word in plural form. |
143 | 143 | * |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | } |
152 | 152 | } |
153 | 153 | |
154 | -if (! function_exists('singular')) { |
|
154 | +if (!function_exists('singular')) { |
|
155 | 155 | /** |
156 | 156 | * Singular |
157 | 157 | * |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | { |
166 | 166 | $result = (string) $str; |
167 | 167 | |
168 | - if (! is_countable($result)) { |
|
168 | + if (!is_countable($result)) { |
|
169 | 169 | return $result; |
170 | 170 | } |
171 | 171 | |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | } |
212 | 212 | } |
213 | 213 | |
214 | -if (! function_exists('singularize')) { |
|
214 | +if (!function_exists('singularize')) { |
|
215 | 215 | /** |
216 | 216 | * Return $word in singular form. |
217 | 217 | * |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | } |
227 | 227 | |
228 | -if (! function_exists('tableize')) { |
|
228 | +if (!function_exists('tableize')) { |
|
229 | 229 | /** |
230 | 230 | * Returns corresponding table name for given model $className. ("people" for the model class "Person"). |
231 | 231 | * |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | } |
240 | 240 | } |
241 | 241 | |
242 | -if (! function_exists('underscore')) { |
|
242 | +if (!function_exists('underscore')) { |
|
243 | 243 | /** |
244 | 244 | * Underscore |
245 | 245 | * |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | } |
254 | 254 | } |
255 | 255 | |
256 | -if (! function_exists('variable')) { |
|
256 | +if (!function_exists('variable')) { |
|
257 | 257 | /** |
258 | 258 | * Returns camelBacked version of an underscored string. |
259 | 259 | * |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | } |
268 | 268 | } |
269 | 269 | |
270 | -if (! function_exists('counted')) { |
|
270 | +if (!function_exists('counted')) { |
|
271 | 271 | /** |
272 | 272 | * Counted |
273 | 273 | * |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | } |
286 | 286 | } |
287 | 287 | |
288 | -if (! function_exists('pascalize')) { |
|
288 | +if (!function_exists('pascalize')) { |
|
289 | 289 | /** |
290 | 290 | * Pascalize |
291 | 291 | * |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | } |
302 | 302 | } |
303 | 303 | |
304 | -if (! function_exists('is_pluralizable')) { |
|
304 | +if (!function_exists('is_pluralizable')) { |
|
305 | 305 | /** |
306 | 306 | * Checks if the given word has a plural version. |
307 | 307 | * |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | */ |
310 | 310 | function is_pluralizable(string $word): bool |
311 | 311 | { |
312 | - return ! in_array( |
|
312 | + return !in_array( |
|
313 | 313 | strtolower($word), |
314 | 314 | [ |
315 | 315 | 'advice', |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | } |
385 | 385 | } |
386 | 386 | |
387 | -if (! function_exists('ordinal')) { |
|
387 | +if (!function_exists('ordinal')) { |
|
388 | 388 | /** |
389 | 389 | * Returns the suffix that should be added to a |
390 | 390 | * number to denote the position in an ordered |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | } |
412 | 412 | } |
413 | 413 | |
414 | -if (! function_exists('ordinalize')) { |
|
414 | +if (!function_exists('ordinalize')) { |
|
415 | 415 | /** |
416 | 416 | * Turns a number into an ordinal string used |
417 | 417 | * to denote the position in an ordered sequence |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $config = config('cache'); |
55 | 55 | $handler = $this->argument('driver', $config['handler']); |
56 | 56 | |
57 | - if (! array_key_exists($handler, $config['valid_handlers'])) { |
|
57 | + if (!array_key_exists($handler, $config['valid_handlers'])) { |
|
58 | 58 | $this->fail($handler . 'n\'est pas un gestionnaire de cache valide.'); |
59 | 59 | |
60 | 60 | return; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $config['handler'] = $handler; |
64 | 64 | $cache = Services::cache($config); |
65 | 65 | |
66 | - if (! $cache->clear()) { |
|
66 | + if (!$cache->clear()) { |
|
67 | 67 | // @codeCoverageIgnoreStart |
68 | 68 | $this->fail('Erreur lors de l\'effacement du cache.'); |
69 | 69 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | 'nom' => $key, |
70 | 70 | 'chemin du serveur' => clean_path($field['server_path']), |
71 | 71 | 'taille' => number_to_size($field['size']), |
72 | - 'date' => $field['date'], // @todo formatter avec Utilities\Date |
|
72 | + 'date' => $field['date'], // @todo formatter avec Utilities\Date |
|
73 | 73 | ]; |
74 | 74 | } |
75 | 75 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | namespace {namespace}; |
4 | 4 | |
5 | 5 | use BlitzPHP\Database\Migration\Migration; |
6 | -<?php if (! empty($table) && ! empty($action)): ?> |
|
6 | +<?php if (!empty($table) && !empty($action)): ?> |
|
7 | 7 | use BlitzPHP\Database\Migration\Structure; |
8 | 8 | <?php endif; ?> |
9 | 9 |
@@ -17,7 +17,8 @@ discard block |
||
17 | 17 | { |
18 | 18 | <?php if (empty($table) || empty($action)): ?> |
19 | 19 | // |
20 | -<?php else: ?> |
|
20 | +<?php else { |
|
21 | + : ?> |
|
21 | 22 | $this-><?= $action ?>('<?= $table ?>', function(Structure $table) { |
22 | 23 | <?php if ($session): ?> |
23 | 24 | $table->string('id', 128); |
@@ -28,12 +29,17 @@ discard block |
||
28 | 29 | $table->primary(['id', 'ip_address']); |
29 | 30 | <?php else: ?> |
30 | 31 | $table->primary('id'); |
31 | -<?php endif; ?> |
|
32 | +<?php endif; |
|
33 | +} |
|
34 | +?> |
|
32 | 35 | $table->index('timestamp'); |
33 | -<?php else: ?> |
|
36 | +<?php else { |
|
37 | + : ?> |
|
34 | 38 | $table->id(); |
35 | 39 | $table->timestamps(); |
36 | -<?php endif; ?> |
|
40 | +<?php endif; |
|
41 | +} |
|
42 | +?> |
|
37 | 43 | |
38 | 44 | return $table; |
39 | 45 | }); |
@@ -46,10 +52,13 @@ discard block |
||
46 | 52 | // |
47 | 53 | <?php elseif ($action === 'create') : ?> |
48 | 54 | $this->dropIfExists('<?= $table ?>'); |
49 | -<?php else: ?> |
|
55 | +<?php else { |
|
56 | + : ?> |
|
50 | 57 | $this->modify('<?= $table ?>', function(Structure $table) { |
51 | 58 | // |
52 | 59 | }); |
53 | -<?php endif; ?> |
|
60 | +<?php endif; |
|
61 | +} |
|
62 | +?> |
|
54 | 63 | } |
55 | 64 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | throw new InvalidArgumentException('Impossible d\'utiliser "create" et "modify" au même moment pour la génération des migrations.'); |
99 | 99 | } |
100 | 100 | |
101 | - if (! $create && ! $modify) { |
|
101 | + if (!$create && !$modify) { |
|
102 | 102 | $data['action'] = null; |
103 | 103 | } else { |
104 | 104 | $data['action'] = $create ? 'create' : 'modify'; |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
120 | - if (! is_string($table) || $table === '') { |
|
120 | + if (!is_string($table) || $table === '') { |
|
121 | 121 | if ($data['session']) { |
122 | 122 | $table = 'blitz_sessions'; |
123 | 123 | } elseif (is_string($create)) { |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | foreach ($files as $file) { |
180 | 180 | $className = $locator->getClassname($file); |
181 | 181 | |
182 | - if ($className === '' || ! class_exists($className)) { |
|
182 | + if ($className === '' || !class_exists($className)) { |
|
183 | 183 | continue; |
184 | 184 | } |
185 | 185 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $class = new ReflectionClass($className); |
206 | 206 | $logger = $logger ?: Services::logger(); |
207 | 207 | |
208 | - if (! $class->isInstantiable() || ! $class->isSubclassOf(Command::class)) { |
|
208 | + if (!$class->isInstantiable() || !$class->isSubclassOf(Command::class)) { |
|
209 | 209 | throw CLIException::invalidCommand($className); |
210 | 210 | } |
211 | 211 | |
@@ -232,13 +232,13 @@ discard block |
||
232 | 232 | $value = (array) $value; |
233 | 233 | |
234 | 234 | $description = $value[0]; |
235 | - if (! is_string($description)) { |
|
235 | + if (!is_string($description)) { |
|
236 | 236 | continue; |
237 | 237 | } |
238 | 238 | |
239 | 239 | $default = $value[1] ?? null; |
240 | 240 | $filter = $value[2] ?? null; |
241 | - if ($filter !== null && ! is_callable($filter)) { |
|
241 | + if ($filter !== null && !is_callable($filter)) { |
|
242 | 242 | $filter = null; |
243 | 243 | } |
244 | 244 | |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | $value = (array) $value; |
251 | 251 | |
252 | 252 | $description = $value[0]; |
253 | - if (! is_string($description)) { |
|
253 | + if (!is_string($description)) { |
|
254 | 254 | continue; |
255 | 255 | } |
256 | 256 | |
@@ -260,15 +260,15 @@ discard block |
||
260 | 260 | } |
261 | 261 | |
262 | 262 | $console = $this; |
263 | - $action = function (?array $arguments = [], ?array $options = [], ?bool $suppress = null) use ($instance, $command, $console) { |
|
263 | + $action = function(?array $arguments = [], ?array $options = [], ?bool $suppress = null) use ($instance, $command, $console) { |
|
264 | 264 | foreach ($instance->required as $package) { |
265 | 265 | $package = explode(':', $package); |
266 | 266 | $version = $package[1] ?? null; |
267 | 267 | $package = $package[0]; |
268 | 268 | |
269 | - if (! InstalledVersions::isInstalled($package)) { |
|
269 | + if (!InstalledVersions::isInstalled($package)) { |
|
270 | 270 | $console->io()->info('Cette commande nécessite le package "' . $package . '" mais vous ne l\'avez pas', true); |
271 | - if (! $console->io()->confirm('Voulez-vous l\'installer maintenant ?')) { |
|
271 | + if (!$console->io()->confirm('Voulez-vous l\'installer maintenant ?')) { |
|
272 | 272 | return; |
273 | 273 | } |
274 | 274 | |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | } |
285 | 285 | |
286 | 286 | $suppress = $suppress ?: $console->suppress; |
287 | - if (! $suppress) { |
|
287 | + if (!$suppress) { |
|
288 | 288 | $console->start($instance->service); |
289 | 289 | } |
290 | 290 | |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | |
300 | 300 | $result = $instance->setOptions($options)->setArguments($arguments)->execute($parameters); |
301 | 301 | |
302 | - if (! $suppress) { |
|
302 | + if (!$suppress) { |
|
303 | 303 | $console->end(); |
304 | 304 | } |
305 | 305 | |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | |
315 | 315 | private function registerException(Logger $logger) |
316 | 316 | { |
317 | - $this->onException(function (Throwable $e, int $exitCode) use ($logger) { |
|
317 | + $this->onException(function(Throwable $e, int $exitCode) use ($logger) { |
|
318 | 318 | $logger->error((string) $e, ['exitCode' => $exitCode, 'klinge' => true]); |
319 | 319 | |
320 | 320 | throw new CLIException($e->getMessage(), $exitCode, $e); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | // Se rassurer que le dossier courant pointe sur le dossier du front controller |
19 | 19 | chdir(WEBROOT); |
20 | 20 | |
21 | -return function (array $paths, string $paths_config_file, bool $is_cli) { |
|
21 | +return function(array $paths, string $paths_config_file, bool $is_cli) { |
|
22 | 22 | // Le chemin d'accès vers le dossier de l'application |
23 | 23 | if (is_dir($paths['app'])) { |
24 | 24 | if (($_temp = realpath($paths['app'])) !== false) { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | require_once __DIR__ . DS . 'kint.php'; |
95 | 95 | |
96 | - if (! $is_cli) { |
|
96 | + if (!$is_cli) { |
|
97 | 97 | $app->run(); |
98 | 98 | } |
99 | 99 | }; |
@@ -81,10 +81,10 @@ |
||
81 | 81 | */ |
82 | 82 | require_once SYST_PATH . 'Helpers' . DS . 'common.php'; |
83 | 83 | |
84 | - /** |
|
85 | - * On initialise le parsing du fichier .env |
|
86 | - */ |
|
87 | - DotEnv::init(ROOTPATH); |
|
84 | + /** |
|
85 | + * On initialise le parsing du fichier .env |
|
86 | + */ |
|
87 | + DotEnv::init(ROOTPATH); |
|
88 | 88 | |
89 | 89 | // Initialise et enregistre le loader avec la pile SPL autoloader. |
90 | 90 | Services::autoloader()->initialize()->register(); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | // @codeCoverageIgnoreStart |
114 | 114 | $this->colorize(lang('CLI.generator.usingBlitzNamespace'), 'yellow'); |
115 | 115 | |
116 | - if (! $this->confirm('Are you sure you want to continue?')) { |
|
116 | + if (!$this->confirm('Are you sure you want to continue?')) { |
|
117 | 117 | $this->eol()->colorize(lang('CLI.generator.cancelOperation'), 'yellow'); |
118 | 118 | |
119 | 119 | return; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | |
128 | 128 | // Écraser des fichiers sans le savoir est une gêne sérieuse, nous allons donc vérifier si nous dupliquons des choses, |
129 | 129 | // si l'option "forcer" n'est pas fournie, nous renvoyons. |
130 | - if (! $this->option('force') && $isFile) { |
|
130 | + if (!$this->option('force') && $isFile) { |
|
131 | 131 | $this->io->error(lang('CLI.generator.fileExist', [clean_path($target)]), true); |
132 | 132 | |
133 | 133 | return; |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | // Vérifie si le répertoire pour enregistrer le fichier existe. |
137 | 137 | $dir = dirname($target); |
138 | 138 | |
139 | - if (! is_dir($dir)) { |
|
139 | + if (!is_dir($dir)) { |
|
140 | 140 | mkdir($dir, 0755, true); |
141 | 141 | } |
142 | 142 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | // Construisez la classe en fonction des détails dont nous disposons. |
146 | 146 | // Nous obtiendrons le contenu de notre fichier à partir du modèle, |
147 | 147 | // puis nous effectuerons les remplacements nécessaires. |
148 | - if (! write_file($target, $content)) { |
|
148 | + if (!write_file($target, $content)) { |
|
149 | 149 | // @codeCoverageIgnoreStart |
150 | 150 | $this->io->error(lang('CLI.generator.fileError', [clean_path($target)]), true); |
151 | 151 | |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $class = $matches[1] . ucfirst($matches[2]); |
210 | 210 | } |
211 | 211 | |
212 | - if ($this->enabledSuffixing && $this->getOption('suffix') && ! strripos($class, $component)) { |
|
212 | + if ($this->enabledSuffixing && $this->getOption('suffix') && !strripos($class, $component)) { |
|
213 | 213 | $class .= ucfirst($component); |
214 | 214 | } |
215 | 215 | |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | |
281 | 281 | $base = Services::autoloader()->getNamespace($namespace); |
282 | 282 | |
283 | - if (! $base = reset($base)) { |
|
283 | + if (!$base = reset($base)) { |
|
284 | 284 | $this->io->error(lang('CLI.namespaceNotDefined', [$namespace]), true); |
285 | 285 | |
286 | 286 | return ''; |