Completed
Push — master ( bbc096...38d354 )
by Craig
06:03 queued 21s
created
src/system/BlocksModule/Controller/PositionController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
      */
86 86
     public function deleteAction(Request $request, BlockPositionEntity $positionEntity)
87 87
     {
88
-        if (!$this->hasPermission('ZikulaBlocksModule::position', $positionEntity->getName() .'::'. $positionEntity->getPid(), ACCESS_DELETE)) {
88
+        if (!$this->hasPermission('ZikulaBlocksModule::position', $positionEntity->getName() . '::' . $positionEntity->getPid(), ACCESS_DELETE)) {
89 89
             throw new AccessDeniedException();
90 90
         }
91 91
 
Please login to merge, or discard this patch.
src/system/BlocksModule/Helper/InstallerHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
             $blockClassName = preg_match('/.*Block$/', $blockClassName) ? $blockClassName : $blockClassName . 'Block';
83 83
         } catch (\Exception $e) {
84 84
             $moduleBundle = null;
85
-            $blockClassName = '\\' . ucwords($moduleName).'\\'.'Block\\'.ucwords($blockEntity->getBkey());
85
+            $blockClassName = '\\' . ucwords($moduleName) . '\\' . 'Block\\' . ucwords($blockEntity->getBkey());
86 86
             $blockClassName = preg_match('/.*Block$/', $blockClassName) ? $blockClassName : $blockClassName . 'Block';
87 87
             $blockClassNameOld = '\\' . ucwords($moduleName) . '_' . 'Block_' . ucwords($blockEntity->getBkey());
88 88
             $blockClassName = class_exists($blockClassName) ? $blockClassName : $blockClassNameOld;
Please login to merge, or discard this patch.
src/system/RoutesModule/Translation/ZikulaPatternGenerationStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
                 || (self::STRATEGY_PREFIX_EXCEPT_DEFAULT === $this->strategy && $this->defaultLocale !== $locale)) {
105 105
                 $i18nPattern = '/' . $locale . $i18nPattern;
106 106
                 if (null !== $route->getOption('i18n_prefix')) {
107
-                    $i18nPattern = $route->getOption('i18n_prefix').$i18nPattern;
107
+                    $i18nPattern = $route->getOption('i18n_prefix') . $i18nPattern;
108 108
                 }
109 109
             }
110 110
 
Please login to merge, or discard this patch.
src/system/RoutesModule/Entity/Repository/Base/AbstractRouteRepository.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
         $qb = $this->addCommonViewFilters($qb);
534 534
     
535 535
         $query = $this->getQueryFromBuilder($qb);
536
-        $offset = ($currentPage-1) * $resultsPerPage;
536
+        $offset = ($currentPage - 1) * $resultsPerPage;
537 537
     
538 538
         $query->setFirstResult($offset)
539 539
               ->setMaxResults($resultsPerPage);
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
                 if ((!is_numeric($v) && $v != '') || (is_numeric($v) && $v > 0)) {
633 633
                     if ($k == 'workflowState' && substr($v, 0, 1) == '!') {
634 634
                         $qb->andWhere('tbl.' . $k . ' != :' . $k)
635
-                           ->setParameter($k, substr($v, 1, strlen($v)-1));
635
+                           ->setParameter($k, substr($v, 1, strlen($v) - 1));
636 636
                     } elseif (substr($v, 0, 1) == '%') {
637 637
                         $qb->andWhere('tbl.' . $k . ' LIKE :' . $k)
638 638
                            ->setParameter($k, '%' . $v . '%');
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     /**
51 51
      * Retrieves an array with all fields which can be used for sorting instances.
52 52
      *
53
-     * @return array Sorting fields array
53
+     * @return string[] Sorting fields array
54 54
      */
55 55
     public function getAllowedSortingFields()
56 56
     {
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     /**
104 104
      * Returns the request.
105 105
      *
106
-     * @return Request
106
+     * @return null|Request
107 107
      */
108 108
     public function getRequest()
109 109
     {
@@ -175,7 +175,6 @@  discard block
 block discarded – undo
175 175
     /**
176 176
      * Returns an array of additional template variables which are specific to the object type treated by this repository.
177 177
      *
178
-     * @param ImageHelper $imageHelper ImageHelper service instance
179 178
      * @param string      $context     Usage context (allowed values: controllerAction, api, actionHandler, block, contentType)
180 179
      * @param array       $args        Additional arguments
181 180
      *
@@ -421,7 +420,7 @@  discard block
 block discarded – undo
421 420
     /**
422 421
      * Selects an object from the database.
423 422
      *
424
-     * @param mixed   $id       The id (or array of ids) to use to retrieve the object (optional) (default=0)
423
+     * @param integer   $id       The id (or array of ids) to use to retrieve the object (optional) (default=0)
425 424
      * @param boolean $useJoins Whether to include joining related objects (optional) (default=true)
426 425
      * @param boolean $slimMode If activated only some basic fields are selected without using any joins (optional) (default=false)
427 426
      *
Please login to merge, or discard this patch.
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -279,9 +279,9 @@  discard block
 block discarded – undo
279 279
     
280 280
         $qb = $this->getEntityManager()->createQueryBuilder();
281 281
         $qb->update('Zikula\RoutesModule\Entity\RouteEntity', 'tbl')
282
-           ->set('tbl.createdBy', $newUserId)
283
-           ->where('tbl.createdBy = :creator')
284
-           ->setParameter('creator', $userId);
282
+            ->set('tbl.createdBy', $newUserId)
283
+            ->where('tbl.createdBy = :creator')
284
+            ->setParameter('creator', $userId);
285 285
         $query = $qb->getQuery();
286 286
         $query->execute();
287 287
     
@@ -312,9 +312,9 @@  discard block
 block discarded – undo
312 312
     
313 313
         $qb = $this->getEntityManager()->createQueryBuilder();
314 314
         $qb->update('Zikula\RoutesModule\Entity\RouteEntity', 'tbl')
315
-           ->set('tbl.updatedBy', $newUserId)
316
-           ->where('tbl.updatedBy = :editor')
317
-           ->setParameter('editor', $userId);
315
+            ->set('tbl.updatedBy', $newUserId)
316
+            ->where('tbl.updatedBy = :editor')
317
+            ->setParameter('editor', $userId);
318 318
         $query = $qb->getQuery();
319 319
         $query->execute();
320 320
     
@@ -343,8 +343,8 @@  discard block
 block discarded – undo
343 343
     
344 344
         $qb = $this->getEntityManager()->createQueryBuilder();
345 345
         $qb->delete('Zikula\RoutesModule\Entity\RouteEntity', 'tbl')
346
-           ->where('tbl.createdBy = :creator')
347
-           ->setParameter('creator', $userId);
346
+            ->where('tbl.createdBy = :creator')
347
+            ->setParameter('creator', $userId);
348 348
         $query = $qb->getQuery();
349 349
     
350 350
         $query->execute();
@@ -374,8 +374,8 @@  discard block
 block discarded – undo
374 374
     
375 375
         $qb = $this->getEntityManager()->createQueryBuilder();
376 376
         $qb->delete('Zikula\RoutesModule\Entity\RouteEntity', 'tbl')
377
-           ->where('tbl.updatedBy = :editor')
378
-           ->setParameter('editor', $userId);
377
+            ->where('tbl.updatedBy = :editor')
378
+            ->setParameter('editor', $userId);
379 379
         $query = $qb->getQuery();
380 380
     
381 381
         $query->execute();
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     {
472 472
         if ($excludeId > 0) {
473 473
             $qb->andWhere('tbl.id != :excludeId')
474
-               ->setParameter('excludeId', $excludeId);
474
+                ->setParameter('excludeId', $excludeId);
475 475
         }
476 476
     
477 477
         return $qb;
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
         $offset = ($currentPage-1) * $resultsPerPage;
534 534
     
535 535
         $query->setFirstResult($offset)
536
-              ->setMaxResults($resultsPerPage);
536
+                ->setMaxResults($resultsPerPage);
537 537
     
538 538
         return $query;
539 539
     }
@@ -599,14 +599,14 @@  discard block
 block discarded – undo
599 599
                 if ((!is_numeric($v) && $v != '') || (is_numeric($v) && $v > 0)) {
600 600
                     if ($k == 'workflowState' && substr($v, 0, 1) == '!') {
601 601
                         $qb->andWhere('tbl.' . $k . ' != :' . $k)
602
-                           ->setParameter($k, substr($v, 1, strlen($v)-1));
602
+                            ->setParameter($k, substr($v, 1, strlen($v)-1));
603 603
                     } elseif (substr($v, 0, 1) == '%') {
604 604
                         $qb->andWhere('tbl.' . $k . ' LIKE :' . $k)
605
-                           ->setParameter($k, '%' . $v . '%');
605
+                            ->setParameter($k, '%' . $v . '%');
606 606
                     } else {
607 607
                         $qb->andWhere('tbl.' . $k . ' = :' . $k)
608
-                           ->setParameter($k, $v);
609
-                   }
608
+                            ->setParameter($k, $v);
609
+                    }
610 610
                 }
611 611
             }
612 612
         }
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
         $parameters['searchGroup'] = '%' . $fragment . '%';
704 704
     
705 705
         $qb->andWhere('(' . implode(' OR ', $filters) . ')')
706
-           ->setParameters($parameters);
706
+            ->setParameters($parameters);
707 707
     
708 708
         return $qb;
709 709
     }
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
     
757 757
         $qb = $this->getEntityManager()->createQueryBuilder();
758 758
         $qb->select($selection)
759
-           ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl');
759
+            ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl');
760 760
     
761 761
         if (true === $useJoins) {
762 762
             $this->addJoinsToFrom($qb);
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
     {
802 802
         $qb = $this->getCountQuery('', false);
803 803
         $qb->andWhere('tbl.' . $fieldName . ' = :' . $fieldName)
804
-           ->setParameter($fieldName, $fieldValue);
804
+            ->setParameter($fieldName, $fieldValue);
805 805
     
806 806
         $qb = $this->addExclusion($qb, $excludeId);
807 807
     
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
     
848 848
         $qb = $this->getEntityManager()->createQueryBuilder();
849 849
         $qb->select($selection)
850
-           ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl');
850
+            ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl');
851 851
     
852 852
         if (true === $useJoins) {
853 853
             $this->addJoinsToFrom($qb);
@@ -921,7 +921,7 @@  discard block
 block discarded – undo
921 921
             
922 922
             $userId = $this->getRequest()->getSession()->get('uid');
923 923
             $qb->andWhere('tbl.createdBy = :creator')
924
-               ->setParameter('creator', $userId);
924
+                ->setParameter('creator', $userId);
925 925
         }
926 926
     
927 927
         return $qb;
@@ -940,7 +940,7 @@  discard block
 block discarded – undo
940 940
         if ($orderBy == 'RAND()') {
941 941
             // random selection
942 942
             $qb->addSelect('MOD(tbl.id, ' . mt_rand(2, 15) . ') AS HIDDEN randomIdentifiers')
943
-               ->add('orderBy', 'randomIdentifiers');
943
+                ->add('orderBy', 'randomIdentifiers');
944 944
             $orderBy = '';
945 945
         } elseif (empty($orderBy)) {
946 946
             $orderBy = $this->defaultSortingField;
@@ -953,12 +953,12 @@  discard block
 block discarded – undo
953 953
             }
954 954
             if (false !== strpos($orderBy, 'tbl.createdBy')) {
955 955
                 $qb->addSelect('tblCreator')
956
-                   ->leftJoin('tbl.createdBy', 'tblCreator');
956
+                    ->leftJoin('tbl.createdBy', 'tblCreator');
957 957
                 $orderBy = str_replace('tbl.createdBy', 'tblCreator.uname', $orderBy);
958 958
             }
959 959
             if (false !== strpos($orderBy, 'tbl.updatedBy')) {
960 960
                 $qb->addSelect('tblUpdater')
961
-                   ->leftJoin('tbl.updatedBy', 'tblUpdater');
961
+                    ->leftJoin('tbl.updatedBy', 'tblUpdater');
962 962
                 $orderBy = str_replace('tbl.updatedBy', 'tblUpdater.uname', $orderBy);
963 963
             }
964 964
             $qb->add('orderBy', $orderBy);
Please login to merge, or discard this patch.
src/system/RoutesModule/Helper/Base/AbstractControllerHelper.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             } else {
146 146
                 // single identifier
147 147
                 if (array_key_exists($idField, $routeParams)) {
148
-                    $id = (int) !empty($routeParams[$idField]) ? $routeParams[$idField] : $defaultValue;
148
+                    $id = (int)!empty($routeParams[$idField]) ? $routeParams[$idField] : $defaultValue;
149 149
                 } elseif ($request->query->has($idField)) {
150 150
                     $id = $request->query->getInt($idField, $defaultValue);
151 151
                 } else {
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
             if (!$id && $idField != 'id' && count($idFields) == 1) {
158 158
                 $defaultValue = isset($args['id']) && is_numeric($args['id']) ? $args['id'] : 0;
159 159
                 if (array_key_exists('id', $routeParams)) {
160
-                    $id = (int) !empty($routeParams['id']) ? $routeParams['id'] : $defaultValue;
160
+                    $id = (int)!empty($routeParams['id']) ? $routeParams['id'] : $defaultValue;
161 161
                 } elseif ($request->query->has('id')) {
162
-                    $id = (int) $request->query->getInt('id', $defaultValue);
162
+                    $id = (int)$request->query->getInt('id', $defaultValue);
163 163
                 } else {
164 164
                     $id = $defaultValue;
165 165
                 }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
      * @param string $context Usage context (allowed values: controllerAction, api, helper, actionHandler, block, contentType, util)
68 68
      * @param array  $args    Additional arguments
69 69
      *
70
-     * @return array List of allowed object types
70
+     * @return string[] List of allowed object types
71 71
      */
72 72
     public function getObjectTypes($context = '', $args = [])
73 73
     {
Please login to merge, or discard this patch.
src/system/RoutesModule/Helper/Base/AbstractSelectionHelper.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
         $slimMode = (bool) $slimMode; 
143 143
     
144 144
         if (!empty($idList)) {
145
-           return $repository->selectByIdList($idList, $useJoins, $slimMode);
145
+            return $repository->selectByIdList($idList, $useJoins, $slimMode);
146 146
         }
147 147
     
148 148
         return $repository->selectWhere($where, $orderBy, $useJoins, $slimMode);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
     
107 107
         $repository = $this->getRepository($objectType);
108 108
     
109
-        $useJoins = (bool) $useJoins;
110
-        $slimMode = (bool) $slimMode; 
109
+        $useJoins = (bool)$useJoins;
110
+        $slimMode = (bool)$slimMode; 
111 111
     
112 112
         $entity = $repository->selectById($id, $useJoins, $slimMode);
113 113
     
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
         }
134 134
         $repository = $this->getRepository($objectType);
135 135
     
136
-        $useJoins = (bool) $useJoins;
137
-        $slimMode = (bool) $slimMode; 
136
+        $useJoins = (bool)$useJoins;
137
+        $slimMode = (bool)$slimMode; 
138 138
     
139 139
         if (!empty($idList)) {
140 140
            return $repository->selectByIdList($idList, $useJoins, $slimMode);
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
         }
164 164
         $repository = $this->getRepository($objectType);
165 165
     
166
-        $useJoins = (bool) $useJoins;
167
-        $slimMode = (bool) $slimMode; 
166
+        $useJoins = (bool)$useJoins;
167
+        $slimMode = (bool)$slimMode; 
168 168
     
169 169
         return $repository->selectWherePaginated($where, $orderBy, $currentPage, $resultsPerPage, $useJoins, $slimMode);
170 170
     }
Please login to merge, or discard this patch.
src/system/MenuModule/Block/Form/Type/MenuType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,10 +39,10 @@
 block discarded – undo
39 39
         ;
40 40
         $builder->get('options')
41 41
             ->addModelTransformer(new CallbackTransformer(
42
-                function ($text) {
42
+                function($text) {
43 43
                     return $text;
44 44
                 },
45
-                function ($text) {
45
+                function($text) {
46 46
                     if (empty($text)) {
47 47
                         return '{}';
48 48
                     }
Please login to merge, or discard this patch.
src/system/MenuModule/Controller/NodeController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,9 +122,9 @@
 block discarded – undo
122 122
         $entityId = str_replace($this->domTreeNodePrefix, '', $node['id']);
123 123
         $menuItemEntity = $repo->find($entityId);
124 124
         $oldParent = $request->request->get('old_parent');
125
-        $oldPosition = (int) $request->request->get('old_position');
125
+        $oldPosition = (int)$request->request->get('old_position');
126 126
         $parent = $request->request->get('parent');
127
-        $position = (int) $request->request->get('position');
127
+        $position = (int)$request->request->get('position');
128 128
         if ($oldParent == $parent) {
129 129
             $diff = $oldPosition - $position; // if $diff is positive, then node moved up
130 130
             $methodName = $diff > 0 ? 'moveUp' : 'moveDown';
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,8 @@
 block discarded – undo
56 56
                         $parent = $repo->find($request->request->get('parent'));
57 57
                         $menuItemEntity->setParent($parent);
58 58
                         $menuItemEntity->setRoot($parent->getRoot());
59
-                    } elseif (empty($parent) && $request->request->has('after')) { // sibling of top-level child
59
+                    } elseif (empty($parent) && $request->request->has('after')) {
60
+// sibling of top-level child
60 61
                         $sibling = $repo->find($request->request->get('after'));
61 62
                         $menuItemEntity->setParent($sibling->getParent());
62 63
                         $menuItemEntity->setRoot($sibling->getRoot());
Please login to merge, or discard this patch.
src/system/CategoriesModule/Entity/Repository/CategoryRepository.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@
 block discarded – undo
36 36
 
37 37
         if ($parentId > 0) {
38 38
             $qb->andWhere('c.parent = :parentid')
39
-               ->setParameter('parentid', $parentId);
39
+                ->setParameter('parentid', $parentId);
40 40
         }
41 41
 
42 42
         if ($excludedId > 0) {
43 43
             $qb->andWhere('c.id != :id')
44
-               ->setParameter('id', $excludedId);
44
+                ->setParameter('id', $excludedId);
45 45
         }
46 46
 
47 47
         $query = $qb->getQuery();
Please login to merge, or discard this patch.