Completed
Push — master ( d62488...a74bba )
by Craig
05:25
created
src/system/CategoriesModule/Api/CategoryPermissionApi.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             }
49 49
             $regId = $categoryAssignment->getCategoryRegistryId();
50 50
             $catId = $categoryAssignment->getCategory()->getId();
51
-            $hasAccess = $this->permissionApi->hasPermission('ZikulaCategoriesModule:PropertyId:CategoryId', "${regId}::${catId}", $permLevel);
51
+            $hasAccess = $this->permissionApi->hasPermission('ZikulaCategoriesModule:PropertyId:CategoryId', "${regid}::${catid}", $permLevel);
52 52
             if ($requireAccessForAll && !$hasAccess) {
53 53
                 return false;
54 54
             }
Please login to merge, or discard this patch.
src/system/CategoriesModule/Form/Type/CategoryType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 'mapped' => false,
106 106
                 'required' => false
107 107
             ])
108
-            ->addEventListener(FormEvents::PRE_SET_DATA, static function (FormEvent $event) use ($translator, $options) {
108
+            ->addEventListener(FormEvents::PRE_SET_DATA, static function(FormEvent $event) use ($translator, $options) {
109 109
                 // ensure all display name and description exist for all locales
110 110
                 /** @var CategoryEntity $category */
111 111
                 $category = $event->getData();
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
                 $event->setData($category);
131 131
             })
132
-            ->addEventListener(FormEvents::SUBMIT, static function (FormEvent $event) use ($translator, $options) {
132
+            ->addEventListener(FormEvents::SUBMIT, static function(FormEvent $event) use ($translator, $options) {
133 133
                 // ensure all locales have a display name
134 134
                 /** @var CategoryEntity $category */
135 135
                 $category = $event->getData();
Please login to merge, or discard this patch.
src/system/CategoriesModule/Tests/Api/CategoryPermissionApiTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
     {
107 107
         $api = $this->getMockBuilder(PermissionApiInterface::class)
108 108
             ->getMock();
109
-        $api->method('hasPermission')->willReturnCallback(static function ($component = null, $instance = null, $level = ACCESS_NONE, $user = null) {
109
+        $api->method('hasPermission')->willReturnCallback(static function($component = null, $instance = null, $level = ACCESS_NONE, $user = null) {
110 110
             list(/*$regId*/, $catId) = explode('::', $instance);
111 111
 
112 112
             return 0 === $catId % 2;
Please login to merge, or discard this patch.
src/system/RoutesModule/Helper/Base/AbstractCollectionFilterHelper.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -163,17 +163,17 @@  discard block
 block discarded – undo
163 163
             if ((!is_numeric($v) && '' !== $v) || (is_numeric($v) && 0 < $v)) {
164 164
                 if ('workflowState' === $k && 0 === strpos($v, '!')) {
165 165
                     $qb->andWhere('tbl.' . $k . ' != :' . $k)
166
-                       ->setParameter($k, substr($v, 1));
166
+                        ->setParameter($k, substr($v, 1));
167 167
                 } elseif (0 === strpos($v, '%')) {
168 168
                     $qb->andWhere('tbl.' . $k . ' LIKE :' . $k)
169
-                       ->setParameter($k, '%' . substr($v, 1) . '%');
169
+                        ->setParameter($k, '%' . substr($v, 1) . '%');
170 170
                 } elseif (in_array($k, ['schemes', 'methods'], true)) {
171 171
                     // multi list filter
172 172
                     $qb->andWhere('tbl.' . $k . ' LIKE :' . $k)
173
-                       ->setParameter($k, '%' . $v . '%');
173
+                        ->setParameter($k, '%' . $v . '%');
174 174
                 } else {
175 175
                     $qb->andWhere('tbl.' . $k . ' = :' . $k)
176
-                       ->setParameter($k, $v);
176
+                        ->setParameter($k, $v);
177 177
                 }
178 178
             }
179 179
         }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             // per default we show approved routes only
207 207
             $onlineStates = ['approved'];
208 208
             $qb->andWhere('tbl.workflowState IN (:onlineStates)')
209
-               ->setParameter('onlineStates', $onlineStates);
209
+                ->setParameter('onlineStates', $onlineStates);
210 210
         }
211 211
     
212 212
         return $qb;
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         }
271 271
     
272 272
         $qb->andWhere('tbl.createdBy = :userId')
273
-           ->setParameter('userId', $userId);
273
+            ->setParameter('userId', $userId);
274 274
     
275 275
         return $qb;
276 276
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $this->requestStack = $requestStack;
56 56
         $this->permissionHelper = $permissionHelper;
57 57
         $this->currentUserApi = $currentUserApi;
58
-        $this->showOnlyOwnEntries = (bool)$variableApi->get('ZikulaRoutesModule', 'showOnlyOwnEntries');
58
+        $this->showOnlyOwnEntries = (bool) $variableApi->get('ZikulaRoutesModule', 'showOnlyOwnEntries');
59 59
     }
60 60
     
61 61
     /**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             return $qb;
192 192
         }
193 193
     
194
-        $showOnlyOwnEntries = (bool)$request->query->getInt('own', (int) $this->showOnlyOwnEntries);
194
+        $showOnlyOwnEntries = (bool) $request->query->getInt('own', (int) $this->showOnlyOwnEntries);
195 195
         if ($showOnlyOwnEntries) {
196 196
             $qb = $this->addCreatorFilter($qb);
197 197
         }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     {
268 268
         if (null === $userId) {
269 269
             $userId = $this->currentUserApi->isLoggedIn()
270
-                ? (int)$this->currentUserApi->get('uid')
270
+                ? (int) $this->currentUserApi->get('uid')
271 271
                 : UsersConstant::USER_ID_ANONYMOUS
272 272
             ;
273 273
         }
Please login to merge, or discard this patch.
src/system/UsersModule/Controller/AccessController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,8 @@
 block discarded – undo
123 123
                 $form = $this->createForm(DefaultLoginType::class, ['uid' => $uid]);
124 124
                 $loginFormEvent = new UserFormAwareEvent($form);
125 125
                 $eventDispatcher->dispatch($loginFormEvent, AccessEvents::AUTHENTICATION_FORM);
126
-                if ($form->count() > 3) { // count > 3 means that the AUTHENTICATION_FORM event added some form children
126
+                if ($form->count() > 3) {
127
+// count > 3 means that the AUTHENTICATION_FORM event added some form children
127 128
                     $form->handleRequest($request);
128 129
                     if ($form->isSubmitted() && $form->isValid()) {
129 130
                         $uid = $form->get('uid')->getData();
Please login to merge, or discard this patch.
src/system/RoutesModule/Twig/TwigExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 ->getPathWithBundlePrefix($route)
88 88
         );
89 89
 
90
-        $path = preg_replace_callback('#%(.*?)%#', static function ($matches) use ($container) {
90
+        $path = preg_replace_callback('#%(.*?)%#', static function($matches) use ($container) {
91 91
             return '<abbr title="' . htmlspecialchars($matches[0]) . '">'
92 92
                 . htmlspecialchars($container->getParameter($matches[1]))
93 93
                 . '</abbr>'
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
         $defaults = $route->getDefaults();
98 98
         $requirements = $route->getRequirements();
99
-        $path = preg_replace_callback('#{(.*?)}#', function ($matches) use ($defaults, $requirements) {
99
+        $path = preg_replace_callback('#{(.*?)}#', function($matches) use ($defaults, $requirements) {
100 100
             $title = '';
101 101
             if (isset($defaults[$matches[1]])) {
102 102
                 $title .= $this->trans('Default: %value%', ['%value%' => htmlspecialchars($defaults[$matches[1]])]);
Please login to merge, or discard this patch.
src/Zikula/CoreBundle/Twig/Extension/SessionExtension.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
             }
81 81
 
82 82
             // set class for the messages
83
-            $class = !empty($params['class']) ? $params['class'] : "alert alert-${bootstrapClass}";
83
+            $class = !empty($params['class']) ? $params['class'] : "alert alert-${bootstrapclass}";
84 84
             $totalMessages += $messages;
85 85
             // build output of the messages
86 86
             if (empty($params['tag']) || ('span' !== $params['tag'])) {
Please login to merge, or discard this patch.
src/Zikula/CoreBundle/Doctrine/EntityAccess.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,6 +140,6 @@
 block discarded – undo
140 140
         }
141 141
 
142 142
         $class = get_class($this);
143
-        throw new RuntimeException("Entity \"${class}\" does not have a setter for property \"${name}\". Please add ${setMethod}().");
143
+        throw new RuntimeException("Entity \"${class}\" does not have a setter for property \"${name}\". Please add ${setmethod}().");
144 144
     }
145 145
 }
Please login to merge, or discard this patch.
src/Zikula/CoreBundle/Tests/Twig/TokenParser/SwitchTokenParserTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@
 block discarded – undo
34 34
     {
35 35
         $this->tokenParser = new SwitchTokenParser();
36 36
         $this->twigParser = $this->getMockBuilder(Parser::class)
37
-             ->disableOriginalConstructor()
38
-             ->getMock();
37
+                ->disableOriginalConstructor()
38
+                ->getMock();
39 39
         $this->tokenParser->setParser($this->twigParser);
40 40
     }
41 41
 
Please login to merge, or discard this patch.