@@ -32,18 +32,18 @@ |
||
32 | 32 | |
33 | 33 | public function execute(InputInterface $input, OutputInterface $output) |
34 | 34 | { |
35 | - $output->writeln('<info>Fetching data from </info> ' . $this->suffixListEndpoint); |
|
35 | + $output->writeln('<info>Fetching data from </info> '.$this->suffixListEndpoint); |
|
36 | 36 | $filesystem = new Filesystem(); |
37 | - $dir = $this->container->getParameter('kernel.project_dir') . '/data/public-suffix-list/'; |
|
38 | - if ($filesystem->exists($dir . $this->suffixListFilename)) { |
|
39 | - $filesystem->remove($dir . $this->suffixListFilename); |
|
37 | + $dir = $this->container->getParameter('kernel.project_dir').'/data/public-suffix-list/'; |
|
38 | + if ($filesystem->exists($dir.$this->suffixListFilename)) { |
|
39 | + $filesystem->remove($dir.$this->suffixListFilename); |
|
40 | 40 | } |
41 | 41 | $filesystem->mkdir($dir); |
42 | - $filesystem->touch($dir . $this->suffixListFilename); |
|
42 | + $filesystem->touch($dir.$this->suffixListFilename); |
|
43 | 43 | $data = file_get_contents($this->suffixListEndpoint); |
44 | - $filesystem->dumpFile($dir . $this->suffixListFilename, $data); |
|
44 | + $filesystem->dumpFile($dir.$this->suffixListFilename, $data); |
|
45 | 45 | |
46 | - $output->writeln('<info>Data saved into:</info> ' . $dir . $this->suffixListFilename); |
|
46 | + $output->writeln('<info>Data saved into:</info> '.$dir.$this->suffixListFilename); |
|
47 | 47 | return 0; |
48 | 48 | } |
49 | 49 | } |
50 | 50 | \ No newline at end of file |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | $domainString = $result->secondLevelDomain()->toString(); |
90 | 90 | if (null !== $result->suffix()->toString()) { |
91 | - $domainString = $domainString . '.' . $result->suffix()->toString(); |
|
91 | + $domainString = $domainString.'.'.$result->suffix()->toString(); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | return $domainString; |
@@ -128,15 +128,15 @@ discard block |
||
128 | 128 | */ |
129 | 129 | private function getPublicSuffixList(): string |
130 | 130 | { |
131 | - return $this->cacheProvider->get('suffix_list', function (ItemInterface $item) { |
|
132 | - $dir = $this->container->getParameter('kernel.project_dir') . '/data/public-suffix-list/'; |
|
131 | + return $this->cacheProvider->get('suffix_list', function(ItemInterface $item) { |
|
132 | + $dir = $this->container->getParameter('kernel.project_dir').'/data/public-suffix-list/'; |
|
133 | 133 | $filesystem = new Filesystem(); |
134 | - if (!$filesystem->exists($dir . $this->suffixListFilename)) { |
|
134 | + if (!$filesystem->exists($dir.$this->suffixListFilename)) { |
|
135 | 135 | throw new \LogicException( |
136 | 136 | 'Public suffix list file not found. Run swp:public-suffix-list:get command' |
137 | 137 | ); |
138 | 138 | } |
139 | - return file_get_contents($dir . $this->suffixListFilename); |
|
139 | + return file_get_contents($dir.$this->suffixListFilename); |
|
140 | 140 | }); |
141 | 141 | } |
142 | 142 | } |