@@ -68,7 +68,7 @@ |
||
| 68 | 68 | protected function fetchCookies(array $header) |
| 69 | 69 | { |
| 70 | 70 | $result = []; |
| 71 | - foreach ($header as $line) { |
|
| 71 | + foreach ($header as $line){ |
|
| 72 | 72 | $cookie = explode('=', $line); |
| 73 | 73 | $result[$cookie[0]] = rawurldecode(substr($cookie[1], 0, strpos($cookie[1], ';'))); |
| 74 | 74 | } |
@@ -16,7 +16,7 @@ |
||
| 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 | $this->assertContains($extension, $output); |
| 21 | 21 | } |
| 22 | 22 | } |
@@ -31,12 +31,12 @@ |
||
| 31 | 31 | |
| 32 | 32 | $fs = new Files(); |
| 33 | 33 | |
| 34 | - if ($fs->isDirectory(__DIR__ . '/../app/migrations')) { |
|
| 35 | - $fs->deleteDirectory(__DIR__ . '/../app/migrations'); |
|
| 34 | + if ($fs->isDirectory(__DIR__.'/../app/migrations')){ |
|
| 35 | + $fs->deleteDirectory(__DIR__.'/../app/migrations'); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | $runtime = $this->app->get(DirectoriesInterface::class)->get('runtime'); |
| 39 | - if ($fs->isDirectory($runtime)) { |
|
| 39 | + if ($fs->isDirectory($runtime)){ |
|
| 40 | 40 | $fs->deleteDirectory($runtime); |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | $dirs = $this->app->get(DirectoriesInterface::class); |
| 38 | 38 | $fs = $this->app->get(FilesInterface::class); |
| 39 | - $fs->write($dirs->get('cache') . '/views/test.php', 'test', null, true); |
|
| 39 | + $fs->write($dirs->get('cache').'/views/test.php', 'test', null, true); |
|
| 40 | 40 | |
| 41 | 41 | $out = $this->runCommandDebug('views:reset'); |
| 42 | 42 | $this->assertContains('test.php', $out); |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | ] |
| 104 | 104 | ]); |
| 105 | 105 | |
| 106 | - $tokenizer->addDirectory(directory('vendor') . 'spiral/validation/src/'); |
|
| 106 | + $tokenizer->addDirectory(directory('vendor').'spiral/validation/src/'); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
@@ -38,15 +38,15 @@ |
||
| 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 | + if (!$service->isInstantiable()){ |
|
| 43 | 43 | continue; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $instance = $this->container->get($service->getName()); |
| 47 | 47 | |
| 48 | - foreach ($service->getInterfaces() as $interface) { |
|
| 49 | - if ($interface->isSubclassOf(ServiceInterface::class)) { |
|
| 48 | + foreach ($service->getInterfaces() as $interface){ |
|
| 49 | + if ($interface->isSubclassOf(ServiceInterface::class)){ |
|
| 50 | 50 | $result[$interface->getName()] = $instance; |
| 51 | 51 | } |
| 52 | 52 | } |
@@ -58,14 +58,14 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | $output = trim(join("\n", $output), "\n ,"); |
| 60 | 60 | |
| 61 | - if ($output !== '') { |
|
| 61 | + if ($output !== ''){ |
|
| 62 | 62 | $this->files->deleteDirectory($tmpDir); |
| 63 | 63 | throw new CompileException($output); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | // copying files (using relative path and namespace) |
| 67 | 67 | $result = []; |
| 68 | - foreach ($this->files->getFiles($tmpDir) as $file) { |
|
| 68 | + foreach ($this->files->getFiles($tmpDir) as $file){ |
|
| 69 | 69 | $result[] = $this->copy($tmpDir, $file); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | private function copy(string $tmpDir, string $file): string |
| 83 | 83 | { |
| 84 | 84 | $source = ltrim($this->files->relativePath($file, $tmpDir), '\\/'); |
| 85 | - if (strpos($source, $this->baseNamespace) === 0) { |
|
| 85 | + if (strpos($source, $this->baseNamespace) === 0){ |
|
| 86 | 86 | $source = ltrim(substr($source, strlen($this->baseNamespace)), '\\/'); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - $target = $this->files->normalizePath($this->basePath . '/' . $source); |
|
| 89 | + $target = $this->files->normalizePath($this->basePath.'/'.$source); |
|
| 90 | 90 | |
| 91 | 91 | $this->files->ensureDirectory(dirname($target)); |
| 92 | 92 | $this->files->copy($file, $target); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | private function tmpDir(): string |
| 101 | 101 | { |
| 102 | - $directory = sys_get_temp_dir() . '/' . spl_object_hash($this); |
|
| 102 | + $directory = sys_get_temp_dir().'/'.spl_object_hash($this); |
|
| 103 | 103 | $this->files->ensureDirectory($directory); |
| 104 | 104 | |
| 105 | 105 | return $this->files->normalizePath($directory, true); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | private function getProtoFiles(string $protoFile): array |
| 115 | 115 | { |
| 116 | - return array_filter($this->files->getFiles(dirname($protoFile)), function ($file) { |
|
| 116 | + return array_filter($this->files->getFiles(dirname($protoFile)), function ($file){ |
|
| 117 | 117 | return strpos($file, '.proto') !== false; |
| 118 | 118 | }); |
| 119 | 119 | } |
@@ -9,7 +9,7 @@ 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 | * Shortcut to container Autowire definition. |
| 15 | 15 | * |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | -if (!function_exists('dumprr')) { |
|
| 30 | +if (!function_exists('dumprr')){ |
|
| 31 | 31 | /** |
| 32 | 32 | * Dumprr is similar to Dump function but always redirect output to STDERR. |
| 33 | 33 | * |
@@ -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 | |