Completed
Push — symfony4 ( 6bce00...4f08c4 )
by
unknown
26s
created
src/SWP/Bundle/CoreBundle/Controller/ThemeLogoController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
    */
51 51
   public function getLogoAction(string $id) {
52 52
     $cacheKey = md5(serialize(['upload', $id]));
53
-    return $this->cacheInterface->get($cacheKey, function (CacheItemInterface $item, &$save) use ($id) {
53
+    return $this->cacheInterface->get($cacheKey, function(CacheItemInterface $item, &$save) use ($id) {
54 54
       $item->expiresAfter(63072000);
55 55
 
56 56
       $fileSystem = $this->filesystem;
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Resolver/ArticleResolver.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,25 +42,25 @@
 block discarded – undo
42 42
     public function resolve(string $url): ?ArticleInterface
43 43
     {
44 44
         $collectionRouteCacheKey = md5('route_'.$url);
45
-        return $this->cacheProvider->get($collectionRouteCacheKey, function (ItemInterface $item, &$save) use ($url) {
45
+        return $this->cacheProvider->get($collectionRouteCacheKey, function(ItemInterface $item, &$save) use ($url) {
46 46
           try {
47 47
             $route = $this->matcher->match($this->getFragmentFromUrl($url, 'path'));
48
-          } catch(ResourceNotFoundException $e) {
48
+          } catch (ResourceNotFoundException $e) {
49 49
             $save = false;
50 50
             return null;
51 51
           }
52
-          if(!isset($route['_article_meta'])) {
52
+          if (!isset($route['_article_meta'])) {
53 53
             $save = false;
54 54
             return null;
55 55
           }
56 56
 
57
-          if(!($route['_article_meta'] instanceof Meta)) {
57
+          if (!($route['_article_meta'] instanceof Meta)) {
58 58
             $save = false;
59 59
             return null;
60 60
           }
61 61
 
62 62
           $values = $route['_article_meta']->getValues();
63
-          if(!($values instanceof ArticleInterface)) {
63
+          if (!($values instanceof ArticleInterface)) {
64 64
             $save = false;
65 65
             return null;
66 66
           }
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/MessageHandler/AbstractContentPushHandler.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
         if (null !== $existingPackage) {
126 126
             $existingPackage = $this->packageHydrator->hydrate($package, $existingPackage);
127 127
 
128
-            $this->eventDispatcher->dispatch( new GenericEvent($existingPackage, ['eventName' => Events::PACKAGE_PRE_UPDATE]), Events::PACKAGE_PRE_UPDATE);
128
+            $this->eventDispatcher->dispatch(new GenericEvent($existingPackage, ['eventName' => Events::PACKAGE_PRE_UPDATE]), Events::PACKAGE_PRE_UPDATE);
129 129
             $this->packageObjectManager->flush();
130
-            $this->eventDispatcher->dispatch( new GenericEvent($existingPackage, ['eventName' => Events::PACKAGE_POST_UPDATE]), Events::PACKAGE_POST_UPDATE);
131
-            $this->eventDispatcher->dispatch( new GenericEvent($existingPackage, ['eventName' => Events::PACKAGE_PROCESSED]), Events::PACKAGE_PROCESSED);
130
+            $this->eventDispatcher->dispatch(new GenericEvent($existingPackage, ['eventName' => Events::PACKAGE_POST_UPDATE]), Events::PACKAGE_POST_UPDATE);
131
+            $this->eventDispatcher->dispatch(new GenericEvent($existingPackage, ['eventName' => Events::PACKAGE_PROCESSED]), Events::PACKAGE_PROCESSED);
132 132
             $this->packageObjectManager->flush();
133 133
 
134 134
             $this->reset();
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
             return;
138 138
         }
139 139
 
140
-        $this->eventDispatcher->dispatch( new GenericEvent($package, ['eventName' => Events::PACKAGE_PRE_CREATE]), Events::PACKAGE_PRE_CREATE);
140
+        $this->eventDispatcher->dispatch(new GenericEvent($package, ['eventName' => Events::PACKAGE_PRE_CREATE]), Events::PACKAGE_PRE_CREATE);
141 141
         $this->packageRepository->add($package);
142
-        $this->eventDispatcher->dispatch( new GenericEvent($package, ['eventName' => Events::PACKAGE_POST_CREATE]), Events::PACKAGE_POST_CREATE);
143
-        $this->eventDispatcher->dispatch( new GenericEvent($package, ['eventName' => Events::PACKAGE_PROCESSED]), Events::PACKAGE_PROCESSED);
142
+        $this->eventDispatcher->dispatch(new GenericEvent($package, ['eventName' => Events::PACKAGE_POST_CREATE]), Events::PACKAGE_POST_CREATE);
143
+        $this->eventDispatcher->dispatch(new GenericEvent($package, ['eventName' => Events::PACKAGE_PROCESSED]), Events::PACKAGE_PROCESSED);
144 144
         $this->packageObjectManager->flush();
145 145
 
146 146
         $this->logger->info(sprintf('Package %s was created', $package->getGuid()));
Please login to merge, or discard this patch.
CoreBundle/Rule/Applicator/PublishArticleToAppleNewsRuleApplicator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
         if ($isPublishedToAppleNews = (bool) $configuration[$this->supportedKeys[0]]) {
54 54
             $subject->setPublishedToAppleNews($isPublishedToAppleNews);
55
-            $this->eventDispatcher->dispatch( new ArticleEvent($subject, null, ArticleEvents::PUBLISH), ArticleEvents::PUBLISH);
55
+            $this->eventDispatcher->dispatch(new ArticleEvent($subject, null, ArticleEvents::PUBLISH), ArticleEvents::PUBLISH);
56 56
 
57 57
             $this->logger->info(sprintf(
58 58
                 'Configuration: "%s" for "%s" rule has been applied!',
Please login to merge, or discard this patch.
Bundle/CoreBundle/Rule/Applicator/PublishArticleToFBIARuleApplicator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
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!',
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Rule/Populator/ArticlePopulator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -101,14 +101,14 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Command/ProcessArticleBodyCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,13 +50,13 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Command/ThemeGenerateCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Provider/CachedSubscriptionsProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         });
Please login to merge, or discard this patch.