@@ -43,9 +43,12 @@ discard block |
||
| 43 | 43 | $this->requested[$node->name->name] = $node->name->name; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if ($node instanceof Node\Stmt\Property) { |
|
| 47 | - foreach ($node->props as $prop) { |
|
| 48 | - if ($prop instanceof Node\Stmt\PropertyProperty) { |
|
| 46 | + if ($node instanceof Node\Stmt\Property) |
|
| 47 | + { |
|
| 48 | + foreach ($node->props as $prop) |
|
| 49 | + { |
|
| 50 | + if ($prop instanceof Node\Stmt\PropertyProperty) |
|
| 51 | + { |
|
| 49 | 52 | $this->properties[$prop->name->name] = $prop->name->name; |
| 50 | 53 | } |
| 51 | 54 | } |
@@ -56,7 +59,8 @@ discard block |
||
| 56 | 59 | |
| 57 | 60 | private function promotedProperties(Node $node): void |
| 58 | 61 | { |
| 59 | - if (!$node instanceof Node\Param || !$node->var instanceof Node\Expr\Variable) { |
|
| 62 | + if (!$node instanceof Node\Param || !$node->var instanceof Node\Expr\Variable) |
|
| 63 | + { |
|
| 60 | 64 | return; |
| 61 | 65 | } |
| 62 | 66 | |
@@ -38,13 +38,13 @@ discard block |
||
| 38 | 38 | $node->var instanceof Node\Expr\Variable && |
| 39 | 39 | $node->var->name === 'this' && |
| 40 | 40 | $node->name instanceof Node\Identifier |
| 41 | - ) { |
|
| 41 | + ){ |
|
| 42 | 42 | $this->requested[$node->name->name] = $node->name->name; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - if ($node instanceof Node\Stmt\Property) { |
|
| 46 | - foreach ($node->props as $prop) { |
|
| 47 | - if ($prop instanceof Node\Stmt\PropertyProperty) { |
|
| 45 | + if ($node instanceof Node\Stmt\Property){ |
|
| 46 | + foreach ($node->props as $prop){ |
|
| 47 | + if ($prop instanceof Node\Stmt\PropertyProperty){ |
|
| 48 | 48 | $this->properties[$prop->name->name] = $prop->name->name; |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | private function promotedProperties(Node $node): void |
| 57 | 57 | { |
| 58 | - if (!$node instanceof Node\Param || !$node->var instanceof Node\Expr\Variable) { |
|
| 58 | + if (!$node instanceof Node\Param || !$node->var instanceof Node\Expr\Variable){ |
|
| 59 | 59 | return; |
| 60 | 60 | } |
| 61 | 61 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $node->flags & Node\Stmt\Class_::MODIFIER_PUBLIC || |
| 64 | 64 | $node->flags & Node\Stmt\Class_::MODIFIER_PROTECTED || |
| 65 | 65 | $node->flags & Node\Stmt\Class_::MODIFIER_PRIVATE |
| 66 | - ) { |
|
| 66 | + ){ |
|
| 67 | 67 | $this->properties[$node->var->name] = $node->var->name; |
| 68 | 68 | } |
| 69 | 69 | } |
@@ -16,5 +16,5 @@ |
||
| 16 | 16 | * |
| 17 | 17 | * @return \ReflectionEnum[] |
| 18 | 18 | */ |
| 19 | - public function getScopedEnums(string $scope, object|string|null $target = null): array; |
|
| 19 | + public function getScopedEnums(string $scope, object | string | null $target = null): array; |
|
| 20 | 20 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function invoke(TokenizationListenerInterface $listener, iterable $classes): void |
| 18 | 18 | { |
| 19 | - foreach ($classes as $class) { |
|
| 19 | + foreach ($classes as $class){ |
|
| 20 | 20 | $listener->listen($class); |
| 21 | 21 | } |
| 22 | 22 | } |
@@ -16,7 +16,8 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function invoke(TokenizationListenerInterface $listener, iterable $classes): void |
| 18 | 18 | { |
| 19 | - foreach ($classes as $class) { |
|
| 19 | + foreach ($classes as $class) |
|
| 20 | + { |
|
| 20 | 21 | $listener->listen($class); |
| 21 | 22 | } |
| 22 | 23 | } |
@@ -17,5 +17,5 @@ |
||
| 17 | 17 | * results. |
| 18 | 18 | * @return \ReflectionClass[] |
| 19 | 19 | */ |
| 20 | - public function getScopedInterfaces(string $scope, string|null $target = null): array; |
|
| 20 | + public function getScopedInterfaces(string $scope, string | null $target = null): array; |
|
| 21 | 21 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | private readonly InterfaceLocatorByTarget $locator, |
| 19 | 19 | ListenerInvoker $invoker, |
| 20 | 20 | bool $readCache = true, |
| 21 | - ) { |
|
| 21 | + ){ |
|
| 22 | 22 | parent::__construct($reader, $memory, $invoker, $readCache); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | private readonly EnumLocatorByTarget $locator, |
| 19 | 19 | ListenerInvoker $invoker, |
| 20 | 20 | bool $readCache = true, |
| 21 | - ) { |
|
| 21 | + ){ |
|
| 22 | 22 | parent::__construct($reader, $memory, $invoker, $readCache); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | private readonly ClassLocatorByTarget $locator, |
| 17 | 17 | ListenerInvoker $invoker, |
| 18 | 18 | bool $readCache = true, |
| 19 | - ) { |
|
| 19 | + ){ |
|
| 20 | 20 | parent::__construct($reader, $memory, $invoker, $readCache); |
| 21 | 21 | } |
| 22 | 22 | |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | use MockeryPHPUnitIntegration; |
| 23 | 23 | |
| 24 | 24 | private EnumLocatorByTarget $locator; |
| 25 | - private EnumsInterface|m\LegacyMockInterface|m\MockInterface $classes; |
|
| 26 | - private ScopedEnumsInterface|m\LegacyMockInterface|m\MockInterface $scopedClasses; |
|
| 25 | + private EnumsInterface | m\LegacyMockInterface | m\MockInterface $classes; |
|
| 26 | + private ScopedEnumsInterface | m\LegacyMockInterface | m\MockInterface $scopedClasses; |
|
| 27 | 27 | |
| 28 | 28 | protected function setUp(): void |
| 29 | 29 | { |
@@ -79,11 +79,11 @@ discard block |
||
| 79 | 79 | $attr = $attr->getAttributes()[0]; |
| 80 | 80 | $attribute = $attr->newInstance(); |
| 81 | 81 | |
| 82 | - if ($attribute->getScope() === null) { |
|
| 82 | + if ($attribute->getScope() === null){ |
|
| 83 | 83 | $this->classes |
| 84 | 84 | ->shouldReceive('getEnums') |
| 85 | 85 | ->andReturn($enums); |
| 86 | - } else { |
|
| 86 | + }else{ |
|
| 87 | 87 | $this->scopedClasses |
| 88 | 88 | ->shouldReceive('getScopedEnums') |
| 89 | 89 | ->with($attribute->getScope()) |
@@ -79,11 +79,14 @@ |
||
| 79 | 79 | $attr = $attr->getAttributes()[0]; |
| 80 | 80 | $attribute = $attr->newInstance(); |
| 81 | 81 | |
| 82 | - if ($attribute->getScope() === null) { |
|
| 82 | + if ($attribute->getScope() === null) |
|
| 83 | + { |
|
| 83 | 84 | $this->classes |
| 84 | 85 | ->shouldReceive('getEnums') |
| 85 | 86 | ->andReturn($enums); |
| 86 | - } else { |
|
| 87 | + } |
|
| 88 | + else |
|
| 89 | + { |
|
| 87 | 90 | $this->scopedClasses |
| 88 | 91 | ->shouldReceive('getScopedEnums') |
| 89 | 92 | ->with($attribute->getScope()) |
@@ -25,8 +25,8 @@ discard block |
||
| 25 | 25 | use MockeryPHPUnitIntegration; |
| 26 | 26 | |
| 27 | 27 | private InterfaceLocatorByTarget $locator; |
| 28 | - private InterfacesInterface|m\LegacyMockInterface|m\MockInterface $interfaces; |
|
| 29 | - private ScopedInterfacesInterface|m\LegacyMockInterface|m\MockInterface $scopedInterfaces; |
|
| 28 | + private InterfacesInterface | m\LegacyMockInterface | m\MockInterface $interfaces; |
|
| 29 | + private ScopedInterfacesInterface | m\LegacyMockInterface | m\MockInterface $scopedInterfaces; |
|
| 30 | 30 | |
| 31 | 31 | protected function setUp(): void |
| 32 | 32 | { |
@@ -105,11 +105,11 @@ discard block |
||
| 105 | 105 | $attr = $attr->getAttributes()[0]; |
| 106 | 106 | $attribute = $attr->newInstance(); |
| 107 | 107 | |
| 108 | - if ($attribute->getScope() === null) { |
|
| 108 | + if ($attribute->getScope() === null){ |
|
| 109 | 109 | $this->interfaces |
| 110 | 110 | ->shouldReceive('getInterfaces') |
| 111 | 111 | ->andReturn($interfaces); |
| 112 | - } else { |
|
| 112 | + }else{ |
|
| 113 | 113 | $this->scopedInterfaces |
| 114 | 114 | ->shouldReceive('getScopedInterfaces') |
| 115 | 115 | ->with($attribute->getScope()) |
@@ -105,11 +105,14 @@ |
||
| 105 | 105 | $attr = $attr->getAttributes()[0]; |
| 106 | 106 | $attribute = $attr->newInstance(); |
| 107 | 107 | |
| 108 | - if ($attribute->getScope() === null) { |
|
| 108 | + if ($attribute->getScope() === null) |
|
| 109 | + { |
|
| 109 | 110 | $this->interfaces |
| 110 | 111 | ->shouldReceive('getInterfaces') |
| 111 | 112 | ->andReturn($interfaces); |
| 112 | - } else { |
|
| 113 | + } |
|
| 114 | + else |
|
| 115 | + { |
|
| 113 | 116 | $this->scopedInterfaces |
| 114 | 117 | ->shouldReceive('getScopedInterfaces') |
| 115 | 118 | ->with($attribute->getScope()) |