| @@ -16,7 +16,8 @@ | ||
| 16 | 16 |      { | 
| 17 | 17 |          $output = $this->runCommand('php:extensions'); | 
| 18 | 18 | |
| 19 | -        foreach (get_loaded_extensions() as $extension) { | |
| 19 | + foreach (get_loaded_extensions() as $extension) | |
| 20 | +        { | |
| 20 | 21 | $this->assertContains($extension, $output); | 
| 21 | 22 | } | 
| 22 | 23 | } | 
| @@ -31,12 +31,14 @@ | ||
| 31 | 31 | |
| 32 | 32 | $fs = new Files(); | 
| 33 | 33 | |
| 34 | -        if ($fs->isDirectory(__DIR__ . '/../app/migrations')) { | |
| 34 | + if ($fs->isDirectory(__DIR__ . '/../app/migrations')) | |
| 35 | +        { | |
| 35 | 36 | $fs->deleteDirectory(__DIR__ . '/../app/migrations'); | 
| 36 | 37 | } | 
| 37 | 38 | |
| 38 | 39 |          $runtime = $this->app->get(DirectoriesInterface::class)->get('runtime'); | 
| 39 | -        if ($fs->isDirectory($runtime)) { | |
| 40 | + if ($fs->isDirectory($runtime)) | |
| 41 | +        { | |
| 40 | 42 | $fs->deleteDirectory($runtime); | 
| 41 | 43 | } | 
| 42 | 44 | } | 
| @@ -133,7 +133,8 @@ | ||
| 133 | 133 | string $footer, | 
| 134 | 134 | array $options | 
| 135 | 135 |      ): Append { | 
| 136 | -        if (is_array($sequence) || $sequence instanceof \Closure) { | |
| 136 | + if (is_array($sequence) || $sequence instanceof \Closure) | |
| 137 | +        { | |
| 137 | 138 | return new Append( | 
| 138 | 139 | $target, | 
| 139 | 140 | null, | 
| @@ -39,10 +39,13 @@ | ||
| 39 | 39 | |
| 40 | 40 | $user = file_get_contents(__DIR__ . '/../../app/src/User/User.php'); | 
| 41 | 41 | unlink(__DIR__ . '/../../app/src/User/User.php'); | 
| 42 | -        try { | |
| 42 | + try | |
| 43 | +        { | |
| 43 | 44 |              $output = $this->runCommandDebug('cycle:migrate', ['-r' => true]); | 
| 44 | 45 |              $this->assertContains('drop foreign key', $output); | 
| 45 | -        } finally { | |
| 46 | + } | |
| 47 | + finally | |
| 48 | +        { | |
| 46 | 49 | file_put_contents(__DIR__ . '/../../app/src/User/User.php', $user); | 
| 47 | 50 | } | 
| 48 | 51 | } | 
| @@ -38,15 +38,19 @@ | ||
| 38 | 38 | public function getServices(): array | 
| 39 | 39 |      { | 
| 40 | 40 | $result = []; | 
| 41 | -        foreach ($this->classes->getClasses(ServiceInterface::class) as $service) { | |
| 42 | -            if (!$service->isInstantiable()) { | |
| 41 | + foreach ($this->classes->getClasses(ServiceInterface::class) as $service) | |
| 42 | +        { | |
| 43 | + if (!$service->isInstantiable()) | |
| 44 | +            { | |
| 43 | 45 | continue; | 
| 44 | 46 | } | 
| 45 | 47 | |
| 46 | 48 | $instance = $this->container->get($service->getName()); | 
| 47 | 49 | |
| 48 | -            foreach ($service->getInterfaces() as $interface) { | |
| 49 | -                if ($interface->isSubclassOf(ServiceInterface::class)) { | |
| 50 | + foreach ($service->getInterfaces() as $interface) | |
| 51 | +            { | |
| 52 | + if ($interface->isSubclassOf(ServiceInterface::class)) | |
| 53 | +                { | |
| 50 | 54 | $result[$interface->getName()] = $instance; | 
| 51 | 55 | } | 
| 52 | 56 | } | 
| @@ -9,7 +9,8 @@ discard block | ||
| 9 | 9 | |
| 10 | 10 | use Spiral\Debug\Dumper; | 
| 11 | 11 | |
| 12 | -if (!function_exists('bind')) { | |
| 12 | +if (!function_exists('bind')) | |
| 13 | +{ | |
| 13 | 14 | /** | 
| 14 | 15 | * Shortcut to container Autowire definition. | 
| 15 | 16 | * | 
| @@ -27,7 +28,8 @@ discard block | ||
| 27 | 28 | } | 
| 28 | 29 | } | 
| 29 | 30 | |
| 30 | -if (!function_exists('dumprr')) { | |
| 31 | +if (!function_exists('dumprr')) | |
| 32 | +{ | |
| 31 | 33 | /** | 
| 32 | 34 | * Dumprr is similar to Dump function but always redirect output to STDERR. | 
| 33 | 35 | * | 
| @@ -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 | |
| @@ -37,7 +37,8 @@ | ||
| 37 | 37 |          $response = new Response('php://memory', $code, []); | 
| 38 | 38 | $response = $response->withStatus($code, $reasonPhrase); | 
| 39 | 39 | |
| 40 | -        foreach ($this->config->getBaseHeaders() as $header => $value) { | |
| 40 | + foreach ($this->config->getBaseHeaders() as $header => $value) | |
| 41 | +        { | |
| 41 | 42 | $response = $response->withAddedHeader($header, $value); | 
| 42 | 43 | } | 
| 43 | 44 | |
| @@ -66,7 +66,8 @@ | ||
| 66 | 66 | |
| 67 | 67 | $kernel->addDispatcher($factory->make(SapiDispatcher::class)); | 
| 68 | 68 | |
| 69 | -        if (class_exists(PSR7Client::class)) { | |
| 69 | + if (class_exists(PSR7Client::class)) | |
| 70 | +        { | |
| 70 | 71 | $kernel->addDispatcher($factory->make(RrDispacher::class)); | 
| 71 | 72 | } | 
| 72 | 73 | } |