@@ -26,7 +26,7 @@ |
||
| 26 | 26 | string $clientFilename = null, |
| 27 | 27 | string $clientMediaType = null |
| 28 | 28 | ): UploadedFileInterface { |
| 29 | - if ($size === null) { |
|
| 29 | + if ($size === null){ |
|
| 30 | 30 | $size = $stream->getSize(); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -26,7 +26,8 @@ |
||
| 26 | 26 | string $clientFilename = null, |
| 27 | 27 | string $clientMediaType = null |
| 28 | 28 | ): UploadedFileInterface { |
| 29 | - if ($size === null) { |
|
| 29 | + if ($size === null) |
|
| 30 | + { |
|
| 30 | 31 | $size = $stream->getSize(); |
| 31 | 32 | } |
| 32 | 33 | |
@@ -44,9 +44,9 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | $http->setHandler( |
| 46 | 46 | static function (ServerRequestInterface $request, ResponseInterface $response): void { |
| 47 | - if ($request->getAttribute('authContext')->getToken() === null) { |
|
| 47 | + if ($request->getAttribute('authContext')->getToken() === null){ |
|
| 48 | 48 | echo 'no token'; |
| 49 | - } else { |
|
| 49 | + }else{ |
|
| 50 | 50 | echo $request->getAttribute('authContext')->getToken()->getID(); |
| 51 | 51 | echo ':'; |
| 52 | 52 | echo json_encode($request->getAttribute('authContext')->getToken()->getPayload()); |
@@ -76,9 +76,9 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | $http->setHandler( |
| 78 | 78 | static function (ServerRequestInterface $request, ResponseInterface $response): void { |
| 79 | - if ($request->getAttribute('authContext')->getToken() === null) { |
|
| 79 | + if ($request->getAttribute('authContext')->getToken() === null){ |
|
| 80 | 80 | echo 'no token'; |
| 81 | - } else { |
|
| 81 | + }else{ |
|
| 82 | 82 | echo $request->getAttribute('authContext')->getToken()->getID(); |
| 83 | 83 | echo ':'; |
| 84 | 84 | echo json_encode($request->getAttribute('authContext')->getToken()->getPayload()); |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | ); |
| 192 | 192 | |
| 193 | 193 | self::assertSame( |
| 194 | - 'Expires=' . gmdate(DATE_COOKIE, time() + 3600), |
|
| 194 | + 'Expires='.gmdate(DATE_COOKIE, time() + 3600), |
|
| 195 | 195 | $cookie[1] |
| 196 | 196 | ); |
| 197 | 197 | |
@@ -43,9 +43,12 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | $http->setHandler( |
| 45 | 45 | static function (ServerRequestInterface $request, ResponseInterface $response): void { |
| 46 | - if ($request->getAttribute('authContext')->getToken() === null) { |
|
| 46 | + if ($request->getAttribute('authContext')->getToken() === null) |
|
| 47 | + { |
|
| 47 | 48 | echo 'no token'; |
| 48 | - } else { |
|
| 49 | + } |
|
| 50 | + else |
|
| 51 | + { |
|
| 49 | 52 | echo $request->getAttribute('authContext')->getToken()->getID(); |
| 50 | 53 | echo ':'; |
| 51 | 54 | echo json_encode($request->getAttribute('authContext')->getToken()->getPayload()); |
@@ -67,9 +70,12 @@ discard block |
||
| 67 | 70 | |
| 68 | 71 | $http->setHandler( |
| 69 | 72 | static function (ServerRequestInterface $request, ResponseInterface $response): void { |
| 70 | - if ($request->getAttribute('authContext')->getToken() === null) { |
|
| 73 | + if ($request->getAttribute('authContext')->getToken() === null) |
|
| 74 | + { |
|
| 71 | 75 | echo 'no token'; |
| 72 | - } else { |
|
| 76 | + } |
|
| 77 | + else |
|
| 78 | + { |
|
| 73 | 79 | echo $request->getAttribute('authContext')->getToken()->getID(); |
| 74 | 80 | echo ':'; |
| 75 | 81 | echo json_encode($request->getAttribute('authContext')->getToken()->getPayload()); |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | { |
| 19 | 19 | public function getActor(TokenInterface $token): ?object |
| 20 | 20 | { |
| 21 | - if ($token->getPayload()['ok']) { |
|
| 21 | + if ($token->getPayload()['ok']){ |
|
| 22 | 22 | return new \stdClass(); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -18,7 +18,8 @@ |
||
| 18 | 18 | { |
| 19 | 19 | public function getActor(TokenInterface $token): ?object |
| 20 | 20 | { |
| 21 | - if ($token->getPayload()['ok']) { |
|
| 21 | + if ($token->getPayload()['ok']) |
|
| 22 | + { |
|
| 22 | 23 | return new \stdClass(); |
| 23 | 24 | } |
| 24 | 25 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | { |
| 19 | 19 | public function getActor(TokenInterface $token): ?object |
| 20 | 20 | { |
| 21 | - if ($token->getID() === 'ok') { |
|
| 21 | + if ($token->getID() === 'ok'){ |
|
| 22 | 22 | return new \stdClass(); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -18,7 +18,8 @@ |
||
| 18 | 18 | { |
| 19 | 19 | public function getActor(TokenInterface $token): ?object |
| 20 | 20 | { |
| 21 | - if ($token->getID() === 'ok') { |
|
| 21 | + if ($token->getID() === 'ok') |
|
| 22 | + { |
|
| 22 | 23 | return new \stdClass(); |
| 23 | 24 | } |
| 24 | 25 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | { |
| 19 | 19 | public function load(string $id): ?TokenInterface |
| 20 | 20 | { |
| 21 | - if ($id === 'bad') { |
|
| 21 | + if ($id === 'bad'){ |
|
| 22 | 22 | return null; |
| 23 | 23 | } |
| 24 | 24 | |
@@ -18,7 +18,8 @@ |
||
| 18 | 18 | { |
| 19 | 19 | public function load(string $id): ?TokenInterface |
| 20 | 20 | { |
| 21 | - if ($id === 'bad') { |
|
| 21 | + if ($id === 'bad') |
|
| 22 | + { |
|
| 22 | 23 | return null; |
| 23 | 24 | } |
| 24 | 25 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | protected function someFunction() |
| 20 | 20 | { |
| 21 | 21 | $result = $this->sampleMethod('hello world'); |
| 22 | - print_r(self::sampleMethod($result . 'plus')); |
|
| 22 | + print_r(self::sampleMethod($result.'plus')); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | public function testInstance() |
@@ -27,12 +27,15 @@ |
||
| 27 | 27 | $functionA = null; |
| 28 | 28 | $functionB = null; |
| 29 | 29 | |
| 30 | - foreach ($reflection->getInvocations() as $invocation) { |
|
| 31 | - if ($invocation->getName() == 'test_function_a') { |
|
| 30 | + foreach ($reflection->getInvocations() as $invocation) |
|
| 31 | + { |
|
| 32 | + if ($invocation->getName() == 'test_function_a') |
|
| 33 | + { |
|
| 32 | 34 | $functionA = $invocation; |
| 33 | 35 | } |
| 34 | 36 | |
| 35 | - if ($invocation->getName() == 'test_function_b') { |
|
| 37 | + if ($invocation->getName() == 'test_function_b') |
|
| 38 | + { |
|
| 36 | 39 | $functionB = $invocation; |
| 37 | 40 | } |
| 38 | 41 | } |
@@ -16,17 +16,17 @@ discard block |
||
| 16 | 16 | $this->assertContains(TestTrait::class, $reflection->getTraits()); |
| 17 | 17 | $this->assertContains(TestInterface::class, $reflection->getInterfaces()); |
| 18 | 18 | |
| 19 | - $this->assertSame([__NAMESPACE__ . '\hello'], $reflection->getFunctions()); |
|
| 19 | + $this->assertSame([__NAMESPACE__.'\hello'], $reflection->getFunctions()); |
|
| 20 | 20 | |
| 21 | 21 | $functionA = null; |
| 22 | 22 | $functionB = null; |
| 23 | 23 | |
| 24 | - foreach ($reflection->getInvocations() as $invocation) { |
|
| 25 | - if ($invocation->getName() == 'test_function_a') { |
|
| 24 | + foreach ($reflection->getInvocations() as $invocation){ |
|
| 25 | + if ($invocation->getName() == 'test_function_a'){ |
|
| 26 | 26 | $functionA = $invocation; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - if ($invocation->getName() == 'test_function_b') { |
|
| 29 | + if ($invocation->getName() == 'test_function_b'){ |
|
| 30 | 30 | $functionB = $invocation; |
| 31 | 31 | } |
| 32 | 32 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | public function testReflectionFileWithNamedParameters(): void |
| 55 | 55 | { |
| 56 | - $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassWithNamedParameter.php'); |
|
| 56 | + $reflection = new ReflectionFile(__DIR__.'/Classes/ClassWithNamedParameter.php'); |
|
| 57 | 57 | |
| 58 | 58 | $this->assertSame([ |
| 59 | 59 | 'Spiral\Tests\Tokenizer\Classes\ClassWithNamedParameter', |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | public function testReflectionFileAnonymousClass(): void |
| 64 | 64 | { |
| 65 | - $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassWithAnonymousClass.php'); |
|
| 65 | + $reflection = new ReflectionFile(__DIR__.'/Classes/ClassWithAnonymousClass.php'); |
|
| 66 | 66 | |
| 67 | 67 | $this->assertSame([ |
| 68 | 68 | 'Spiral\Tests\Tokenizer\Classes\ClassWithAnonymousClass', |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | public function testReflectionFileWithHeredoc(): void |
| 73 | 73 | { |
| 74 | - $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassWithHeredoc.php'); |
|
| 74 | + $reflection = new ReflectionFile(__DIR__.'/Classes/ClassWithHeredoc.php'); |
|
| 75 | 75 | |
| 76 | 76 | $this->assertSame([ |
| 77 | 77 | 'Spiral\Tests\Tokenizer\Classes\ClassWithHeredoc', |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | $container = new Container(); |
| 78 | 78 | $container->bind(TranslatorConfig::class, new TranslatorConfig([ |
| 79 | 79 | 'locale' => 'en', |
| 80 | - 'directory' => __DIR__ . '/fixtures/locales/', |
|
| 80 | + 'directory' => __DIR__.'/fixtures/locales/', |
|
| 81 | 81 | 'loaders' => [ |
| 82 | 82 | 'php' => PhpFileLoader::class, |
| 83 | 83 | 'po' => PoFileLoader::class, |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | $this->container->bind(TranslatorConfig::class, new TranslatorConfig([ |
| 46 | 46 | 'locale' => 'en', |
| 47 | - 'directory' => __DIR__ . '/fixtures/locales/', |
|
| 47 | + 'directory' => __DIR__.'/fixtures/locales/', |
|
| 48 | 48 | 'loaders' => [ |
| 49 | 49 | 'php' => PhpFileLoader::class, |
| 50 | 50 | 'po' => PoFileLoader::class, |