@@ -68,7 +68,7 @@ |
||
68 | 68 | $this->assertSame([], $entity->getValue()); |
69 | 69 | |
70 | 70 | $entity['a'] = 90; |
71 | - foreach ($entity as $key => $value) { |
|
71 | + foreach ($entity as $key => $value){ |
|
72 | 72 | $this->assertSame('a', $key); |
73 | 73 | $this->assertSame(90, $value); |
74 | 74 | } |
@@ -68,7 +68,8 @@ |
||
68 | 68 | $this->assertSame([], $entity->getValue()); |
69 | 69 | |
70 | 70 | $entity['a'] = 90; |
71 | - foreach ($entity as $key => $value) { |
|
71 | + foreach ($entity as $key => $value) |
|
72 | + { |
|
72 | 73 | $this->assertSame('a', $key); |
73 | 74 | $this->assertSame(90, $value); |
74 | 75 | } |
@@ -87,7 +87,7 @@ |
||
87 | 87 | $this->assertSame(static::OPERATION, $guarded->resolvePermission(static::OPERATION)); |
88 | 88 | |
89 | 89 | $guarded = new GuardedWithNamespace(); |
90 | - $resolvedPermission = GuardedWithNamespace::GUARD_NAMESPACE . '.' . static::OPERATION; |
|
90 | + $resolvedPermission = GuardedWithNamespace::GUARD_NAMESPACE.'.'.static::OPERATION; |
|
91 | 91 | $this->assertSame($resolvedPermission, $guarded->resolvePermission(static::OPERATION)); |
92 | 92 | } |
93 | 93 | } |
@@ -76,7 +76,8 @@ |
||
76 | 76 | |
77 | 77 | $this->rules->method('has')->willReturn(true); |
78 | 78 | $this->rules->method('get') |
79 | - ->willReturnCallback(function (...$args) use (&$series) { |
|
79 | + ->willReturnCallback(function (...$args) use (&$series) |
|
80 | + { |
|
80 | 81 | [$expectedArgs, $return] = \array_shift($series); |
81 | 82 | $this->assertSame($expectedArgs, $args); |
82 | 83 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $this->assertNotSame('test string', $encrypted); |
54 | 54 | $this->assertEquals('test string', $encrypter->decrypt($encrypted)); |
55 | 55 | |
56 | - $encrypter->decrypt('badData.' . $encrypted); |
|
56 | + $encrypter->decrypt('badData.'.$encrypted); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | public function testBadKey(): void |
@@ -78,7 +78,7 @@ |
||
78 | 78 | $this->getContainer()->removeBinding(CoreInterface::class); |
79 | 79 | |
80 | 80 | $core = $target->getHandler($this->getContainer(), []); |
81 | - $handler = (fn(CoreHandler $core): HandlerInterface|CoreInterface => $core->core)->call($core, $core); |
|
81 | + $handler = (fn(CoreHandler $core): HandlerInterface | CoreInterface => $core->core)->call($core, $core); |
|
82 | 82 | |
83 | 83 | $this->assertInstanceOf(AutowireHandler::class, $handler); |
84 | 84 | } |
@@ -91,9 +91,9 @@ discard block |
||
91 | 91 | new ExceptionInterceptor(), |
92 | 92 | ], $this->createMock(CoreInterface::class)); |
93 | 93 | |
94 | - try { |
|
94 | + try{ |
|
95 | 95 | $pipeline->callAction('controller', 'action'); |
96 | - } catch (\RuntimeException) { |
|
96 | + }catch (\RuntimeException){ |
|
97 | 97 | // Attributes won't be lost after legacy interceptor |
98 | 98 | $this->assertSame(['key' => 'value'], $state->context->getAttributes()); |
99 | 99 | } |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | */ |
125 | 125 | private function createPipeline( |
126 | 126 | array $interceptors = [], |
127 | - CoreInterface|HandlerInterface|null $lastHandler = null, |
|
128 | - EventDispatcherInterface|null $dispatcher = null, |
|
127 | + CoreInterface | HandlerInterface | null $lastHandler = null, |
|
128 | + EventDispatcherInterface | null $dispatcher = null, |
|
129 | 129 | ): InterceptorPipeline |
130 | 130 | { |
131 | 131 | $pipeline = new InterceptorPipeline($dispatcher); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $lastHandler instanceof CoreInterface and $pipeline = $pipeline->withCore($lastHandler); |
134 | 134 | $lastHandler instanceof HandlerInterface and $pipeline = $pipeline->withHandler($lastHandler); |
135 | 135 | |
136 | - foreach ($interceptors as $interceptor) { |
|
136 | + foreach ($interceptors as $interceptor){ |
|
137 | 137 | $pipeline->addInterceptor($interceptor); |
138 | 138 | } |
139 | 139 |
@@ -91,9 +91,12 @@ discard block |
||
91 | 91 | new ExceptionInterceptor(), |
92 | 92 | ], $this->createMock(CoreInterface::class)); |
93 | 93 | |
94 | - try { |
|
94 | + try |
|
95 | + { |
|
95 | 96 | $pipeline->callAction('controller', 'action'); |
96 | - } catch (\RuntimeException) { |
|
97 | + } |
|
98 | + catch (\RuntimeException) |
|
99 | + { |
|
97 | 100 | // Attributes won't be lost after legacy interceptor |
98 | 101 | $this->assertSame(['key' => 'value'], $state->context->getAttributes()); |
99 | 102 | } |
@@ -133,7 +136,8 @@ discard block |
||
133 | 136 | $lastHandler instanceof CoreInterface and $pipeline = $pipeline->withCore($lastHandler); |
134 | 137 | $lastHandler instanceof HandlerInterface and $pipeline = $pipeline->withHandler($lastHandler); |
135 | 138 | |
136 | - foreach ($interceptors as $interceptor) { |
|
139 | + foreach ($interceptors as $interceptor) |
|
140 | + { |
|
137 | 141 | $pipeline->addInterceptor($interceptor); |
138 | 142 | } |
139 | 143 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | public function setUp(): void |
31 | 31 | { |
32 | - if (!\class_exists(Kernel::class)) { |
|
32 | + if (!\class_exists(Kernel::class)){ |
|
33 | 33 | $this->markTestSkipped('A "spiral/framework" dependency is required to run these tests'); |
34 | 34 | } |
35 | 35 | |
@@ -40,16 +40,16 @@ discard block |
||
40 | 40 | 'cache' => sys_get_temp_dir() |
41 | 41 | ], false)->run(); |
42 | 42 | |
43 | - $this->storage = new Storage($this->dir() . '/Fixtures/'); |
|
43 | + $this->storage = new Storage($this->dir().'/Fixtures/'); |
|
44 | 44 | |
45 | - foreach (static::STORE as $name) { |
|
45 | + foreach (static::STORE as $name){ |
|
46 | 46 | $this->storage->store($name); |
47 | 47 | } |
48 | 48 | } |
49 | 49 | |
50 | 50 | public function tearDown(): void |
51 | 51 | { |
52 | - foreach (static::STORE as $name) { |
|
52 | + foreach (static::STORE as $name){ |
|
53 | 53 | $this->storage->restore($name); |
54 | 54 | } |
55 | 55 | } |
@@ -29,7 +29,8 @@ discard block |
||
29 | 29 | |
30 | 30 | public function setUp(): void |
31 | 31 | { |
32 | - if (!\class_exists(Kernel::class)) { |
|
32 | + if (!\class_exists(Kernel::class)) |
|
33 | + { |
|
33 | 34 | $this->markTestSkipped('A "spiral/framework" dependency is required to run these tests'); |
34 | 35 | } |
35 | 36 | |
@@ -42,14 +43,16 @@ discard block |
||
42 | 43 | |
43 | 44 | $this->storage = new Storage($this->dir() . '/Fixtures/'); |
44 | 45 | |
45 | - foreach (static::STORE as $name) { |
|
46 | + foreach (static::STORE as $name) |
|
47 | + { |
|
46 | 48 | $this->storage->store($name); |
47 | 49 | } |
48 | 50 | } |
49 | 51 | |
50 | 52 | public function tearDown(): void |
51 | 53 | { |
52 | - foreach (static::STORE as $name) { |
|
54 | + foreach (static::STORE as $name) |
|
55 | + { |
|
53 | 56 | $this->storage->restore($name); |
54 | 57 | } |
55 | 58 | } |