@@ -104,7 +104,7 @@ |
||
| 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 | |
@@ -145,7 +145,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -67,7 +67,7 @@ |
||
| 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 | { |
@@ -142,7 +142,7 @@ |
||
| 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); |
@@ -106,8 +106,8 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -39,10 +39,10 @@ |
||
| 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 | } |
@@ -122,9 +122,9 @@ |
||
| 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'; |
@@ -56,7 +56,8 @@ |
||
| 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()); |
@@ -36,12 +36,12 @@ |
||
| 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(); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $class = $this->entityCategoryClass; |
| 36 | 36 | |
| 37 | 37 | foreach ($value as $regId => $categories) { |
| 38 | - $regId = (int) substr($regId, strpos($regId, '_') + 1); |
|
| 38 | + $regId = (int)substr($regId, strpos($regId, '_') + 1); |
|
| 39 | 39 | $subCollection = new ArrayCollection(); |
| 40 | 40 | if (!is_array($categories) && $categories instanceof CategoryEntity) { |
| 41 | 41 | $categories = [$categories]; |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function display(array $properties) |
| 27 | 27 | { |
| 28 | - if (!$this->hasPermission('Onlineblock::', $properties['bid'].'::', ACCESS_READ)) { |
|
| 28 | + if (!$this->hasPermission('Onlineblock::', $properties['bid'] . '::', ACCESS_READ)) { |
|
| 29 | 29 | return ''; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | { |
| 22 | 22 | public function display(array $properties) |
| 23 | 23 | { |
| 24 | - if ($this->hasPermission('Loginblock::', $properties['title'].'::', ACCESS_READ)) { |
|
| 24 | + if ($this->hasPermission('Loginblock::', $properties['title'] . '::', ACCESS_READ)) { |
|
| 25 | 25 | if (!$this->get('zikula_users_module.current_user')->isLoggedIn()) { |
| 26 | 26 | $request = $this->get('request_stack')->getCurrentRequest(); |
| 27 | 27 | |