@@ -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 |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function expectsJson(): bool |
33 | 33 | { |
34 | - return ($this->ajax() && ! $this->pjax() && $this->acceptsAnyContentType()) || $this->wantsJson(); |
|
34 | + return ($this->ajax() && !$this->pjax() && $this->acceptsAnyContentType()) || $this->wantsJson(); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -40,11 +40,11 @@ |
||
40 | 40 | if (empty($dependency['class']) || empty($dependency['package'])) { |
41 | 41 | throw new InvalidArgumentException('Invalid dependencies property'); |
42 | 42 | } |
43 | - if (! is_string($dependency['class']) || ! is_string($dependency['package'])) { |
|
43 | + if (!is_string($dependency['class']) || !is_string($dependency['package'])) { |
|
44 | 44 | throw new InvalidArgumentException('Invalid dependencies property'); |
45 | 45 | } |
46 | 46 | |
47 | - if (! class_exists($dependency['class'])) { |
|
47 | + if (!class_exists($dependency['class'])) { |
|
48 | 48 | throw new RuntimeException(lang('Mail.dependancyNotFound', [$dependency['class'], static::class, $dependency['package']])); |
49 | 49 | } |
50 | 50 | } |
@@ -269,7 +269,7 @@ |
||
269 | 269 | */ |
270 | 270 | private function attribute(string $key, $value): self |
271 | 271 | { |
272 | - if (! in_array($key, $this->allowedAttributes, true)) { |
|
272 | + if (!in_array($key, $this->allowedAttributes, true)) { |
|
273 | 273 | throw new InvalidArgumentException("L'attribute [{$key}] n'existe pas."); |
274 | 274 | } |
275 | 275 |
@@ -97,7 +97,7 @@ |
||
97 | 97 | } elseif ($rest) { |
98 | 98 | $rest = is_string($rest) ? $rest : 'controller'; |
99 | 99 | |
100 | - if (! in_array($rest, ['controller', 'presenter'], true)) { |
|
100 | + if (!in_array($rest, ['controller', 'presenter'], true)) { |
|
101 | 101 | // @codeCoverageIgnoreStart |
102 | 102 | $rest = $this->choice(lang('CLI.generator.parentClass'), ['controller', 'presenter']); |
103 | 103 | $this->newLine(); |
@@ -125,7 +125,7 @@ |
||
125 | 125 | $i = 1; |
126 | 126 | |
127 | 127 | foreach ($route['params'] as $required) { |
128 | - if ($longest && ! $required) { |
|
128 | + if ($longest && !$required) { |
|
129 | 129 | $sampleUri .= '/' . $i++; |
130 | 130 | } |
131 | 131 | } |
@@ -74,14 +74,14 @@ discard block |
||
74 | 74 | return; |
75 | 75 | } |
76 | 76 | |
77 | - if (! in_array($env, self::$knownTypes, true)) { |
|
77 | + if (!in_array($env, self::$knownTypes, true)) { |
|
78 | 78 | $this->error(sprintf('Type d\'environnement non valide "%s". Attendu un des "%s".', $env, implode('" et "', self::$knownTypes))); |
79 | 79 | $this->newLine(); |
80 | 80 | |
81 | 81 | return; |
82 | 82 | } |
83 | 83 | |
84 | - if (! $this->writeNewEnvironmentToEnvFile($env)) { |
|
84 | + if (!$this->writeNewEnvironmentToEnvFile($env)) { |
|
85 | 85 | $this->error('Erreur dans l\'écriture nouvel environnement dans le fichier `.env`.'); |
86 | 86 | $this->newLine(); |
87 | 87 | |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | $baseEnv = ROOTPATH . '.env.example'; |
102 | 102 | $envFile = ROOTPATH . '.env'; |
103 | 103 | |
104 | - if (! is_file($envFile)) { |
|
105 | - if (! is_file($baseEnv)) { |
|
104 | + if (!is_file($envFile)) { |
|
105 | + if (!is_file($baseEnv)) { |
|
106 | 106 | $this->writer->warn('Les deux fichiers `.env.example` et `.env` sont manquants.', true); |
107 | 107 | $this->write('Il est impossible d\'écrire le nouveau type d\'environnement.'); |
108 | 108 | $this->newLine(); |
@@ -107,35 +107,35 @@ discard block |
||
107 | 107 | */ |
108 | 108 | defined('LAYOUT_PATH') || define('LAYOUT_PATH', VIEW_PATH . 'layouts' . DS); |
109 | 109 | |
110 | -if (! defined('SERVICE_PATH')) { |
|
110 | +if (!defined('SERVICE_PATH')) { |
|
111 | 111 | /** |
112 | 112 | * Services directory path |
113 | 113 | */ |
114 | 114 | define('SERVICE_PATH', APP_PATH . 'services' . DS); |
115 | 115 | } |
116 | 116 | |
117 | -if (! defined('DATABASE_PATH')) { |
|
117 | +if (!defined('DATABASE_PATH')) { |
|
118 | 118 | /** |
119 | 119 | * Database storage directory path |
120 | 120 | */ |
121 | 121 | define('DATABASE_PATH', STORAGE_PATH . 'database' . DS); |
122 | 122 | } |
123 | 123 | |
124 | -if (! defined('DB_SEED_PATH')) { |
|
124 | +if (!defined('DB_SEED_PATH')) { |
|
125 | 125 | /** |
126 | 126 | * Database seeds storage path |
127 | 127 | */ |
128 | 128 | define('DB_SEED_PATH', APP_RESOURCE_PATH . 'database' . DS . 'seeds' . DS); |
129 | 129 | } |
130 | 130 | |
131 | -if (! defined('DB_DUMP_PATH')) { |
|
131 | +if (!defined('DB_DUMP_PATH')) { |
|
132 | 132 | /** |
133 | 133 | * Database backup storage path |
134 | 134 | */ |
135 | 135 | define('DB_DUMP_PATH', DATABASE_PATH . 'dump' . DS); |
136 | 136 | } |
137 | 137 | |
138 | -if (! defined('DB_CACHE_PATH')) { |
|
138 | +if (!defined('DB_CACHE_PATH')) { |
|
139 | 139 | /** |
140 | 140 | * Database cache directory path |
141 | 141 | */ |
@@ -157,11 +157,11 @@ discard block |
||
157 | 157 | */ |
158 | 158 | defined('SECOND') || define('SECOND', 1); |
159 | 159 | defined('MINUTE') || define('MINUTE', 60); |
160 | -defined('HOUR') || define('HOUR', 3600); |
|
161 | -defined('DAY') || define('DAY', 86400); |
|
162 | -defined('WEEK') || define('WEEK', 604800); |
|
163 | -defined('MONTH') || define('MONTH', 2592000); |
|
164 | -defined('YEAR') || define('YEAR', 31536000); |
|
160 | +defined('HOUR') || define('HOUR', 3600); |
|
161 | +defined('DAY') || define('DAY', 86400); |
|
162 | +defined('WEEK') || define('WEEK', 604800); |
|
163 | +defined('MONTH') || define('MONTH', 2592000); |
|
164 | +defined('YEAR') || define('YEAR', 31536000); |
|
165 | 165 | defined('DECADE') || define('DECADE', 315360000); |
166 | 166 | |
167 | 167 | /** |
@@ -182,13 +182,13 @@ discard block |
||
182 | 182 | * - BSD sysexits.h: http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits |
183 | 183 | * - Bash scripting: http://tldp.org/LDP/abs/html/exitcodes.html |
184 | 184 | */ |
185 | -defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // pas d'erreurs |
|
186 | -defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // erreur generique |
|
187 | -defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // erreur de configuration |
|
188 | -defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // fichier non trouvé |
|
189 | -defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // classe inconnue |
|
185 | +defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // pas d'erreurs |
|
186 | +defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // erreur generique |
|
187 | +defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // erreur de configuration |
|
188 | +defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // fichier non trouvé |
|
189 | +defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // classe inconnue |
|
190 | 190 | defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // membre de classe inconnu |
191 | -defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // saisie utilisateur invalide |
|
192 | -defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // erreur de base de données |
|
193 | -defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // code d'erreur attribué automatiquement le plus bas |
|
194 | -defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // code d'erreur attribué automatiquement le plus élevé |
|
191 | +defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // saisie utilisateur invalide |
|
192 | +defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // erreur de base de données |
|
193 | +defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // code d'erreur attribué automatiquement le plus bas |
|
194 | +defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // code d'erreur attribué automatiquement le plus élevé |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | // Ce helper est automatiquement chargé par BlitzPHP. |
15 | 15 | |
16 | -if (! function_exists('dd')) { |
|
16 | +if (!function_exists('dd')) { |
|
17 | 17 | /** |
18 | 18 | * Imprime un rapport de débogage Kint et coupe le script. |
19 | 19 | * |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
35 | -if (! function_exists('dump')) { |
|
35 | +if (!function_exists('dump')) { |
|
36 | 36 | /** |
37 | 37 | * Imprime un rapport de débogage Kint sans couper le script. |
38 | 38 | * |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | } |
50 | 50 | } |
51 | 51 | |
52 | -if (! function_exists('d') && ! class_exists(Kint::class)) { |
|
52 | +if (!function_exists('d') && !class_exists(Kint::class)) { |
|
53 | 53 | // Au cas où Kint n'est pas chargé |
54 | 54 | /** |
55 | 55 | * @param array $vars |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | } |
62 | 62 | |
63 | -if (! function_exists('trace')) { |
|
63 | +if (!function_exists('trace')) { |
|
64 | 64 | /** |
65 | 65 | * Fournit un backtrace au point d'exécution actuel, à partir de Kint. |
66 | 66 | * |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | function trace() |
72 | 72 | { |
73 | - if (! class_exists(Kint::class)) { |
|
73 | + if (!class_exists(Kint::class)) { |
|
74 | 74 | return 0; |
75 | 75 | } |
76 | 76 |