@@ -57,7 +57,7 @@ |
||
| 57 | 57 | $i = 1; |
| 58 | 58 | foreach ($filters as $w_key => $w_value) { |
| 59 | 59 | $qb->andWhere($qb->expr()->eq('tbl.' . $w_key, '?' . $i)) |
| 60 | - ->setParameter($i, $w_value); |
|
| 60 | + ->setParameter($i, $w_value); |
|
| 61 | 61 | $i++; |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | |
| 40 | 40 | $query = $qb->getQuery(); |
| 41 | 41 | |
| 42 | - return (int)$query->getSingleScalarResult(); |
|
| 42 | + return (int) $query->getSingleScalarResult(); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public function getStats(array $filters = [], array $sorting = [], int $page = 1, int $pageSize = 25): PaginatorInterface |
@@ -41,8 +41,8 @@ |
||
| 41 | 41 | |
| 42 | 42 | $qb = $this->getEntityManager()->createQueryBuilder(); |
| 43 | 43 | $qb->delete($this->mainEntityClass, 'tbl') |
| 44 | - ->where('tbl.bundle = :bundle') |
|
| 45 | - ->setParameter('bundle', $bundleName); |
|
| 44 | + ->where('tbl.bundle = :bundle') |
|
| 45 | + ->setParameter('bundle', $bundleName); |
|
| 46 | 46 | $query = $qb->getQuery(); |
| 47 | 47 | $query->execute(); |
| 48 | 48 | } |
@@ -390,7 +390,7 @@ |
||
| 390 | 390 | ksort($menuCategories); |
| 391 | 391 | $fullTemplateName = $mode . '.' . $template; |
| 392 | 392 | |
| 393 | - return $this->render("@ZikulaAdminModule/AdminInterface/${fullTemplateName}.html.twig", [ |
|
| 393 | + return $this->render("@ZikulaAdminModule/AdminInterface/${fulltemplatename}.html.twig", [ |
|
| 394 | 394 | 'adminMenu' => ('categories' === $mode) ? $menuCategories : $menuModules, |
| 395 | 395 | 'mode' => $mode, |
| 396 | 396 | 'caller' => $caller |
@@ -250,7 +250,7 @@ |
||
| 250 | 250 | $menuText .= ' (<i class="fas fa-exclamation-triangle"></i> ' . $this->trans('invalid route') . ')'; |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | - $moduleName = (string)$adminModule['name']; |
|
| 253 | + $moduleName = (string) $adminModule['name']; |
|
| 254 | 254 | $extensionMenu = $extensionMenuCollector->get($moduleName, ExtensionMenuInterface::TYPE_ADMIN); |
| 255 | 255 | if (isset($extensionMenu) && 'modules' === $mode && 'tabs' === $template) { |
| 256 | 256 | $extensionMenu->setChildrenAttribute('class', 'dropdown-menu'); |
@@ -332,7 +332,7 @@ |
||
| 332 | 332 | ->setDefaults([ |
| 333 | 333 | // define class for underlying data (required for embedding forms) |
| 334 | 334 | 'data_class' => RouteEntity::class, |
| 335 | - 'empty_data' => function (FormInterface $form) { |
|
| 335 | + 'empty_data' => function(FormInterface $form) { |
|
| 336 | 336 | return $this->entityFactory->createRoute(); |
| 337 | 337 | }, |
| 338 | 338 | 'error_mapping' => [ |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | ->getMock(); |
| 55 | 55 | $kernel |
| 56 | 56 | ->method('getModule') |
| 57 | - ->willReturnCallback(function ($moduleName) { |
|
| 57 | + ->willReturnCallback(function($moduleName) { |
|
| 58 | 58 | if ('ExceptionModule' === $moduleName) { |
| 59 | 59 | // mocks situation where module is not namespaced. |
| 60 | 60 | throw new Exception(); |
@@ -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()); |
@@ -127,9 +127,9 @@ |
||
| 127 | 127 | $entityId = str_replace($this->domTreeNodePrefix, '', $node['id']); |
| 128 | 128 | $menuItemEntity = $menuItemRepository->find($entityId); |
| 129 | 129 | $oldParent = $request->request->get('old_parent'); |
| 130 | - $oldPosition = (int)$request->request->get('old_position'); |
|
| 130 | + $oldPosition = (int) $request->request->get('old_position'); |
|
| 131 | 131 | $parent = $request->request->get('parent'); |
| 132 | - $position = (int)$request->request->get('position'); |
|
| 132 | + $position = (int) $request->request->get('position'); |
|
| 133 | 133 | if ($oldParent === $parent) { |
| 134 | 134 | $diff = $oldPosition - $position; // if $diff is positive, then node moved up |
| 135 | 135 | $methodName = $diff > 0 ? 'moveUp' : 'moveDown'; |
@@ -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 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | ->setParameter('guestUser', Constant::USER_ID_ANONYMOUS) |
| 57 | 57 | ->getQuery(); |
| 58 | 58 | |
| 59 | - return (int)$query->getSingleScalarResult(); |
|
| 59 | + return (int) $query->getSingleScalarResult(); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | public function countGuestsSince(DateTime $dateTime): int |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | ->setParameter('guestUser', Constant::USER_ID_ANONYMOUS) |
| 70 | 70 | ->getQuery(); |
| 71 | 71 | |
| 72 | - return (int)$query->getSingleScalarResult(); |
|
| 72 | + return (int) $query->getSingleScalarResult(); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | public function clearUnsavedData(): void |
@@ -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()); |
@@ -206,9 +206,9 @@ |
||
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | $oldParent = $request->request->get('old_parent'); |
| 209 | - $oldPosition = (int)$request->request->get('old_position'); |
|
| 209 | + $oldPosition = (int) $request->request->get('old_position'); |
|
| 210 | 210 | $parent = $request->request->get('parent'); |
| 211 | - $position = (int)$request->request->get('position'); |
|
| 211 | + $position = (int) $request->request->get('position'); |
|
| 212 | 212 | if ($oldParent === $parent) { |
| 213 | 213 | $diff = $oldPosition - $position; // if $diff is positive, then node moved up |
| 214 | 214 | $methodName = $diff > 0 ? 'moveUp' : 'moveDown'; |