Completed
Pull Request — master (#1218)
by
unknown
36s
created
src/SWP/Bundle/CoreBundle/Controller/AmpController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
   }
45 45
 
46 46
   public function viewAction(AmpInterface $object): Response {
47
-    return $this->cacheService->get($this->getCacheKey($object), function () use ($object) {
47
+    return $this->cacheService->get($this->getCacheKey($object), function() use ($object) {
48 48
       $this->themeLoader->load();
49 49
       $content = $this->twig->render(sprintf('@%s/index.html.twig', ThemeLoaderInterface::THEME_NAMESPACE), [
50 50
           'object' => $object,
Please login to merge, or discard this patch.
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -26,46 +26,46 @@
 block discarded – undo
26 26
 
27 27
 final class AmpController extends AbstractController {
28 28
 
29
-  private Environment $twig;
30
-  private AmpConverterInterface $converter;
31
-  private ThemeLoaderInterface $themeLoader;
32
-  private CacheInterface $cacheService;
29
+    private Environment $twig;
30
+    private AmpConverterInterface $converter;
31
+    private ThemeLoaderInterface $themeLoader;
32
+    private CacheInterface $cacheService;
33 33
 
34
-  public function __construct(
35
-      Environment           $twig,
36
-      AmpConverterInterface $ampConverter,
37
-      ThemeLoaderInterface  $ampThemeLoader,
38
-      CacheInterface        $cacheService
39
-  ) {
34
+    public function __construct(
35
+        Environment           $twig,
36
+        AmpConverterInterface $ampConverter,
37
+        ThemeLoaderInterface  $ampThemeLoader,
38
+        CacheInterface        $cacheService
39
+    ) {
40 40
     $this->twig = $twig;
41 41
     $this->converter = $ampConverter;
42 42
     $this->themeLoader = $ampThemeLoader;
43 43
     $this->cacheService = $cacheService;
44
-  }
44
+    }
45 45
 
46
-  public function viewAction(AmpInterface $object): Response {
46
+    public function viewAction(AmpInterface $object): Response {
47 47
     return $this->cacheService->get($this->getCacheKey($object), function () use ($object) {
48
-      $this->themeLoader->load();
49
-      $content = $this->twig->render(sprintf('@%s/index.html.twig', ThemeLoaderInterface::THEME_NAMESPACE), [
50
-          'object' => $object,
51
-      ]);
48
+        $this->themeLoader->load();
49
+        $content = $this->twig->render(sprintf('@%s/index.html.twig', ThemeLoaderInterface::THEME_NAMESPACE), [
50
+            'object' => $object,
51
+        ]);
52 52
 
53
-      $response = new Response();
54
-      $response->setContent($this->converter->convertToAmp($content));
55
-      return $response;
53
+        $response = new Response();
54
+        $response->setContent($this->converter->convertToAmp($content));
55
+        return $response;
56 56
     });
57
-  }
57
+    }
58 58
 
59
-  private function getCacheKey(AmpInterface $object): string {
59
+    private function getCacheKey(AmpInterface $object): string {
60 60
     $elements = ['amp_article'];
61 61
     if ($object instanceof PersistableInterface) {
62
-      $elements[] = $object->getId();
62
+        $elements[] = $object->getId();
63 63
     }
64 64
 
65 65
     if ($object instanceof TimestampableInterface && null !== $object->getUpdatedAt()) {
66
-      $elements[] = $object->getUpdatedAt()->getTimestamp();
66
+        $elements[] = $object->getUpdatedAt()->getTimestamp();
67 67
     }
68 68
 
69 69
     return md5(implode('__', $elements));
70
-  }
70
+    }
71 71
 }
Please login to merge, or discard this patch.
src/SWP/Bundle/ContentBundle/Provider/ORM/RouteProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $redirectRoute = $this->redirectRouteRepository->findOneBy(['staticPrefix' => $candidates[0]]);
73 73
 
74 74
         if (null !== $redirectRoute) {
75
-            $collection->add($redirectRoute->getRouteName() ??  '', $redirectRoute);
75
+            $collection->add($redirectRoute->getRouteName() ?? '', $redirectRoute);
76 76
 
77 77
             return $collection;
78 78
         }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
      */
250 250
     private function getArrayOfIdsFromRoutesArray(array $routes): array
251 251
     {
252
-        return array_map(function ($route) {
252
+        return array_map(function($route) {
253 253
             return $route->getId();
254 254
         }, $routes);
255 255
     }
Please login to merge, or discard this patch.
src/SWP/Bundle/ContentBundle/Routing/SeoMediaRouter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,6 +50,6 @@
 block discarded – undo
50 50
       unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
51 51
     }
52 52
 
53
-    return 'Route for media ' . $name->getValues()->getId() . ' not found';
53
+    return 'Route for media '.$name->getValues()->getId().' not found';
54 54
   }
55 55
 }
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -25,15 +25,15 @@  discard block
 block discarded – undo
25 25
 use Symfony\Component\Routing\Route as SymfonyRoute;
26 26
 
27 27
 class SeoMediaRouter extends Router implements VersatileGeneratorInterface {
28
-  /**
29
-   * {@inheritdoc}
30
-   */
31
-  public function generate($name, $parameters = [], $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) {
28
+    /**
29
+     * {@inheritdoc}
30
+     */
31
+    public function generate($name, $parameters = [], $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) {
32 32
     if (RouteObjectInterface::OBJECT_BASED_ROUTE_NAME === $name
33 33
         && array_key_exists(RouteObjectInterface::ROUTE_OBJECT, $parameters)
34 34
     ) {
35
-      $name = $parameters[RouteObjectInterface::ROUTE_OBJECT];
36
-      unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
35
+        $name = $parameters[RouteObjectInterface::ROUTE_OBJECT];
36
+        unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
37 37
     }
38 38
 
39 39
     $item = $name->getValues()->getImage();
@@ -42,20 +42,20 @@  discard block
 block discarded – undo
42 42
     $parameters['extension'] = $item->getFileExtension();
43 43
 
44 44
     return parent::generate('swp_seo_media_get', $parameters, $referenceType);
45
-  }
45
+    }
46 46
 
47
-  public function supports($name): bool {
47
+    public function supports($name): bool {
48 48
     return is_string($name) || $name instanceof Meta && $name->getValues() instanceof ArticleSeoMediaInterface;
49
-  }
49
+    }
50 50
 
51
-  public function getRouteDebugMessage($name, array $parameters = array()): string {
51
+    public function getRouteDebugMessage($name, array $parameters = array()): string {
52 52
     if (RouteObjectInterface::OBJECT_BASED_ROUTE_NAME === $name
53 53
         && array_key_exists(RouteObjectInterface::ROUTE_OBJECT, $parameters)
54 54
     ) {
55
-      $name = $parameters[RouteObjectInterface::ROUTE_OBJECT];
56
-      unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
55
+        $name = $parameters[RouteObjectInterface::ROUTE_OBJECT];
56
+        unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
57 57
     }
58 58
 
59 59
     return 'Route for media ' . $name->getValues()->getId() . ' not found';
60
-  }
60
+    }
61 61
 }
Please login to merge, or discard this patch.
src/SWP/Bundle/ContentListBundle/Doctrine/ORM/ContentListItemRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,12 +76,12 @@
 block discarded – undo
76 76
 
77 77
             return $paginator->paginate(
78 78
                 $queryBuilder,
79
-                (int)$criteria->get('firstResult', 0),
80
-                (int)$criteria->get('maxResults', RepositoryInterface::MAX_RESULTS)
79
+                (int) $criteria->get('firstResult', 0),
80
+                (int) $criteria->get('maxResults', RepositoryInterface::MAX_RESULTS)
81 81
             );
82 82
         }
83 83
 
84
-        return $this->getPaginator( $eventDispatcher,$queryBuilder, $paginationData);
84
+        return $this->getPaginator($eventDispatcher, $queryBuilder, $paginationData);
85 85
     }
86 86
 
87 87
     public function getCountByCriteria(Criteria $criteria): int
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Twig/DecoratingRoutingExtension.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -25,56 +25,56 @@
 block discarded – undo
25 25
 use Twig\TwigFunction;
26 26
 
27 27
 final class DecoratingRoutingExtension extends AbstractExtension {
28
-  private RoutingExtension $routingExtension;
28
+    private RoutingExtension $routingExtension;
29 29
 
30
-  public function __construct(RoutingExtension $routingExtension) {
30
+    public function __construct(RoutingExtension $routingExtension) {
31 31
     $this->routingExtension = $routingExtension;
32
-  }
32
+    }
33 33
 
34
-  public function getPath($name, $parameters = [], $relative = false): ?string {
34
+    public function getPath($name, $parameters = [], $relative = false): ?string {
35 35
     if ($name == null) {
36
-      return null;
36
+        return null;
37 37
     }
38 38
 
39 39
     if (is_object($name)) {
40
-      $object = $name;
41
-      $name = RouteObjectInterface::OBJECT_BASED_ROUTE_NAME;
42
-      $parameters[RouteObjectInterface::ROUTE_OBJECT] = $object;
40
+        $object = $name;
41
+        $name = RouteObjectInterface::OBJECT_BASED_ROUTE_NAME;
42
+        $parameters[RouteObjectInterface::ROUTE_OBJECT] = $object;
43 43
     }
44 44
 
45 45
     try {
46
-      return $this->routingExtension->getPath($name, $parameters, $relative);
46
+        return $this->routingExtension->getPath($name, $parameters, $relative);
47 47
     } catch (RouteNotFoundException|MissingMandatoryParametersException|InvalidParameterException $e) {
48
-      // allow empty path
48
+        // allow empty path
49 49
     }
50 50
 
51 51
     return null;
52
-  }
52
+    }
53 53
 
54
-  public function getUrl($name, $parameters = [], $schemeRelative = false): ?string {
54
+    public function getUrl($name, $parameters = [], $schemeRelative = false): ?string {
55 55
     if ($name == null) {
56
-      return null;
56
+        return null;
57 57
     }
58 58
 
59 59
     if (is_object($name)) {
60
-      $object = $name;
61
-      $name = RouteObjectInterface::OBJECT_BASED_ROUTE_NAME;
62
-      $parameters[RouteObjectInterface::ROUTE_OBJECT] = $object;
60
+        $object = $name;
61
+        $name = RouteObjectInterface::OBJECT_BASED_ROUTE_NAME;
62
+        $parameters[RouteObjectInterface::ROUTE_OBJECT] = $object;
63 63
     }
64 64
 
65 65
     try {
66
-      return $this->routingExtension->getUrl($name, $parameters, $schemeRelative);
66
+        return $this->routingExtension->getUrl($name, $parameters, $schemeRelative);
67 67
     } catch (RouteNotFoundException|MissingMandatoryParametersException|InvalidParameterException $e) {
68
-      // allow empty url
68
+        // allow empty url
69 69
     }
70 70
 
71 71
     return null;
72
-  }
72
+    }
73 73
 
74
-  public function getFunctions(): array {
74
+    public function getFunctions(): array {
75 75
     return [
76 76
         new TwigFunction('url', [$this, 'getUrl'], ['is_safe_callback' => [$this->routingExtension, 'isUrlGenerationSafe']]),
77 77
         new TwigFunction('path', [$this, 'getPath'], ['is_safe_callback' => [$this->routingExtension, 'isUrlGenerationSafe']]),
78 78
     ];
79
-  }
79
+    }
80 80
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     try {
46 46
       return $this->routingExtension->getPath($name, $parameters, $relative);
47
-    } catch (RouteNotFoundException|MissingMandatoryParametersException|InvalidParameterException $e) {
47
+    } catch (RouteNotFoundException | MissingMandatoryParametersException | InvalidParameterException $e) {
48 48
       // allow empty path
49 49
     }
50 50
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
     try {
66 66
       return $this->routingExtension->getUrl($name, $parameters, $schemeRelative);
67
-    } catch (RouteNotFoundException|MissingMandatoryParametersException|InvalidParameterException $e) {
67
+    } catch (RouteNotFoundException | MissingMandatoryParametersException | InvalidParameterException $e) {
68 68
       // allow empty url
69 69
     }
70 70
 
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Routing/MetaRouter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
       $name = $route->getId();
84 84
     }
85 85
 
86
-    return md5($name . serialize($parameters) . $type);
86
+    return md5($name.serialize($parameters).$type);
87 87
   }
88 88
 
89 89
   /**
Please login to merge, or discard this patch.
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -24,41 +24,41 @@  discard block
 block discarded – undo
24 24
 use Symfony\Component\Routing\Route as SymfonyRoute;
25 25
 
26 26
 class MetaRouter extends DynamicRouter {
27
-  protected $internalRoutesCache = [];
27
+    protected $internalRoutesCache = [];
28 28
 
29
-  public function generate($name, $parameters = [], $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) {
29
+    public function generate($name, $parameters = [], $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) {
30 30
     if (RouteObjectInterface::OBJECT_BASED_ROUTE_NAME === $name
31 31
         && array_key_exists(RouteObjectInterface::ROUTE_OBJECT, $parameters)
32 32
     ) {
33
-      $name = $parameters[RouteObjectInterface::ROUTE_OBJECT];
34
-      unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
33
+        $name = $parameters[RouteObjectInterface::ROUTE_OBJECT];
34
+        unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
35 35
     }
36 36
 
37 37
     $cacheKey = $this->getCacheKey($name, $parameters, $referenceType);
38 38
     if (array_key_exists($cacheKey, $this->internalRoutesCache)) {
39
-      return $this->internalRoutesCache[$cacheKey];
39
+        return $this->internalRoutesCache[$cacheKey];
40 40
     }
41 41
 
42 42
     $route = $name;
43 43
     if ($name instanceof Meta) {
44
-      $object = $name->getValues();
45
-      if ($object instanceof ArticleInterface) {
44
+        $object = $name->getValues();
45
+        if ($object instanceof ArticleInterface) {
46 46
         $parameters['slug'] = $object->getSlug();
47 47
         $route = $object->getRoute();
48 48
         if (null === $route && $name->getContext()->getCurrentPage()) {
49
-          $parameters['slug'] = null;
50
-          $route = $name->getContext()->getCurrentPage()->getValues();
49
+            $parameters['slug'] = null;
50
+            $route = $name->getContext()->getCurrentPage()->getValues();
51 51
         }
52
-      } elseif ($name->getValues() instanceof RouteInterface) {
52
+        } elseif ($name->getValues() instanceof RouteInterface) {
53 53
         $route = $name->getValues();
54
-      }
54
+        }
55 55
     } elseif ($name instanceof ArticleInterface) {
56
-      $route = $name->getRoute();
57
-      $parameters['slug'] = $name->getSlug();
56
+        $route = $name->getRoute();
57
+        $parameters['slug'] = $name->getSlug();
58 58
     }
59 59
 
60 60
     if (null === $route || is_array($route)) {
61
-      throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name));
61
+        throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name));
62 62
     }
63 63
 
64 64
     $result = parent::generate($route, $parameters, $referenceType);
@@ -66,29 +66,29 @@  discard block
 block discarded – undo
66 66
     unset($route);
67 67
 
68 68
     return $result;
69
-  }
69
+    }
70 70
 
71
-  private function getCacheKey($route, $parameters, $type) {
71
+    private function getCacheKey($route, $parameters, $type) {
72 72
     $name = $route;
73 73
     if ($route instanceof Meta) {
74
-      if ($route->getValues() instanceof ArticleInterface) {
74
+        if ($route->getValues() instanceof ArticleInterface) {
75 75
         $name = $route->getValues()->getId();
76
-      } elseif ($route->getValues() instanceof RouteInterface) {
76
+        } elseif ($route->getValues() instanceof RouteInterface) {
77 77
         $name = $route->getValues()->getName();
78
-      }
78
+        }
79 79
     } elseif ($route instanceof RouteInterface) {
80
-      $name = $route->getName();
80
+        $name = $route->getName();
81 81
     } elseif ($route instanceof ArticleInterface) {
82
-      $name = $route->getId();
82
+        $name = $route->getId();
83 83
     }
84 84
 
85 85
     return md5($name . serialize($parameters) . $type);
86
-  }
86
+    }
87 87
 
88
-  /**
89
-   * {@inheritdoc}
90
-   */
91
-  public function supports($name) {
88
+    /**
89
+     * {@inheritdoc}
90
+     */
91
+    public function supports($name) {
92 92
     return
93 93
         is_string($name) ||
94 94
         ($name instanceof Meta && (
@@ -104,5 +104,5 @@  discard block
 block discarded – undo
104 104
             'swp_media_get' !== $name &&
105 105
             false === strpos($name, 'swp_api_')
106 106
         );
107
-  }
107
+    }
108 108
 }
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Command/ProcessPackagesCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,8 +123,8 @@
 block discarded – undo
123 123
         /** @var SlidingPagination $pagination */
124 124
         $pagination = $this->paginator->paginate(
125 125
             $queryBuilder,
126
-            (int)  $input->getOption('page'),
127
-            (int)  $input->getOption('limit')
126
+            (int) $input->getOption('page'),
127
+            (int) $input->getOption('limit')
128 128
         );
129 129
 
130 130
         $output->writeln(sprintf('<bg=green;options=bold>Packages found: %s</>', $pagination->getTotalItemCount()));
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Routing/ArticleAuthorMediaRouter.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -26,51 +26,51 @@
 block discarded – undo
26 26
 use Symfony\Component\Routing\Route as SymfonyRoute;
27 27
 
28 28
 class ArticleAuthorMediaRouter extends Router implements VersatileGeneratorInterface {
29
-  protected $authorMediaManager;
29
+    protected $authorMediaManager;
30 30
 
31
-  public function __construct(
32
-      ContainerInterface $container,
33
-                         $resource,
34
-      array              $options = [],
35
-      RequestContext     $context = null,
36
-      ContainerInterface $parameters = null,
37
-      LoggerInterface    $logger = null,
38
-      string             $defaultLocale = null
39
-  ) {
31
+    public function __construct(
32
+        ContainerInterface $container,
33
+                            $resource,
34
+        array              $options = [],
35
+        RequestContext     $context = null,
36
+        ContainerInterface $parameters = null,
37
+        LoggerInterface    $logger = null,
38
+        string             $defaultLocale = null
39
+    ) {
40 40
     $this->authorMediaManager = $container->get('swp_core_bundle.manager.author_media');
41 41
 
42 42
     parent::__construct($container, $resource, $options, $context, $parameters, $logger, $defaultLocale);
43
-  }
43
+    }
44 44
 
45
-  public function generate($meta, $parameters = [], $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) {
45
+    public function generate($meta, $parameters = [], $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) {
46 46
     if (RouteObjectInterface::OBJECT_BASED_ROUTE_NAME === $meta
47 47
         && array_key_exists(RouteObjectInterface::ROUTE_OBJECT, $parameters)
48 48
     ) {
49
-      $meta = $parameters[RouteObjectInterface::ROUTE_OBJECT];
50
-      unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
49
+        $meta = $parameters[RouteObjectInterface::ROUTE_OBJECT];
50
+        unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
51 51
     }
52 52
 
53 53
     if ($meta instanceof Meta && ($meta->getValues() instanceof AuthorMediaInterface)) {
54
-      return $this->authorMediaManager->getMediaPublicUrl($meta->getValues()->getImage());
54
+        return $this->authorMediaManager->getMediaPublicUrl($meta->getValues()->getImage());
55 55
     }
56 56
 
57 57
     return '';
58
-  }
58
+    }
59 59
 
60
-  /**
61
-   * {@inheritdoc}
62
-   */
63
-  public function supports($name) {
60
+    /**
61
+     * {@inheritdoc}
62
+     */
63
+    public function supports($name) {
64 64
     return is_string($name)  || $name instanceof Meta && ($name->getValues() instanceof AuthorMediaInterface);
65
-  }
65
+    }
66 66
 
67
-  public function getRouteDebugMessage($name, array $parameters = []) {
67
+    public function getRouteDebugMessage($name, array $parameters = []) {
68 68
     if (RouteObjectInterface::OBJECT_BASED_ROUTE_NAME === $name
69 69
         && array_key_exists(RouteObjectInterface::ROUTE_OBJECT, $parameters)
70 70
     ) {
71
-      $name = $parameters[RouteObjectInterface::ROUTE_OBJECT];
72
-      unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
71
+        $name = $parameters[RouteObjectInterface::ROUTE_OBJECT];
72
+        unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
73 73
     }
74 74
     return 'Route for article author media ' . $name->getValues()->getId() . ' not found';
75
-  }
75
+    }
76 76
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
    * {@inheritdoc}
62 62
    */
63 63
   public function supports($name) {
64
-    return is_string($name)  || $name instanceof Meta && ($name->getValues() instanceof AuthorMediaInterface);
64
+    return is_string($name) || $name instanceof Meta && ($name->getValues() instanceof AuthorMediaInterface);
65 65
   }
66 66
 
67 67
   public function getRouteDebugMessage($name, array $parameters = []) {
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
       $name = $parameters[RouteObjectInterface::ROUTE_OBJECT];
72 72
       unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
73 73
     }
74
-    return 'Route for article author media ' . $name->getValues()->getId() . ' not found';
74
+    return 'Route for article author media '.$name->getValues()->getId().' not found';
75 75
   }
76 76
 }
Please login to merge, or discard this patch.
src/SWP/Bundle/MultiTenancyBundle/Routing/TenantAwareRouter.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@
 block discarded – undo
31 31
      */
32 32
     public function generate($name, $parameters = [], $referenceType = false)
33 33
     {
34
-      if (RouteObjectInterface::OBJECT_BASED_ROUTE_NAME === $name
34
+        if (RouteObjectInterface::OBJECT_BASED_ROUTE_NAME === $name
35 35
           && array_key_exists(RouteObjectInterface::ROUTE_OBJECT, $parameters)
36
-      ) {
36
+        ) {
37 37
         $name = $parameters[RouteObjectInterface::ROUTE_OBJECT];
38 38
         unset($parameters[RouteObjectInterface::ROUTE_OBJECT]);
39
-      }
39
+        }
40 40
 
41 41
         if (null === $name && isset($parameters['content_id'])) {
42 42
             $contentId = $this->checkAndRemoveFirstSlash($parameters['content_id']);
Please login to merge, or discard this patch.