@@ -80,7 +80,8 @@ |
||
80 | 80 | $parent = $categoryRepository->find($parentId); |
81 | 81 | $category->setParent($parent); |
82 | 82 | $category->setRoot($parent->getRoot()); |
83 | - } elseif (empty($parentId) && $request->request->has('after')) { // sibling of top-level child |
|
83 | + } elseif (empty($parentId) && $request->request->has('after')) { |
|
84 | +// sibling of top-level child |
|
84 | 85 | /** @var CategoryEntity $sibling */ |
85 | 86 | $sibling = $categoryRepository->find($request->request->get('after')); |
86 | 87 | $category->setParent($sibling->getParent()); |
@@ -48,7 +48,7 @@ |
||
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 | } |
@@ -105,7 +105,7 @@ discard block |
||
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 |
||
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(); |
@@ -106,7 +106,7 @@ |
||
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; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $this->userRepo |
76 | 76 | ->method('findByUids') |
77 | 77 | ->with($this->anything()) |
78 | - ->willReturnCallback(function (array $uids) { |
|
78 | + ->willReturnCallback(function(array $uids) { |
|
79 | 79 | $groups = []; |
80 | 80 | // getGroups returns [gid => $group, gid => $group, ...] |
81 | 81 | if (in_array(self::RANDOM_USER_ID, $uids, true)) { |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $this->currentUserApi |
144 | 144 | ->method('get') |
145 | 145 | ->with($this->equalTo('uid')) |
146 | - ->willReturnCallback(static function () use ($userId) { |
|
146 | + ->willReturnCallback(static function() use ($userId) { |
|
147 | 147 | return $userId ?? Constant::USER_ID_ANONYMOUS; |
148 | 148 | }); |
149 | 149 | $api = new PermissionApi($this->permRepo, $this->userRepo, $this->currentUserApi, $this->translator); |
@@ -155,7 +155,7 @@ |
||
155 | 155 | private function setGuestTimeZone(): void |
156 | 156 | { |
157 | 157 | $existingOffset = $this->getSystemVar('timezone_offset'); |
158 | - $actualOffset = (float) $existingOffset * 60; // express in minutes |
|
158 | + $actualOffset = (float)$existingOffset * 60; // express in minutes |
|
159 | 159 | $timezoneAbbreviations = DateTimeZone::listAbbreviations(); |
160 | 160 | $timeZone = date_default_timezone_get(); |
161 | 161 | foreach ($timezoneAbbreviations as $abbreviation => $zones) { |
@@ -71,7 +71,7 @@ |
||
71 | 71 | }, |
72 | 72 | function($submittedPageTitle) { |
73 | 73 | $submittedPageTitle = str_replace( |
74 | - [$this->__('%pagetitle%'), $this->__('%sitename%'), $this->__('%modulename%')],// |
|
74 | + [$this->__('%pagetitle%'), $this->__('%sitename%'), $this->__('%modulename%')], // |
|
75 | 75 | ['%pagetitle%', '%sitename%', '%modulename%'], |
76 | 76 | $submittedPageTitle |
77 | 77 | ); |
@@ -163,17 +163,17 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | $this->setSystemVar('sessionauthkeyua', 0); |
52 | 52 | $this->setSystemVar('secure_domain'); |
53 | 53 | $this->setSystemVar('signcookies', 1); |
54 | - $this->setSystemVar('signingkey', sha1((string) (random_int(0, time())))); |
|
54 | + $this->setSystemVar('signingkey', sha1((string)(random_int(0, time())))); |
|
55 | 55 | $this->setSystemVar('seclevel', 'Medium'); |
56 | 56 | $this->setSystemVar('secmeddays', 7); |
57 | 57 | $this->setSystemVar('secinactivemins', 20); |