@@ -77,12 +77,12 @@ |
||
| 77 | 77 | $paginator = new Paginator($eventDispatcher); |
| 78 | 78 | return $paginator->paginate( |
| 79 | 79 | $queryBuilder, |
| 80 | - (int)$criteria->get('firstResult', 0), |
|
| 81 | - (int)$criteria->get('maxResults', RepositoryInterface::MAX_RESULTS) |
|
| 80 | + (int) $criteria->get('firstResult', 0), |
|
| 81 | + (int) $criteria->get('maxResults', RepositoryInterface::MAX_RESULTS) |
|
| 82 | 82 | ); |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - return $this->getPaginator( $eventDispatcher,$queryBuilder, $paginationData); |
|
| 85 | + return $this->getPaginator($eventDispatcher, $queryBuilder, $paginationData); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | public function getCountByCriteria(Criteria $criteria): int |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | $name = ""; |
| 130 | 130 | $params = ['slug' => $article->getSlug()]; |
| 131 | 131 | DecoratingRoutingExtension::setupParams($article->getRoute(), $name, $params); |
| 132 | - $url = $this->urlGenerator->generate($name, $params , UrlGeneratorInterface::ABSOLUTE_URL); |
|
| 132 | + $url = $this->urlGenerator->generate($name, $params, UrlGeneratorInterface::ABSOLUTE_URL); |
|
| 133 | 133 | |
| 134 | 134 | return $this->getClient($feed)->removeArticle($url); |
| 135 | 135 | } |
@@ -154,7 +154,7 @@ |
||
| 154 | 154 | $form->handleRequest($request); |
| 155 | 155 | if ($form->isSubmitted() && $form->isValid()) { |
| 156 | 156 | $this->menuItemManager->update($menu); |
| 157 | - if($parent !== $menu->getParent()) { |
|
| 157 | + if ($parent !== $menu->getParent()) { |
|
| 158 | 158 | $this->menuItemManager->update($parent); |
| 159 | 159 | } |
| 160 | 160 | $this->menuItemRepository->flush(); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | public function loadConfigsFromPath($configsPath) |
| 127 | 127 | { |
| 128 | 128 | if (file_exists($configsPath)) { |
| 129 | - $files = $this->metadataCache->get('metadata_config_files', function () use ($configsPath) { |
|
| 129 | + $files = $this->metadataCache->get('metadata_config_files', function() use ($configsPath) { |
|
| 130 | 130 | $finder = new Finder(); |
| 131 | 131 | $finder->in($configsPath)->files()->name('*.{yaml,yml}'); |
| 132 | 132 | $files = []; |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | public function addNewConfig(string $filePath) |
| 190 | 190 | { |
| 191 | 191 | $cacheKey = md5($filePath); |
| 192 | - $configuration = $this->metadataCache->get($cacheKey, function () use ($filePath) { |
|
| 192 | + $configuration = $this->metadataCache->get($cacheKey, function() use ($filePath) { |
|
| 193 | 193 | if (!is_readable($filePath)) { |
| 194 | 194 | throw new \InvalidArgumentException('Configuration file is not readable for parser'); |
| 195 | 195 | } |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | public function registerMeta(Meta $meta = null) |
| 222 | 222 | { |
| 223 | 223 | $configuration = $meta->getConfiguration(); |
| 224 | - if(array_key_exists("name" ,$configuration)) { |
|
| 224 | + if (array_key_exists("name", $configuration)) { |
|
| 225 | 225 | $name = $configuration['name']; |
| 226 | 226 | if (!array_key_exists($name, $this->registeredMeta)) { |
| 227 | 227 | $this->registeredMeta[$name] = $configuration; |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | { |
| 334 | 334 | return $this->getExtraCollection() |
| 335 | 335 | ->map( |
| 336 | - function (ArticleExtraFieldInterface $field) { |
|
| 336 | + function(ArticleExtraFieldInterface $field) { |
|
| 337 | 337 | return $field->toApiFormat(); |
| 338 | 338 | } |
| 339 | 339 | )->toArray(); |
@@ -536,8 +536,8 @@ discard block |
||
| 536 | 536 | if (is_array($value)) { |
| 537 | 537 | $this->addEmbedExtra(ArticleExtraEmbedField::newFromValue($key, $value)); |
| 538 | 538 | } else { |
| 539 | - if(is_int($value)) { |
|
| 540 | - $value = (string)$value; |
|
| 539 | + if (is_int($value)) { |
|
| 540 | + $value = (string) $value; |
|
| 541 | 541 | } |
| 542 | 542 | $this->addTextExtra(ArticleExtraTextField::newFromValue($key, $value)); |
| 543 | 543 | } |
@@ -691,7 +691,7 @@ |
||
| 691 | 691 | */ |
| 692 | 692 | public function isCurrent(): bool |
| 693 | 693 | { |
| 694 | - return ($this->isCurrent?true:false); |
|
| 694 | + return ($this->isCurrent ?true:false); |
|
| 695 | 695 | } |
| 696 | 696 | |
| 697 | 697 | /** |
@@ -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 | ]); |