Completed
Pull Request — 1.5 (#849)
by Rafał
21:09 queued 10:35
created
src/SWP/Component/TemplatesSystem/Twig/Extension/ContainerExtension.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     }
44 44
 
45 45
     /**
46
-     * @return array|\Twig_TokenParserInterface[]
46
+     * @return ContainerTokenParser[]
47 47
      */
48 48
     public function getTokenParsers()
49 49
     {
Please login to merge, or discard this patch.
src/SWP/Component/TemplatesSystem/Twig/Node/ContainerNode.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      * @param \Twig_Node_Expression|null $parameters
27 27
      * @param \Twig_Node                 $body
28 28
      * @param null|string                $lineno
29
-     * @param null                       $tag
29
+     * @param string                       $tag
30 30
      */
31 31
     public function __construct(\Twig_Node $name, \Twig_Node_Expression $parameters = null, \Twig_Node $body, $lineno, $tag = null)
32 32
     {
Please login to merge, or discard this patch.
src/SWP/Component/TemplatesSystem/Twig/Node/GimmeListNode.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      * @param \Twig_Node|null                   $else
37 37
      * @param \Twig_Node                        $body
38 38
      * @param int                               $lineno
39
-     * @param null                              $tag
39
+     * @param string                              $tag
40 40
      */
41 41
     public function __construct(
42 42
         \Twig_Node $variable,
Please login to merge, or discard this patch.
src/SWP/Component/TemplatesSystem/Twig/Node/GimmeNode.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      * @param \Twig_Node_Expression|null $ignoreContext
30 30
      * @param \Twig_Node                 $body
31 31
      * @param int                        $lineno
32
-     * @param null                       $tag
32
+     * @param string                       $tag
33 33
      */
34 34
     public function __construct(
35 35
         \Twig_Node $annotation,
Please login to merge, or discard this patch.
src/SWP/Bundle/ContentBundle/Manager/MediaManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
     protected function retryDecider()
166 166
     {
167
-        return function (
167
+        return function(
168 168
             $retries,
169 169
             Request $request,
170 170
             Response $response = null,
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
     protected function retryDelay()
207 207
     {
208
-        return function ($numberOfRetries): int {
208
+        return function($numberOfRetries): int {
209 209
             return 1000 * $numberOfRetries;
210 210
         };
211 211
     }
Please login to merge, or discard this patch.
src/SWP/Bundle/TemplatesSystemBundle/DataCollector/ContextDataCollector.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@
 block discarded – undo
47 47
     {
48 48
         $this->data = [
49 49
             'currentPage' => $this->context->getCurrentPage() instanceof MetaInterface ?
50
-                $this->getRouteData($this->context->getCurrentPage()->getValues()) :
51
-                [],
50
+                $this->getRouteData($this->context->getCurrentPage()->getValues()) : [],
52 51
             'registeredMeta' => $this->context->getRegisteredMeta(),
53 52
         ];
54 53
     }
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Serializer/TenantHandler.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -89,19 +89,19 @@
 block discarded – undo
89 89
         }
90 90
 
91 91
         return [
92
-           'id' => $tenant->getId(),
93
-           'subdomain' => $tenant->getSubdomain(),
94
-           'domainName' => $tenant->getDomainName(),
95
-           'code' => $tenantCode,
96
-           'name' => $tenant->getName(),
97
-           'ampEnabled' => $tenant->isAmpEnabled(),
98
-           'fbiaEnabled' => $this->settingsManager->get('fbia_enabled', ScopeContext::SCOPE_TENANT, $tenant, false),
99
-           'paywallEnabled' => $this->settingsManager->get('paywall_enabled', ScopeContext::SCOPE_TENANT, $tenant, false),
100
-           '_links' => [
101
-               'self' => [
102
-                   'href' => $this->router->generate('swp_api_core_get_tenant', ['code' => $tenantCode]),
103
-               ],
104
-           ],
105
-       ];
92
+            'id' => $tenant->getId(),
93
+            'subdomain' => $tenant->getSubdomain(),
94
+            'domainName' => $tenant->getDomainName(),
95
+            'code' => $tenantCode,
96
+            'name' => $tenant->getName(),
97
+            'ampEnabled' => $tenant->isAmpEnabled(),
98
+            'fbiaEnabled' => $this->settingsManager->get('fbia_enabled', ScopeContext::SCOPE_TENANT, $tenant, false),
99
+            'paywallEnabled' => $this->settingsManager->get('paywall_enabled', ScopeContext::SCOPE_TENANT, $tenant, false),
100
+            '_links' => [
101
+                'self' => [
102
+                    'href' => $this->router->generate('swp_api_core_get_tenant', ['code' => $tenantCode]),
103
+                ],
104
+            ],
105
+        ];
106 106
     }
107 107
 }
Please login to merge, or discard this patch.
src/SWP/Bundle/TemplatesSystemBundle/Form/Type/WidgetType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 
41 41
         $builder->get('visible')
42 42
             ->addModelTransformer(new CallbackTransformer(
43
-                static function ($value) {
43
+                static function($value) {
44 44
                     return $value;
45 45
                 },
46
-                static function ($value) {
46
+                static function($value) {
47 47
                     if (is_bool($value) || in_array($value, ['true', 'false', '1', '0', null], true)) {
48 48
                         return filter_var($value, FILTER_VALIDATE_BOOLEAN);
49 49
                     }
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
 
55 55
         $builder->get('parameters')
56 56
             ->addModelTransformer(new CallbackTransformer(
57
-                static function ($value) {
57
+                static function($value) {
58 58
                     if (is_array($value)) {
59 59
                         return json_encode($value);
60 60
                     }
61 61
 
62 62
                     return $value;
63 63
                 },
64
-                static function ($value) {
64
+                static function($value) {
65 65
                     if (is_string($value)) {
66 66
                         return json_decode($value, true);
67 67
                     }
Please login to merge, or discard this patch.
src/SWP/Bundle/ContentBundle/Hydrator/ArticleHydrator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             $items = $this->filterTextItems($package->getItems());
90 90
 
91 91
             $map = $items->map(
92
-                static function (ItemInterface $item) {
92
+                static function(ItemInterface $item) {
93 93
                     return ' '.$item->getDescription();
94 94
                 }
95 95
             );
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     {
105 105
         $items = $this->filterTextItems($package->getItems());
106 106
 
107
-        $authors = array_filter(array_values(array_map(static function (ItemInterface $item) {
107
+        $authors = array_filter(array_values(array_map(static function(ItemInterface $item) {
108 108
             $metadata = $item->getMetadata();
109 109
 
110 110
             return $metadata['byline'];
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     private function filterTextItems(Collection $items): Collection
121 121
     {
122 122
         return $items->filter(
123
-            function (ItemInterface $item) {
123
+            function(ItemInterface $item) {
124 124
                 $this->ensureTypeIsAllowed($item->getType());
125 125
 
126 126
                 return ItemInterface::TYPE_TEXT === $item->getType();
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
     private function populateBody(PackageInterface $package): string
132 132
     {
133
-        return $package->getBody().' '.implode('', array_map(function (ItemInterface $item) {
133
+        return $package->getBody().' '.implode('', array_map(function(ItemInterface $item) {
134 134
             $this->ensureTypeIsAllowed($item->getType());
135 135
 
136 136
             return $item->getBody();
Please login to merge, or discard this patch.