@@ -18,10 +18,10 @@ |
||
18 | 18 | curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); |
19 | 19 | $result = curl_exec($ch); |
20 | 20 | |
21 | -echo 'response: '.$result; |
|
21 | +echo 'response: ' . $result; |
|
22 | 22 | echo PHP_EOL; |
23 | 23 | |
24 | 24 | if (curl_errno($ch)) { |
25 | - echo 'Error:'.curl_error($ch); |
|
25 | + echo 'Error:' . curl_error($ch); |
|
26 | 26 | } |
27 | 27 | curl_close($ch); |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | use App\Kernel; |
4 | 4 | |
5 | -require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; |
|
5 | +require_once dirname(__DIR__) . '/vendor/autoload_runtime.php'; |
|
6 | 6 | |
7 | -return function (array $context) { |
|
7 | +return function(array $context) { |
|
8 | 8 | return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); |
9 | 9 | }; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) { |
|
4 | - require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php'; |
|
3 | +if (file_exists(dirname(__DIR__) . '/var/cache/prod/App_KernelProdContainer.preload.php')) { |
|
4 | + require dirname(__DIR__) . '/var/cache/prod/App_KernelProdContainer.preload.php'; |
|
5 | 5 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | $newFile = $this->fileUploader->upload($file, $fileCollection); |
39 | - $newFiles[] = $newFile->getPath().'/'.$newFile->getFilename(); |
|
39 | + $newFiles[] = $newFile->getPath() . '/' . $newFile->getFilename(); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | return $newFiles; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $files = []; |
32 | 32 | |
33 | 33 | foreach ($finder as $file) { |
34 | - $files[] = $fileCollection->getDirectory().$file->getRelativePathname(); |
|
34 | + $files[] = $fileCollection->getDirectory() . $file->getRelativePathname(); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | return $files; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | private function generateName(): string |
93 | 93 | { |
94 | - return md5(microtime().uniqid((string) mt_rand(), true).'salt'); |
|
94 | + return md5(microtime() . uniqid((string) mt_rand(), true) . 'salt'); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -23,14 +23,14 @@ |
||
23 | 23 | |
24 | 24 | private function generateFileName(UploadedFile $file): string |
25 | 25 | { |
26 | - $baseFilename = str_replace('.'.$file->getClientOriginalExtension(), '', $file->getClientOriginalName()); |
|
26 | + $baseFilename = str_replace('.' . $file->getClientOriginalExtension(), '', $file->getClientOriginalName()); |
|
27 | 27 | $baseFilename = preg_replace('/[^a-zA-Z0-9_-]/', '', $baseFilename); |
28 | 28 | |
29 | - return $this->generateHash().'-'.$baseFilename.'.'.$file->guessExtension(); |
|
29 | + return $this->generateHash() . '-' . $baseFilename . '.' . $file->guessExtension(); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | private function generateHash(): string |
33 | 33 | { |
34 | - return substr(md5(microtime().uniqid((string) mt_rand(), true).'salt'), 0, 8); |
|
34 | + return substr(md5(microtime() . uniqid((string) mt_rand(), true) . 'salt'), 0, 8); |
|
35 | 35 | } |
36 | 36 | } |
@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | protected function configureContainer(ContainerConfigurator $container): void |
15 | 15 | { |
16 | 16 | $container->import('../config/{packages}/*.yaml'); |
17 | - $container->import('../config/{packages}/'.$this->environment.'/*.yaml'); |
|
17 | + $container->import('../config/{packages}/' . $this->environment . '/*.yaml'); |
|
18 | 18 | |
19 | - if (is_file(\dirname(__DIR__).'/config/services.yaml')) { |
|
19 | + if (is_file(\dirname(__DIR__) . '/config/services.yaml')) { |
|
20 | 20 | $container->import('../config/services.yaml'); |
21 | - $container->import('../config/{services}_'.$this->environment.'.yaml'); |
|
21 | + $container->import('../config/{services}_' . $this->environment . '.yaml'); |
|
22 | 22 | } else { |
23 | 23 | $container->import('../config/{services}.php'); |
24 | 24 | } |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | |
27 | 27 | protected function configureRoutes(RoutingConfigurator $routes): void |
28 | 28 | { |
29 | - $routes->import('../config/{routes}/'.$this->environment.'/*.yaml'); |
|
29 | + $routes->import('../config/{routes}/' . $this->environment . '/*.yaml'); |
|
30 | 30 | $routes->import('../config/{routes}/*.yaml'); |
31 | 31 | |
32 | - if (is_file(\dirname(__DIR__).'/config/routes.yaml')) { |
|
32 | + if (is_file(\dirname(__DIR__) . '/config/routes.yaml')) { |
|
33 | 33 | $routes->import('../config/routes.yaml'); |
34 | 34 | } else { |
35 | 35 | $routes->import('../config/{routes}.php'); |