@@ -61,7 +61,8 @@ |
||
61 | 61 | $parent = $menuItemRepository->find($request->request->get('parent')); |
62 | 62 | $menuItemEntity->setParent($parent); |
63 | 63 | $menuItemEntity->setRoot($parent->getRoot()); |
64 | - } elseif (empty($parentId) && $request->request->has('after')) { // sibling of top-level child |
|
64 | + } elseif (empty($parentId) && $request->request->has('after')) { |
|
65 | +// sibling of top-level child |
|
65 | 66 | /** @var MenuItemEntity $sibling */ |
66 | 67 | $sibling = $menuItemRepository->find($request->request->get('after')); |
67 | 68 | $menuItemEntity->setParent($sibling->getParent()); |
@@ -266,7 +266,7 @@ |
||
266 | 266 | */ |
267 | 267 | public function creditsAction(ThemeEntityRepository $themeRepository, string $themeName): array |
268 | 268 | { |
269 | - if (!$this->hasPermission('ZikulaThemeModule::', "${themeName}::credits", ACCESS_EDIT)) { |
|
269 | + if (!$this->hasPermission('ZikulaThemeModule::', "${themename}::credits", ACCESS_EDIT)) { |
|
270 | 270 | throw new AccessDeniedException(); |
271 | 271 | } |
272 | 272 | $themeInfo = $themeRepository->findOneBy(['name' => $themeName]); |
@@ -51,8 +51,8 @@ |
||
51 | 51 | // the following process should be unnecessary because cascade = all but MySQL 5.7 not working with that (#3726) |
52 | 52 | $qb = $this->_em->createQueryBuilder(); |
53 | 53 | $qb->delete(UserAttributeEntity::class, 'a') |
54 | - ->where('a.user = :userId') |
|
55 | - ->setParameter('userId', $user->getUid()); |
|
54 | + ->where('a.user = :userId') |
|
55 | + ->setParameter('userId', $user->getUid()); |
|
56 | 56 | $query = $qb->getQuery(); |
57 | 57 | $query->execute(); |
58 | 58 | // end of theoretically unrequired process |
@@ -91,7 +91,7 @@ |
||
91 | 91 | public function gc(string $level, int $inactiveMinutes, int $days): void |
92 | 92 | { |
93 | 93 | $inactive = new DateTime(); |
94 | - $inactive->modify("-${inactiveMinutes} minutes"); |
|
94 | + $inactive->modify("-${inactiveminutes} minutes"); |
|
95 | 95 | $daysOld = new DateTime(); |
96 | 96 | $daysOld->modify("-${days} days"); |
97 | 97 |
@@ -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; |
@@ -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) { |