Completed
Push — develop ( 947ba3...8e6a62 )
by Neomerx
14:51
created
src/Package/PassportRoutesConfigurator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public static function configureRoutes(GroupInterface $routes): void
40 40
     {
41
-        $routes->group(static::GROUP_PREFIX, function (GroupInterface $group) {
41
+        $routes->group(static::GROUP_PREFIX, function(GroupInterface $group) {
42 42
             $group->get(static::AUTHORIZE_URI, PassportController::AUTHORIZE_HANDLER);
43 43
             $group->post(static::TOKEN_URI, PassportController::TOKEN_HANDLER);
44 44
         });
Please login to merge, or discard this patch.
src/Repositories/BaseRepository.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -272,7 +272,7 @@
 block discarded – undo
272 272
     }
273 273
 
274 274
     /**
275
-     * @param string|int $identifier
275
+     * @param string $identifier
276 276
      * @param string     $hasManyTableName
277 277
      * @param string     $hasManyColumn
278 278
      * @param string     $hasManyFkName
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         $statement = $query
163 163
             ->select($columns)
164 164
             ->from($this->getTableNameForReading())
165
-            ->where($column . '=' . $this->createTypedParameter($query, $identifier))
165
+            ->where($column.'='.$this->createTypedParameter($query, $identifier))
166 166
             ->execute();
167 167
 
168 168
         $statement->setFetchMode(PDO::FETCH_CLASS, $this->getClassName());
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
         $query
185 185
             ->update($this->getTableNameForWriting())
186
-            ->where($this->getPrimaryKeyName() . '=' . $this->createTypedParameter($query, $identifier));
186
+            ->where($this->getPrimaryKeyName().'='.$this->createTypedParameter($query, $identifier));
187 187
         foreach ($values as $key => $value) {
188 188
             $query->set($key, $this->createTypedParameter($query, $value));
189 189
         }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
         $query
207 207
             ->delete($this->getTableNameForWriting())
208
-            ->where($this->getPrimaryKeyName() . '=' . $this->createTypedParameter($query, $identifier));
208
+            ->where($this->getPrimaryKeyName().'='.$this->createTypedParameter($query, $identifier));
209 209
 
210 210
         $numberOfDeleted = $query->execute();
211 211
         assert(is_int($numberOfDeleted) === true);
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         $query
263 263
             ->select($intForeignKeyName)
264 264
             ->from($intTableName)
265
-            ->where($intPrimaryKeyName . '=' . $this->createTypedParameter($query, $identifier));
265
+            ->where($intPrimaryKeyName.'='.$this->createTypedParameter($query, $identifier));
266 266
 
267 267
         $statement = $query->execute();
268 268
         $statement->setFetchMode(PDO::FETCH_NUM);
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
         $query
292 292
             ->select($hasManyColumn)
293 293
             ->from($hasManyTableName)
294
-            ->where($hasManyFkName . '=' . $this->createTypedParameter($query, $identifier));
294
+            ->where($hasManyFkName.'='.$this->createTypedParameter($query, $identifier));
295 295
 
296 296
         $statement = $query->execute();
297 297
         $statement->setFetchMode(PDO::FETCH_NUM);
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 
318 318
         $query
319 319
             ->delete($intTableName)
320
-            ->where($intPrimaryKeyName . '=' . $this->createTypedParameter($query, $identifier));
320
+            ->where($intPrimaryKeyName.'='.$this->createTypedParameter($query, $identifier));
321 321
 
322 322
         $numberOfDeleted = $query->execute();
323 323
         assert(is_int($numberOfDeleted) === true);
Please login to merge, or discard this patch.
src/Traits/BasicClientAuthenticationTrait.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      * @param array                              $parameters
33 33
      * @param string                             $realm
34 34
      *
35
-     * @return ClientInterface|null
35
+     * @return \Limoncello\Passport\Contracts\Entities\ClientInterface|null
36 36
      *
37 37
      * @SuppressWarnings(PHPMD.ElseExpression)
38 38
      * @SuppressWarnings(PHPMD.NPathComplexity)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         ServerRequestInterface $request,
44 44
         array $parameters,
45 45
         $realm = 'OAuth'
46
-    ): ?ClientInterface {
46
+    ): ? ClientInterface {
47 47
         // A client may use Basic authentication.
48 48
         //
49 49
         // Or
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         // try to parse `Authorization` header for client ID and credentials
58 58
         $clientId          = null;
59 59
         $clientCredentials = null;
60
-        $errorHeaders      = ['WWW-Authenticate' => 'Basic realm="' . $realm . '"'];
60
+        $errorHeaders      = ['WWW-Authenticate' => 'Basic realm="'.$realm.'"'];
61 61
         if (empty($headerArray = $authorizationHeader) === false) {
62 62
             $errorCode = OAuthTokenBodyException::ERROR_INVALID_CLIENT;
63 63
             if (empty($authHeader = $headerArray[0]) === true ||
Please login to merge, or discard this patch.
src/Entities/Token.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -154,9 +154,9 @@  discard block
 block discarded – undo
154 154
     {
155 155
         if ($this->hasDynamicProperty(static::FIELD_ID) === true) {
156 156
             $this
157
-                ->setIdentifier((int)$this->{static::FIELD_ID})
157
+                ->setIdentifier((int) $this->{static::FIELD_ID})
158 158
                 ->setClientIdentifier($this->{static::FIELD_ID_CLIENT})
159
-                ->setUserIdentifier((int)$this->{static::FIELD_ID_USER})
159
+                ->setUserIdentifier((int) $this->{static::FIELD_ID_USER})
160 160
                 ->setRedirectUriString($this->{static::FIELD_REDIRECT_URI})
161 161
                 ->setCode($this->{static::FIELD_CODE})
162 162
                 ->setType($this->{static::FIELD_TYPE})
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     /**
172 172
      * @inheritdoc
173 173
      */
174
-    public function getIdentifier(): ?int
174
+    public function getIdentifier(): ? int
175 175
     {
176 176
         return $this->identifierField;
177 177
     }
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     /**
260 260
      * @inheritdoc
261 261
      */
262
-    public function getRedirectUriString(): ?string
262
+    public function getRedirectUriString(): ? string
263 263
     {
264 264
         return $this->redirectUriString;
265 265
     }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     /**
268 268
      * @inheritdoc
269 269
      */
270
-    public function setRedirectUriString(?string $uri): TokenInterface
270
+    public function setRedirectUriString(? string $uri) : TokenInterface
271 271
     {
272 272
         $this->redirectUriString = $uri;
273 273
 
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
     /**
342 342
      * @inheritdoc
343 343
      */
344
-    public function setCode(?string $code): TokenInterface
344
+    public function setCode(? string $code) : TokenInterface
345 345
     {
346 346
         $this->codeField = $code;
347 347
 
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
     /**
360 360
      * @inheritdoc
361 361
      */
362
-    public function setValue(?string $value): TokenInterface
362
+    public function setValue(? string $value) : TokenInterface
363 363
     {
364 364
         $this->valueField = $value;
365 365
 
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
     /**
370 370
      * @inheritdoc
371 371
      */
372
-    public function getType(): ?string
372
+    public function getType(): ? string
373 373
     {
374 374
         return $this->typeField;
375 375
     }
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
     /**
378 378
      * @inheritdoc
379 379
      */
380
-    public function setType(?string $type): TokenInterface
380
+    public function setType(? string $type) : TokenInterface
381 381
     {
382 382
         $this->typeField = $type;
383 383
 
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
     /**
396 396
      * @inheritdoc
397 397
      */
398
-    public function setRefreshValue(?string $refreshValue): TokenInterface
398
+    public function setRefreshValue(? string $refreshValue) : TokenInterface
399 399
     {
400 400
         $this->refreshValueField = $refreshValue;
401 401
 
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
     /**
406 406
      * @inheritdoc
407 407
      */
408
-    public function getCodeCreatedAt(): ?DateTimeInterface
408
+    public function getCodeCreatedAt(): ? DateTimeInterface
409 409
     {
410 410
         if ($this->codeCreatedAtField === null && ($codeCreatedAt = $this->{static::FIELD_CODE_CREATED_AT}) !== null) {
411 411
             $this->codeCreatedAtField = $this->parseDateTime($codeCreatedAt);
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
     /**
428 428
      * @inheritdoc
429 429
      */
430
-    public function getValueCreatedAt(): ?DateTimeInterface
430
+    public function getValueCreatedAt(): ? DateTimeInterface
431 431
     {
432 432
         if ($this->valueCreatedAtField === null &&
433 433
             ($tokenCreatedAt = $this->{static::FIELD_VALUE_CREATED_AT}) !== null
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
     /**
452 452
      * @inheritdoc
453 453
      */
454
-    public function getRefreshCreatedAt(): ?DateTimeInterface
454
+    public function getRefreshCreatedAt(): ? DateTimeInterface
455 455
     {
456 456
         if ($this->refreshCreatedAtField === null &&
457 457
             ($tokenCreatedAt = $this->{static::FIELD_VALUE_CREATED_AT}) !== null
Please login to merge, or discard this patch.
src/Entities/RedirectUri.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         if ($this->hasDynamicProperty(static::FIELD_ID) === true) {
65 65
             $this
66
-                ->setIdentifier((int)$this->{static::FIELD_ID})
66
+                ->setIdentifier((int) $this->{static::FIELD_ID})
67 67
                 ->setClientIdentifier($this->{static::FIELD_ID_CLIENT})
68 68
                 ->setValue($this->{static::FIELD_VALUE});
69 69
         }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     /**
73 73
      * @inheritdoc
74 74
      */
75
-    public function getIdentifier(): ?int
75
+    public function getIdentifier(): ? int
76 76
     {
77 77
         return $this->identifierField;
78 78
     }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     /**
91 91
      * @inheritdoc
92 92
      */
93
-    public function getClientIdentifier(): ?string
93
+    public function getClientIdentifier(): ? string
94 94
     {
95 95
         return $this->clientIdentifierField;
96 96
     }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     /**
109 109
      * @inheritdoc
110 110
      */
111
-    public function getValue(): ?string
111
+    public function getValue(): ? string
112 112
     {
113 113
         return $this->valueField;
114 114
     }
Please login to merge, or discard this patch.
src/Entities/DatabaseItem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     /**
49 49
      * @inheritdoc
50 50
      */
51
-    public function getCreatedAt(): ?DateTimeInterface
51
+    public function getCreatedAt(): ? DateTimeInterface
52 52
     {
53 53
         if ($this->createdAtField === null &&
54 54
             $this->hasDynamicProperty(static::FIELD_CREATED_AT) === true &&
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     /**
64 64
      * @inheritdoc
65 65
      */
66
-    public function getUpdatedAt(): ?DateTimeInterface
66
+    public function getUpdatedAt(): ? DateTimeInterface
67 67
     {
68 68
         if ($this->updatedAtField === null &&
69 69
             $this->hasDynamicProperty(static::FIELD_UPDATED_AT) === true &&
Please login to merge, or discard this patch.
src/Entities/Scope.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * @inheritdoc
57 57
      */
58
-    public function getIdentifier(): ?string
58
+    public function getIdentifier(): ? string
59 59
     {
60 60
         return $this->identifierField;
61 61
     }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     /**
74 74
      * @inheritdoc
75 75
      */
76
-    public function getDescription(): ?string
76
+    public function getDescription(): ? string
77 77
     {
78 78
         return $this->descriptionField;
79 79
     }
Please login to merge, or discard this patch.
src/Entities/DatabaseScheme.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
     /**
509 509
      * @inheritdoc
510 510
      */
511
-    public function getUsersView(): ?string
511
+    public function getUsersView(): ? string
512 512
     {
513 513
         return static::VIEW_USERS;
514 514
     }
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
     /**
517 517
      * @inheritdoc
518 518
      */
519
-    public function getUsersTable(): ?string
519
+    public function getUsersTable(): ? string
520 520
     {
521 521
         return $this->usersTableName;
522 522
     }
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
     /**
525 525
      * @inheritdoc
526 526
      */
527
-    public function getUsersIdentityColumn(): ?string
527
+    public function getUsersIdentityColumn(): ? string
528 528
     {
529 529
         return $this->usersIdColumn;
530 530
     }
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
     /**
533 533
      * @inheritdoc
534 534
      */
535
-    public function getPassportView(): ?string
535
+    public function getPassportView(): ? string
536 536
     {
537 537
         return static::VIEW_PASSPORT;
538 538
     }
Please login to merge, or discard this patch.
src/Entities/Client.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     /**
190 190
      * @inheritdoc
191 191
      */
192
-    public function getName(): ?string
192
+    public function getName(): ? string
193 193
     {
194 194
         return $this->nameField;
195 195
     }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     /**
208 208
      * @inheritdoc
209 209
      */
210
-    public function getDescription(): ?string
210
+    public function getDescription(): ? string
211 211
     {
212 212
         return $this->descriptionField;
213 213
     }
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     /**
226 226
      * @inheritdoc
227 227
      */
228
-    public function getCredentials(): ?string
228
+    public function getCredentials(): ? string
229 229
     {
230 230
         return $this->credentialsField;
231 231
     }
Please login to merge, or discard this patch.