@@ -31,18 +31,18 @@ |
||
31 | 31 | |
32 | 32 | public function execute(InputInterface $input, OutputInterface $output) |
33 | 33 | { |
34 | - $output->writeln('<info>Fetching data from </info> ' . $this->suffixListEndpoint); |
|
34 | + $output->writeln('<info>Fetching data from </info> '.$this->suffixListEndpoint); |
|
35 | 35 | $filesystem = new Filesystem(); |
36 | - $dir = $this->container->getParameter('kernel.project_dir') . '/src/SWP/Component/MultiTenancy/'; |
|
37 | - if ($filesystem->exists($dir . $this->suffixListFilename)) { |
|
38 | - $filesystem->remove($dir . $this->suffixListFilename); |
|
36 | + $dir = $this->container->getParameter('kernel.project_dir').'/src/SWP/Component/MultiTenancy/'; |
|
37 | + if ($filesystem->exists($dir.$this->suffixListFilename)) { |
|
38 | + $filesystem->remove($dir.$this->suffixListFilename); |
|
39 | 39 | } |
40 | 40 | $filesystem->mkdir($dir); |
41 | - $filesystem->touch($dir . $this->suffixListFilename); |
|
41 | + $filesystem->touch($dir.$this->suffixListFilename); |
|
42 | 42 | $data = file_get_contents($this->suffixListEndpoint); |
43 | - $filesystem->dumpFile($dir . $this->suffixListFilename, $data); |
|
43 | + $filesystem->dumpFile($dir.$this->suffixListFilename, $data); |
|
44 | 44 | |
45 | - $output->writeln('<info>Data saved into:</info> ' . $dir . $this->suffixListFilename); |
|
45 | + $output->writeln('<info>Data saved into:</info> '.$dir.$this->suffixListFilename); |
|
46 | 46 | return 0; |
47 | 47 | } |
48 | 48 | } |
49 | 49 | \ No newline at end of file |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function generateUrl(FileInterface $file, string $basePath): string |
27 | 27 | { |
28 | - $key = $basePath . '/' . $file->getAssetId() . '.' . $file->getFileExtension(); |
|
29 | - return 'https://storage.googleapis.com/' . $this->bucket->name() . '/' . $key; |
|
28 | + $key = $basePath.'/'.$file->getAssetId().'.'.$file->getFileExtension(); |
|
29 | + return 'https://storage.googleapis.com/'.$this->bucket->name().'/'.$key; |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | \ No newline at end of file |
@@ -15,7 +15,7 @@ |
||
15 | 15 | */ |
16 | 16 | public static function createGCSClient(ContainerInterface $container, string $keyFilePath): StorageClient |
17 | 17 | { |
18 | - $path = $container->getParameter('kernel.project_dir') . '/config/gcs/' . $keyFilePath; |
|
18 | + $path = $container->getParameter('kernel.project_dir').'/config/gcs/'.$keyFilePath; |
|
19 | 19 | return new StorageClient([ |
20 | 20 | 'keyFilePath' => $path, |
21 | 21 | ]); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | return $domainString; |
87 | 87 | } |
88 | 88 | |
89 | - return $domainString . '.' . $result->suffix()->toString(); |
|
89 | + return $domainString.'.'.$result->suffix()->toString(); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | protected function extractSubdomain(string $host = null): string |
@@ -119,15 +119,15 @@ discard block |
||
119 | 119 | */ |
120 | 120 | private function getPublicSuffixList(): string |
121 | 121 | { |
122 | - return $this->cacheProvider->get('suffix_list', function (ItemInterface $item) { |
|
123 | - $dir = __DIR__ . '/../'; |
|
122 | + return $this->cacheProvider->get('suffix_list', function(ItemInterface $item) { |
|
123 | + $dir = __DIR__.'/../'; |
|
124 | 124 | $filesystem = new Filesystem(); |
125 | - if (!$filesystem->exists($dir . $this->suffixListFilename)) { |
|
125 | + if (!$filesystem->exists($dir.$this->suffixListFilename)) { |
|
126 | 126 | throw new \LogicException( |
127 | 127 | 'Public suffix list file not found. Run swp:public-suffix-list:get command' |
128 | 128 | ); |
129 | 129 | } |
130 | - return file_get_contents($dir . $this->suffixListFilename); |
|
130 | + return file_get_contents($dir.$this->suffixListFilename); |
|
131 | 131 | }); |
132 | 132 | } |
133 | 133 | } |