@@ -31,7 +31,7 @@ |
||
31 | 31 | $column = $this->parameter('column'); |
32 | 32 | $column = $column ?: $this->getAttribute()->getKey(); |
33 | 33 | |
34 | - $builder = $this->db->table($table)->where($column, $value); |
|
34 | + $builder = $this->db->table($table)->where($column, $value); |
|
35 | 35 | |
36 | 36 | return $builder->count() > 0; |
37 | 37 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | } |
45 | 45 | } else { |
46 | - $keyMessages = isset($this->messages[$key])? $this->messages[$key] : []; |
|
46 | + $keyMessages = isset($this->messages[$key]) ? $this->messages[$key] : []; |
|
47 | 47 | foreach ((array) $keyMessages as $rule => $message) { |
48 | 48 | if ($ruleName and $ruleName != $rule) { |
49 | 49 | continue; |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $filteredMessages = []; |
84 | 84 | |
85 | 85 | foreach ($messages as $k => $keyMessages) { |
86 | - if ((bool) preg_match('#^'.$pattern.'\z#u', $k) === false) { |
|
86 | + if ((bool) preg_match('#^' . $pattern . '\z#u', $k) === false) { |
|
87 | 87 | continue; |
88 | 88 | } |
89 | 89 |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | { |
123 | 123 | $request = $this->generator->getRequest(); |
124 | 124 | |
125 | - $intended = $request->method() === 'GET' && ! $request->expectsJson() |
|
125 | + $intended = $request->method() === 'GET' && !$request->expectsJson() |
|
126 | 126 | ? $this->generator->full() |
127 | 127 | : $this->generator->previous(); |
128 | 128 | |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $errors = [$key => $errors]; |
177 | 177 | } |
178 | 178 | |
179 | - if (! empty($errors)) { |
|
179 | + if (!empty($errors)) { |
|
180 | 180 | Services::viewer()->share('errors', new ErrorBag($this->session->flashErrors($errors, $key))); |
181 | 181 | } |
182 | 182 |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | if (is_string($to)) { |
164 | 164 | $parts = explode('::', $to); |
165 | - } else if(is_array($to)) { |
|
165 | + } else if (is_array($to)) { |
|
166 | 166 | $parts = $to; |
167 | 167 | } else { |
168 | 168 | $parts = []; |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | */ |
314 | 314 | private function attribute(string $key, $value): self |
315 | 315 | { |
316 | - if (! in_array($key, $this->allowedAttributes, true)) { |
|
316 | + if (!in_array($key, $this->allowedAttributes, true)) { |
|
317 | 317 | throw new InvalidArgumentException("L'attribute [{$key}] n'existe pas."); |
318 | 318 | } |
319 | 319 |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | $this->adapter->addData($data, $context); |
152 | 152 | |
153 | - if (! array_key_exists('errors', $this->getData())) { |
|
153 | + if (!array_key_exists('errors', $this->getData())) { |
|
154 | 154 | $this->setValidationErrors(); |
155 | 155 | } |
156 | 156 | |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | $this->adapter->setData($data, $context); |
196 | 196 | |
197 | - if (! array_key_exists('errors', $this->getData())) { |
|
197 | + if (!array_key_exists('errors', $this->getData())) { |
|
198 | 198 | $this->setValidationErrors(); |
199 | 199 | } |
200 | 200 | |
@@ -234,10 +234,10 @@ discard block |
||
234 | 234 | */ |
235 | 235 | public function setAdapter(string $adapter, array $config = []): self |
236 | 236 | { |
237 | - if (! array_key_exists($adapter, self::$validAdapters)) { |
|
237 | + if (!array_key_exists($adapter, self::$validAdapters)) { |
|
238 | 238 | $adapter = 'native'; |
239 | 239 | } |
240 | - if (empty($this->config['adapters']) || ! is_array($this->config['adapters'])) { |
|
240 | + if (empty($this->config['adapters']) || !is_array($this->config['adapters'])) { |
|
241 | 241 | $this->config['adapters'] = []; |
242 | 242 | } |
243 | 243 |