@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | */ |
238 | 238 | protected function validateDecodedType($decoded): void |
239 | 239 | { |
240 | - if (! $this->isValidDecodedType($decoded)) { |
|
240 | + if (!$this->isValidDecodedType($decoded)) { |
|
241 | 241 | throw new CryptException('The encoding failed'); |
242 | 242 | } |
243 | 243 | } |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | */ |
266 | 266 | protected function validateDecodedStrLen($decoded): void |
267 | 267 | { |
268 | - if (! $this->isValidDecodedStrLen($decoded)) { |
|
268 | + if (!$this->isValidDecodedStrLen($decoded)) { |
|
269 | 269 | throw new CryptException('The message was truncated'); |
270 | 270 | } |
271 | 271 | } |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | */ |
319 | 319 | protected function validatePlainDecoded($plain): void |
320 | 320 | { |
321 | - if (! $this->isValidPlainDecoded($plain)) { |
|
321 | + if (!$this->isValidPlainDecoded($plain)) { |
|
322 | 322 | throw new CryptException('The message was tampered with in transit'); |
323 | 323 | } |
324 | 324 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | { |
97 | 97 | $container->setClosure( |
98 | 98 | Driver::class, |
99 | - static function (array $config, string $adapter) use ($container): Driver { |
|
99 | + static function(array $config, string $adapter) use ($container): Driver { |
|
100 | 100 | return new Driver( |
101 | 101 | $container->get( |
102 | 102 | $adapter, |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | { |
121 | 121 | $container->setClosure( |
122 | 122 | SodiumAdapter::class, |
123 | - static function (array $config): SodiumAdapter { |
|
123 | + static function(array $config): SodiumAdapter { |
|
124 | 124 | return new SodiumAdapter( |
125 | 125 | $config |
126 | 126 | ); |
@@ -65,7 +65,7 @@ |
||
65 | 65 | $repository = $auth->getRepository($user); |
66 | 66 | |
67 | 67 | // Just in case we authenticated already |
68 | - if (! $repository->isLoggedIn()) { |
|
68 | + if (!$repository->isLoggedIn()) { |
|
69 | 69 | try { |
70 | 70 | static::tryLogin($repository, $request); |
71 | 71 | } catch (Exception $exception) { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | { |
140 | 140 | $sessionUser = $this->session->get($this->userEntityName::getUserSessionId()); |
141 | 141 | |
142 | - if (! $sessionUser) { |
|
142 | + if (!$sessionUser) { |
|
143 | 143 | throw new InvalidAuthenticationException('No logged in user.'); |
144 | 144 | } |
145 | 145 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | public function login(User $user): self |
161 | 161 | { |
162 | - if (! $this->adapter->authenticate($user)) { |
|
162 | + if (!$this->adapter->authenticate($user)) { |
|
163 | 163 | throw new InvalidAuthenticationException('Invalid user credentials.'); |
164 | 164 | } |
165 | 165 | |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | */ |
284 | 284 | public function loginFromTokenizedSession(): self |
285 | 285 | { |
286 | - if (! $token = $this->getTokenFromSession()) { |
|
286 | + if (!$token = $this->getTokenFromSession()) { |
|
287 | 287 | $this->resetAfterLogout(); |
288 | 288 | |
289 | 289 | throw new InvalidAuthenticationException('No user token session exists.'); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | */ |
304 | 304 | public function loginFromSession(): self |
305 | 305 | { |
306 | - if (! $user = $this->getUserFromSession()) { |
|
306 | + if (!$user = $this->getUserFromSession()) { |
|
307 | 307 | $this->resetAfterLogout(); |
308 | 308 | |
309 | 309 | throw new InvalidAuthenticationException('No user session exists.'); |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | */ |
477 | 477 | public function confirmPassword(string $password): self |
478 | 478 | { |
479 | - if (! $this->adapter->isPassword($this->user, $password)) { |
|
479 | + if (!$this->adapter->isPassword($this->user, $password)) { |
|
480 | 480 | throw new InvalidPasswordConfirmationException('Invalid password confirmation.'); |
481 | 481 | } |
482 | 482 | |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | protected function getUserFromToken(string $token): User |
530 | 530 | { |
531 | 531 | if ( |
532 | - ! $this->adapter->isValidToken($token) |
|
532 | + !$this->adapter->isValidToken($token) |
|
533 | 533 | || null === $user = $this->adapter->getUserFromToken($this->userEntityName, $token) |
534 | 534 | ) { |
535 | 535 | $this->resetAfterLogout(); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | { |
101 | 101 | $container->setClosure( |
102 | 102 | ORMAdapter::class, |
103 | - static function (array $config) use ($container): ORMAdapter { |
|
103 | + static function(array $config) use ($container): ORMAdapter { |
|
104 | 104 | return new ORMAdapter( |
105 | 105 | $container->getSingleton(Crypt::class), |
106 | 106 | $container->getSingleton(ORM::class), |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | { |
121 | 121 | $container->setClosure( |
122 | 122 | Repository::class, |
123 | - static function (Adapter $adapter, string $user, array $config) use ($container): Repository { |
|
123 | + static function(Adapter $adapter, string $user, array $config) use ($container): Repository { |
|
124 | 124 | return new Repository( |
125 | 125 | $adapter, |
126 | 126 | $container->getSingleton(Session::class), |
@@ -99,7 +99,7 @@ |
||
99 | 99 | public function setup(string $config = null, bool $force = false): void |
100 | 100 | { |
101 | 101 | // If the application was already setup, no need to do it again |
102 | - if (self::$setup && ! $force) { |
|
102 | + if (self::$setup && !$force) { |
|
103 | 103 | return; |
104 | 104 | } |
105 | 105 |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | { |
116 | 116 | $container->setClosure( |
117 | 117 | Driver::class, |
118 | - static function (array $config, string $adapter) use ($container): Driver { |
|
118 | + static function(array $config, string $adapter) use ($container): Driver { |
|
119 | 119 | return new Driver( |
120 | 120 | $container->get( |
121 | 121 | $adapter, |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | $container->setClosure( |
144 | 144 | LogAdapter::class, |
145 | - static function (array $config) use ($logger): LogAdapter { |
|
145 | + static function(array $config) use ($logger): LogAdapter { |
|
146 | 146 | return new LogAdapter( |
147 | 147 | $logger->useLogger($config['logger'] ?? null), |
148 | 148 | $config |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | { |
163 | 163 | $container->setClosure( |
164 | 164 | NullAdapter::class, |
165 | - static function (array $config): NullAdapter { |
|
165 | + static function(array $config): NullAdapter { |
|
166 | 166 | return new NullAdapter( |
167 | 167 | $config |
168 | 168 | ); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | |
185 | 185 | $container->setClosure( |
186 | 186 | PHPMailer::class, |
187 | - static function (array $config) use ($appDebug): PHPMailer { |
|
187 | + static function(array $config) use ($appDebug): PHPMailer { |
|
188 | 188 | // Create a new instance of the PHPMailer class |
189 | 189 | $mailer = new PHPMailer(true); |
190 | 190 | |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | { |
222 | 222 | $container->setClosure( |
223 | 223 | PHPMailerAdapter::class, |
224 | - static function (array $config) use ($container): PHPMailerAdapter { |
|
224 | + static function(array $config) use ($container): PHPMailerAdapter { |
|
225 | 225 | return new PHPMailerAdapter( |
226 | 226 | $container->get(PHPMailer::class, [$config]) |
227 | 227 | ); |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | { |
241 | 241 | $container->setClosure( |
242 | 242 | Mailgun::class, |
243 | - static function (array $config): Mailgun { |
|
243 | + static function(array $config): Mailgun { |
|
244 | 244 | return new Mailgun( |
245 | 245 | $config['apiKey'] |
246 | 246 | ); |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | { |
260 | 260 | $container->setClosure( |
261 | 261 | MailgunAdapter::class, |
262 | - static function (array $config) use ($container): MailgunAdapter { |
|
262 | + static function(array $config) use ($container): MailgunAdapter { |
|
263 | 263 | return new MailgunAdapter( |
264 | 264 | $container->get(Mailgun::class, [$config]), |
265 | 265 | $config |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | { |
280 | 280 | $container->setClosure( |
281 | 281 | Message::class, |
282 | - static function (array $config): Message { |
|
282 | + static function(array $config): Message { |
|
283 | 283 | return (new Message())->setFrom($config['fromEmail'], $config['fromName']); |
284 | 284 | } |
285 | 285 | ); |
@@ -101,7 +101,7 @@ |
||
101 | 101 | */ |
102 | 102 | protected function setCommandProperties(Annotation $annotation): void |
103 | 103 | { |
104 | - if (! $annotation->getClass()) { |
|
104 | + if (!$annotation->getClass()) { |
|
105 | 105 | return; |
106 | 106 | } |
107 | 107 |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $arguments = $this->getArguments(); |
152 | 152 | } |
153 | 153 | |
154 | - if (! $arguments) { |
|
154 | + if (!$arguments) { |
|
155 | 155 | return; |
156 | 156 | } |
157 | 157 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $options = $this->getOptions(); |
183 | 183 | } |
184 | 184 | |
185 | - if (! $options) { |
|
185 | + if (!$options) { |
|
186 | 186 | return; |
187 | 187 | } |
188 | 188 |