@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public function __construct(array $events = []) |
48 | 48 | { |
49 | 49 | $this->events = $events; |
50 | - if (! array_key_exists(self::WILDCARD, $this->events)) { |
|
50 | + if (!array_key_exists(self::WILDCARD, $this->events)) { |
|
51 | 51 | $this->events[self::WILDCARD] = []; |
52 | 52 | } |
53 | 53 | } |
@@ -65,14 +65,14 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function attach(string $event, callable $callback, int $priority = 0): bool |
67 | 67 | { |
68 | - if (! array_key_exists($event, $this->events)) { |
|
68 | + if (!array_key_exists($event, $this->events)) { |
|
69 | 69 | $this->events[$event] = []; |
70 | 70 | } |
71 | - if (! array_key_exists($priority, $this->events[$event])) { |
|
71 | + if (!array_key_exists($priority, $this->events[$event])) { |
|
72 | 72 | $this->events[$event][$priority] = []; |
73 | 73 | } |
74 | 74 | |
75 | - if (! in_array($callback, $this->events[$event][$priority], true)) { |
|
75 | + if (!in_array($callback, $this->events[$event][$priority], true)) { |
|
76 | 76 | $this->events[$event][$priority][] = $callback; |
77 | 77 | |
78 | 78 | return true; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function detach(string $event, callable $callback): bool |
96 | 96 | { |
97 | - if (! array_key_exists($event, $this->events) || ! $this->events[$event]) { |
|
97 | + if (!array_key_exists($event, $this->events) || !$this->events[$event]) { |
|
98 | 98 | return false; |
99 | 99 | } |
100 | 100 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | public function trigger($event, $target = null, $argv = []) |
117 | 117 | { |
118 | - if (! ($event instanceof EventInterface)) { |
|
118 | + if (!($event instanceof EventInterface)) { |
|
119 | 119 | $event = new Event($event, $target, $argv); |
120 | 120 | } else { |
121 | 121 | if ($target) { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | } |
128 | 128 | |
129 | 129 | $eventName = $event->getName(); |
130 | - if (! array_key_exists($eventName, $this->events)) { |
|
130 | + if (!array_key_exists($eventName, $this->events)) { |
|
131 | 131 | $this->events[$eventName] = []; |
132 | 132 | } |
133 | 133 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $result = null; |
136 | 136 | |
137 | 137 | foreach ($events as $priority) { |
138 | - if (! is_array($priority)) { |
|
138 | + if (!is_array($priority)) { |
|
139 | 139 | continue; |
140 | 140 | } |
141 | 141 |
@@ -53,19 +53,19 @@ |
||
53 | 53 | */ |
54 | 54 | public static function type(string $mime): FormatterInterface |
55 | 55 | { |
56 | - if (! array_key_exists($mime, self::$formatters)) { |
|
56 | + if (!array_key_exists($mime, self::$formatters)) { |
|
57 | 57 | throw FormatException::invalidMime($mime); |
58 | 58 | } |
59 | 59 | |
60 | 60 | $className = self::$formatters[$mime]; |
61 | 61 | |
62 | - if (! class_exists($className)) { |
|
62 | + if (!class_exists($className)) { |
|
63 | 63 | throw FormatException::invalidFormatter($className); |
64 | 64 | } |
65 | 65 | |
66 | 66 | $class = new $className(); |
67 | 67 | |
68 | - if (! $class instanceof FormatterInterface) { |
|
68 | + if (!$class instanceof FormatterInterface) { |
|
69 | 69 | throw FormatException::invalidFormatter($className); |
70 | 70 | } |
71 | 71 |
@@ -43,7 +43,7 @@ |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | // Forcez-le à être quelque chose d'utile |
46 | - if (! is_array($data) && ! is_object($data)) { |
|
46 | + if (!is_array($data) && !is_object($data)) { |
|
47 | 47 | $data = (array) $data; |
48 | 48 | } |
49 | 49 |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | return null; |
48 | 48 | } |
49 | 49 | |
50 | - if (! is_array($data)) { |
|
50 | + if (!is_array($data)) { |
|
51 | 51 | $data = (array) $data; |
52 | 52 | } |
53 | 53 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | foreach ($data as $record) { |
66 | 66 | // Si l'enregistrement n'est pas un tableau, alors break. |
67 | 67 | // C'est parce que le 2ème paramètre de fputcsv() doit être un tableau |
68 | - if (! is_array($record)) { |
|
68 | + if (!is_array($record)) { |
|
69 | 69 | break; |
70 | 70 | } |
71 | 71 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $callback = Services::request()->getQuery('callback'); |
33 | 33 | |
34 | 34 | if (empty($callback)) { |
35 | - return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
|
35 | + return json_encode($data, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | // Nous n'honorons qu'un rappel jsonp qui sont des identifiants javascript valides |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function format($data) |
27 | 27 | { |
28 | - if (! is_array($data)) { |
|
28 | + if (!is_array($data)) { |
|
29 | 29 | $data = (array) $data; |
30 | 30 | } |
31 | 31 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
72 | - if ($plugin || ! static::_classExistsInBase($fullname, 'BlitzPHP')) { |
|
72 | + if ($plugin || !static::_classExistsInBase($fullname, 'BlitzPHP')) { |
|
73 | 73 | return null; |
74 | 74 | } |
75 | 75 |
@@ -122,7 +122,7 @@ |
||
122 | 122 | ->requireDirectory(APP_PATH, Checker::CHECK_IS_READABLE); |
123 | 123 | |
124 | 124 | $output = $checker->check(); |
125 | - if (! $checker->isSatisfied()) { |
|
125 | + if (!$checker->isSatisfied()) { |
|
126 | 126 | echo '<h3>An error encourred</h3>'; |
127 | 127 | |
128 | 128 | exit(implode('<br/> ', $checker->getErrors())); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | { |
88 | 88 | if (is_array($config)) { |
89 | 89 | foreach ($config as $key => $value) { |
90 | - if (! is_string($value) || empty($value)) { |
|
90 | + if (!is_string($value) || empty($value)) { |
|
91 | 91 | continue; |
92 | 92 | } |
93 | 93 | if (is_string($key)) { |
@@ -99,13 +99,13 @@ discard block |
||
99 | 99 | } |
100 | 100 | self::load($conf, $file); |
101 | 101 | } |
102 | - } elseif (is_string($config) && ! isset(self::$loaded[$config])) { |
|
102 | + } elseif (is_string($config) && !isset(self::$loaded[$config])) { |
|
103 | 103 | if (empty($file)) { |
104 | 104 | $file = self::path($config); |
105 | 105 | } |
106 | 106 | |
107 | 107 | $configurations = []; |
108 | - if (file_exists($file) && ! in_array($file, get_included_files(), true)) { |
|
108 | + if (file_exists($file) && !in_array($file, get_included_files(), true)) { |
|
109 | 109 | $configurations = (array) require $file; |
110 | 110 | } |
111 | 111 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | { |
131 | 131 | if (is_array($accepts_values)) { |
132 | 132 | $accepts_values = '(Accept values: ' . implode('/', $accepts_values) . ')'; |
133 | - } elseif (! is_string($accepts_values)) { |
|
133 | + } elseif (!is_string($accepts_values)) { |
|
134 | 134 | throw new InvalidArgumentException('Misuse of the method ' . __METHOD__); |
135 | 135 | } |
136 | 136 | |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $schema = require $app_schema; |
177 | 177 | } |
178 | 178 | |
179 | - if (empty($schema) || ! ($schema instanceof Schema)) { |
|
179 | + if (empty($schema) || !($schema instanceof Schema)) { |
|
180 | 180 | $schema = Expect::mixed(); |
181 | 181 | } |
182 | 182 | |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | */ |
202 | 202 | private function initializeURL() |
203 | 203 | { |
204 | - if (! $this->configurator->exists('app.base_url')) { |
|
204 | + if (!$this->configurator->exists('app.base_url')) { |
|
205 | 205 | $config = 'auto'; |
206 | 206 | } else { |
207 | 207 | $config = $this->configurator->get('app.base_url'); |
@@ -257,17 +257,17 @@ discard block |
||
257 | 257 | */ |
258 | 258 | private function initializeDebugbar() |
259 | 259 | { |
260 | - if (! $this->configurator->exists('app.show_debugbar')) { |
|
260 | + if (!$this->configurator->exists('app.show_debugbar')) { |
|
261 | 261 | $config = 'auto'; |
262 | 262 | } else { |
263 | 263 | $config = $this->configurator->get('app.show_debugbar'); |
264 | 264 | } |
265 | 265 | |
266 | - if (! in_array($config, ['auto', true, false], true)) { |
|
266 | + if (!in_array($config, ['auto', true, false], true)) { |
|
267 | 267 | self::exceptBadConfigValue('show_debugbar', ['auto', true, false], 'app'); |
268 | 268 | } |
269 | 269 | if ($config === 'auto') { |
270 | - $this->configurator->set('app.show_debugbar', ! is_online()); |
|
270 | + $this->configurator->set('app.show_debugbar', !is_online()); |
|
271 | 271 | } |
272 | 272 | } |
273 | 273 | } |