@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $this->element = new TraitType($name); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - public function addMember(Method|Property|Constant|TraitUse $member): static |
|
| 26 | + public function addMember(Method | Property | Constant | TraitUse $member): static |
|
| 27 | 27 | { |
| 28 | 28 | $this->element->addMember($member->getElement()); |
| 29 | 29 | |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | { |
| 11 | 11 | public function __construct( |
| 12 | 12 | protected FilesInterface $files |
| 13 | - ) { |
|
| 13 | + ){ |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function write(string $filename, FileDeclaration $file): bool |
@@ -63,7 +63,8 @@ |
||
| 63 | 63 | |
| 64 | 64 | public function addNamespace(string|PhpNamespace $namespace): PhpNamespace |
| 65 | 65 | { |
| 66 | - if ($namespace instanceof PhpNamespace) { |
|
| 66 | + if ($namespace instanceof PhpNamespace) |
|
| 67 | + { |
|
| 67 | 68 | $this->element->addNamespace($namespace->getElement()); |
| 68 | 69 | |
| 69 | 70 | return $namespace; |
@@ -53,9 +53,9 @@ |
||
| 53 | 53 | return self::fromElement((new Factory())->fromCode(\file_get_contents($reflection->getFileName()))); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - public function addNamespace(string|PhpNamespace $namespace): PhpNamespace |
|
| 56 | + public function addNamespace(string | PhpNamespace $namespace): PhpNamespace |
|
| 57 | 57 | { |
| 58 | - if ($namespace instanceof PhpNamespace) { |
|
| 58 | + if ($namespace instanceof PhpNamespace){ |
|
| 59 | 59 | $this->element->addNamespace($namespace->getElement()); |
| 60 | 60 | |
| 61 | 61 | return $namespace; |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | |
| 12 | 12 | final class ValidationProviderTest extends TestCase |
| 13 | 13 | { |
| 14 | - private m\MockInterface|InvokerInterface $invoker; |
|
| 14 | + private m\MockInterface | InvokerInterface $invoker; |
|
| 15 | 15 | private ValidationProvider $provider; |
| 16 | 16 | |
| 17 | 17 | protected function setUp(): void |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | /** |
| 15 | 15 | * Create validator copy with new data set. |
| 16 | 16 | */ |
| 17 | - public function withData(array|object $data): ValidatorInterface; |
|
| 17 | + public function withData(array | object $data): ValidatorInterface; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * Receive field from context data or return default value. |
@@ -17,5 +17,5 @@ |
||
| 17 | 17 | * @param mixed $context Validation context (available for checkers and validation |
| 18 | 18 | * methods but is not validated). |
| 19 | 19 | */ |
| 20 | - public function validate(array|object $data, array $rules, mixed $context = null): ValidatorInterface; |
|
| 20 | + public function validate(array | object $data, array $rules, mixed $context = null): ValidatorInterface; |
|
| 21 | 21 | } |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | public function __construct( |
| 10 | 10 | private readonly SessionScope $session, |
| 11 | 11 | private readonly string $name |
| 12 | - ) { |
|
| 12 | + ){ |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | /** |
@@ -11,8 +11,8 @@ discard block |
||
| 11 | 11 | public function __construct( |
| 12 | 12 | private readonly string $id, |
| 13 | 13 | private readonly array $payload, |
| 14 | - private readonly ?\DateTimeInterface $expiresAt = null |
|
| 15 | - ) { |
|
| 14 | + private readonly ? \DateTimeInterface $expiresAt = null |
|
| 15 | + ){ |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | public function getID(): string |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | public static function unpack(array $data): Token |
| 51 | 51 | { |
| 52 | 52 | $expiresAt = null; |
| 53 | - if ($data['expiresAt'] !== null) { |
|
| 53 | + if ($data['expiresAt'] !== null){ |
|
| 54 | 54 | $expiresAt = (new \DateTimeImmutable())->setTimestamp($data['expiresAt']); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -50,7 +50,8 @@ |
||
| 50 | 50 | public static function unpack(array $data): Token |
| 51 | 51 | { |
| 52 | 52 | $expiresAt = null; |
| 53 | - if ($data['expiresAt'] !== null) { |
|
| 53 | + if ($data['expiresAt'] !== null) |
|
| 54 | + { |
|
| 54 | 55 | $expiresAt = (new \DateTimeImmutable())->setTimestamp($data['expiresAt']); |
| 55 | 56 | } |
| 56 | 57 | |
@@ -68,9 +68,12 @@ |
||
| 68 | 68 | |
| 69 | 69 | private function getAuthContext(): AuthContextInterface |
| 70 | 70 | { |
| 71 | - try { |
|
| 71 | + try |
|
| 72 | + { |
|
| 72 | 73 | return $this->container->get(AuthContextInterface::class); |
| 73 | - } catch (NotFoundExceptionInterface $e) { |
|
| 74 | + } |
|
| 75 | + catch (NotFoundExceptionInterface $e) |
|
| 76 | + { |
|
| 74 | 77 | throw new ScopeException('Unable to resolve auth context, invalid scope', $e->getCode(), $e); |
| 75 | 78 | } |
| 76 | 79 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | { |
| 18 | 18 | public function __construct( |
| 19 | 19 | #[Proxy] private readonly ContainerInterface $container |
| 20 | - ) { |
|
| 20 | + ){ |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -70,9 +70,9 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | private function getAuthContext(): AuthContextInterface |
| 72 | 72 | { |
| 73 | - try { |
|
| 73 | + try{ |
|
| 74 | 74 | return $this->container->get(AuthContextInterface::class); |
| 75 | - } catch (NotFoundExceptionInterface $e) { |
|
| 75 | + }catch (NotFoundExceptionInterface $e){ |
|
| 76 | 76 | throw new ScopeException('Unable to resolve auth context, invalid scope', $e->getCode(), $e); |
| 77 | 77 | } |
| 78 | 78 | } |