@@ -60,7 +60,7 @@ |
||
| 60 | 60 | |
| 61 | 61 | if ($isPublishedFBIA = (bool) $configuration['isPublishedFbia']) { |
| 62 | 62 | $subject->setPublishedFBIA($isPublishedFBIA); |
| 63 | - $this->eventDispatcher->dispatch( new ArticleEvent($subject, null, ArticleEvents::PUBLISH), ArticleEvents::PUBLISH); |
|
| 63 | + $this->eventDispatcher->dispatch(new ArticleEvent($subject, null, ArticleEvents::PUBLISH), ArticleEvents::PUBLISH); |
|
| 64 | 64 | |
| 65 | 65 | $this->logger->info(sprintf( |
| 66 | 66 | 'Configuration: "%s" for "%s" rule has been applied!', |
@@ -101,14 +101,14 @@ |
||
| 101 | 101 | |
| 102 | 102 | $this->articleRepository->persist($articleStatistics); |
| 103 | 103 | |
| 104 | - $this->eventDispatcher->dispatch( new GenericEvent($article), Events::SWP_VALIDATION); |
|
| 104 | + $this->eventDispatcher->dispatch(new GenericEvent($article), Events::SWP_VALIDATION); |
|
| 105 | 105 | |
| 106 | 106 | $article->setPackage($package); |
| 107 | 107 | $article->setArticleStatistics($articleStatistics); |
| 108 | 108 | $this->articleRepository->persist($article); |
| 109 | - $this->eventDispatcher->dispatch( new ArticleEvent($article, $package, ArticleEvents::PRE_CREATE), ArticleEvents::PRE_CREATE); |
|
| 109 | + $this->eventDispatcher->dispatch(new ArticleEvent($article, $package, ArticleEvents::PRE_CREATE), ArticleEvents::PRE_CREATE); |
|
| 110 | 110 | $this->articleRepository->flush(); |
| 111 | - $this->eventDispatcher->dispatch( new ArticleEvent($article, $package, ArticleEvents::POST_CREATE),ArticleEvents::POST_CREATE); |
|
| 111 | + $this->eventDispatcher->dispatch(new ArticleEvent($article, $package, ArticleEvents::POST_CREATE), ArticleEvents::POST_CREATE); |
|
| 112 | 112 | $this->entityManager->flush($article); |
| 113 | 113 | } |
| 114 | 114 | $this->tenantContext->setTenant($originalTenant); |
@@ -50,13 +50,13 @@ |
||
| 50 | 50 | TenantContextInterface $tenantContext, |
| 51 | 51 | ParameterBagInterface $parameterBag, |
| 52 | 52 | ArticleRepositoryInterface $articleRepository, |
| 53 | - ArticleBodyProcessorChain $articleBodyProcessorChain ) |
|
| 53 | + ArticleBodyProcessorChain $articleBodyProcessorChain) |
|
| 54 | 54 | { |
| 55 | 55 | $this->repositoryManager = $repositoryManager; |
| 56 | 56 | $this->tenantContext = $tenantContext; |
| 57 | 57 | $this->parameterBag = $parameterBag; |
| 58 | 58 | $this->articleRepository = $articleRepository; |
| 59 | - $this->articleBodyProcessorChain = $articleBodyProcessorChain; |
|
| 59 | + $this->articleBodyProcessorChain = $articleBodyProcessorChain; |
|
| 60 | 60 | |
| 61 | 61 | parent::__construct(); |
| 62 | 62 | } |
@@ -64,16 +64,16 @@ |
||
| 64 | 64 | ParameterBagInterface $parameterBag, |
| 65 | 65 | ThemeServiceInterface $themeService |
| 66 | 66 | ) { |
| 67 | - $this->tenantContext = $tenantContext; |
|
| 68 | - $this->tenantRepository = $tenantRepository; |
|
| 69 | - $this->eventDispatcher = $eventDispatcher; |
|
| 70 | - $this->parameterBag = $parameterBag; |
|
| 71 | - $this->themeService = $themeService; |
|
| 72 | - parent::__construct(); |
|
| 67 | + $this->tenantContext = $tenantContext; |
|
| 68 | + $this->tenantRepository = $tenantRepository; |
|
| 69 | + $this->eventDispatcher = $eventDispatcher; |
|
| 70 | + $this->parameterBag = $parameterBag; |
|
| 71 | + $this->themeService = $themeService; |
|
| 72 | + parent::__construct(); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | |
| 76 | - /** |
|
| 76 | + /** |
|
| 77 | 77 | * {@inheritdoc} |
| 78 | 78 | */ |
| 79 | 79 | protected function configure() |
@@ -45,9 +45,9 @@ |
||
| 45 | 45 | * @param OrganizationRepositoryInterface $organizationRepository |
| 46 | 46 | */ |
| 47 | 47 | public function __construct(ParameterBagInterface $parameterBag, OrganizationRepositoryInterface $organizationRepository) { |
| 48 | - $this->parameterBag = $parameterBag; |
|
| 49 | - $this->organizationRepository = $organizationRepository; |
|
| 50 | - parent::__construct(); |
|
| 48 | + $this->parameterBag = $parameterBag; |
|
| 49 | + $this->organizationRepository = $organizationRepository; |
|
| 50 | + parent::__construct(); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | protected function getTenant(InputInterface $input, OutputInterface $output) |
| 115 | 115 | { |
| 116 | - $organizationRepository =$this->organizationRepository; |
|
| 116 | + $organizationRepository = $this->organizationRepository; |
|
| 117 | 117 | $organizationName = $input->getArgument('organizationName'); |
| 118 | 118 | $organization = $organizationRepository->findOneByName($organizationName); |
| 119 | 119 | if (null === $organization) { |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | $tenant = reset($tenants); |
| 133 | 133 | if ($numTenants > 1) { |
| 134 | - $tenantNames = array_map(function ($tenant) { |
|
| 134 | + $tenantNames = array_map(function($tenant) { |
|
| 135 | 135 | return $tenant->getName(); |
| 136 | 136 | }, $tenants); |
| 137 | 137 | |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | $cacheKey = urlencode($this->generateCacheKey($subscriber).implode('_', $filters)); |
| 66 | 66 | |
| 67 | 67 | return $this->cacheProvider->get($cacheKey, function (ItemInterface $item) use ($subscriber, $filters) { |
| 68 | - $item->expiresAfter($this->cacheLifeTime); |
|
| 69 | - return $this->decoratedProvider->getSubscriptions($subscriber, $filters); |
|
| 68 | + $item->expiresAfter($this->cacheLifeTime); |
|
| 69 | + return $this->decoratedProvider->getSubscriptions($subscriber, $filters); |
|
| 70 | 70 | }); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -74,8 +74,8 @@ discard block |
||
| 74 | 74 | { |
| 75 | 75 | $cacheKey = urlencode($this->generateCacheKey($subscriber, self::CACHE_KEY_VALID).implode('_', $filters)); |
| 76 | 76 | return $this->cacheProvider->get($cacheKey, function (ItemInterface $item) use ($subscriber, $filters) { |
| 77 | - $item->expiresAfter($this->cacheLifeTime); |
|
| 78 | - return $this->decoratedProvider->getSubscription($subscriber, $filters); |
|
| 77 | + $item->expiresAfter($this->cacheLifeTime); |
|
| 78 | + return $this->decoratedProvider->getSubscription($subscriber, $filters); |
|
| 79 | 79 | }); |
| 80 | 80 | } |
| 81 | 81 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | { |
| 65 | 65 | $cacheKey = urlencode($this->generateCacheKey($subscriber).implode('_', $filters)); |
| 66 | 66 | |
| 67 | - return $this->cacheProvider->get($cacheKey, function (ItemInterface $item) use ($subscriber, $filters) { |
|
| 67 | + return $this->cacheProvider->get($cacheKey, function(ItemInterface $item) use ($subscriber, $filters) { |
|
| 68 | 68 | $item->expiresAfter($this->cacheLifeTime); |
| 69 | 69 | return $this->decoratedProvider->getSubscriptions($subscriber, $filters); |
| 70 | 70 | }); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | public function getSubscription(SubscriberInterface $subscriber, array $filters = []): ?SubscriptionInterface |
| 74 | 74 | { |
| 75 | 75 | $cacheKey = urlencode($this->generateCacheKey($subscriber, self::CACHE_KEY_VALID).implode('_', $filters)); |
| 76 | - return $this->cacheProvider->get($cacheKey, function (ItemInterface $item) use ($subscriber, $filters) { |
|
| 76 | + return $this->cacheProvider->get($cacheKey, function(ItemInterface $item) use ($subscriber, $filters) { |
|
| 77 | 77 | $item->expiresAfter($this->cacheLifeTime); |
| 78 | 78 | return $this->decoratedProvider->getSubscription($subscriber, $filters); |
| 79 | 79 | }); |
@@ -39,18 +39,18 @@ |
||
| 39 | 39 | /** @var OrganizationFactoryInterface */ |
| 40 | 40 | private $organizationFactory; |
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * @param OrganizationRepositoryInterface $organizationRepository |
|
| 44 | - * @param OrganizationFactoryInterface $organizationFactory |
|
| 45 | - */ |
|
| 46 | - public function __construct( OrganizationRepositoryInterface $organizationRepository, OrganizationFactoryInterface $organizationFactory) { |
|
| 42 | + /** |
|
| 43 | + * @param OrganizationRepositoryInterface $organizationRepository |
|
| 44 | + * @param OrganizationFactoryInterface $organizationFactory |
|
| 45 | + */ |
|
| 46 | + public function __construct( OrganizationRepositoryInterface $organizationRepository, OrganizationFactoryInterface $organizationFactory) { |
|
| 47 | 47 | $this->organizationRepository = $organizationRepository; |
| 48 | 48 | $this->organizationFactory = $organizationFactory; |
| 49 | 49 | parent::__construct(); |
| 50 | - } |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | 52 | |
| 53 | - /** |
|
| 53 | + /** |
|
| 54 | 54 | * {@inheritdoc} |
| 55 | 55 | */ |
| 56 | 56 | protected function configure() |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @param OrganizationRepositoryInterface $organizationRepository |
| 44 | 44 | * @param OrganizationFactoryInterface $organizationFactory |
| 45 | 45 | */ |
| 46 | - public function __construct( OrganizationRepositoryInterface $organizationRepository, OrganizationFactoryInterface $organizationFactory) { |
|
| 46 | + public function __construct(OrganizationRepositoryInterface $organizationRepository, OrganizationFactoryInterface $organizationFactory) { |
|
| 47 | 47 | $this->organizationRepository = $organizationRepository; |
| 48 | 48 | $this->organizationFactory = $organizationFactory; |
| 49 | 49 | parent::__construct(); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | { |
| 127 | 127 | if (!$input->getArgument($name)) { |
| 128 | 128 | $question = new Question(sprintf('<question>Please enter %s:</question>', $name)); |
| 129 | - $question->setValidator(function ($argument) use ($name) { |
|
| 129 | + $question->setValidator(function($argument) use ($name) { |
|
| 130 | 130 | if (empty($argument)) { |
| 131 | 131 | throw new \RuntimeException(sprintf('The %s can not be empty', $name)); |
| 132 | 132 | } |
@@ -123,8 +123,8 @@ |
||
| 123 | 123 | |
| 124 | 124 | $subEvent = new ControllerEvent($event->getKernel(), $controller, $stubRequest, HttpKernelInterface::SUB_REQUEST); |
| 125 | 125 | $kernelSubEvent = new RequestEvent($event->getKernel(), $stubRequest, HttpKernelInterface::SUB_REQUEST); |
| 126 | - $dispatcher->dispatch( $kernelSubEvent, KernelEvents::REQUEST); |
|
| 127 | - $dispatcher->dispatch( $subEvent, KernelEvents::CONTROLLER); |
|
| 126 | + $dispatcher->dispatch($kernelSubEvent, KernelEvents::REQUEST); |
|
| 127 | + $dispatcher->dispatch($subEvent, KernelEvents::CONTROLLER); |
|
| 128 | 128 | $controller = $subEvent->getController(); |
| 129 | 129 | |
| 130 | 130 | $argumentResolver = new ArgumentResolver(); |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $paginationData = new PaginationData(); |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | - return $this->getPaginator($eventDispatcher,$queryBuilder, $paginationData); |
|
| 154 | + return $this->getPaginator($eventDispatcher, $queryBuilder, $paginationData); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | /** |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | ->leftJoin('a.extraEmbedFields', 'eef'); |
| 173 | 173 | |
| 174 | 174 | foreach ((array) $criteria->get('extra') as $key => $value) { |
| 175 | - if(is_array($value)) { |
|
| 175 | + if (is_array($value)) { |
|
| 176 | 176 | $andX = $queryBuilder->expr()->andX(); |
| 177 | 177 | $andX->add($queryBuilder->expr()->eq('eef.fieldName', $queryBuilder->expr()->literal($key))); |
| 178 | 178 | $andX->add($queryBuilder->expr()->eq('eef.embed', $queryBuilder->expr()->literal($value['embed']))); |