@@ -120,9 +120,9 @@ discard block |
||
120 | 120 | |
121 | 121 | $qb = $this->getEntityManager()->createQueryBuilder(); |
122 | 122 | $qb->update($this->mainEntityClass, 'tbl') |
123 | - ->set('tbl.createdBy', $newUserId) |
|
124 | - ->where('tbl.createdBy = :creator') |
|
125 | - ->setParameter('creator', $userId); |
|
123 | + ->set('tbl.createdBy', $newUserId) |
|
124 | + ->where('tbl.createdBy = :creator') |
|
125 | + ->setParameter('creator', $userId); |
|
126 | 126 | $query = $qb->getQuery(); |
127 | 127 | $query->execute(); |
128 | 128 | |
@@ -148,9 +148,9 @@ discard block |
||
148 | 148 | |
149 | 149 | $qb = $this->getEntityManager()->createQueryBuilder(); |
150 | 150 | $qb->update($this->mainEntityClass, 'tbl') |
151 | - ->set('tbl.updatedBy', $newUserId) |
|
152 | - ->where('tbl.updatedBy = :editor') |
|
153 | - ->setParameter('editor', $userId); |
|
151 | + ->set('tbl.updatedBy', $newUserId) |
|
152 | + ->where('tbl.updatedBy = :editor') |
|
153 | + ->setParameter('editor', $userId); |
|
154 | 154 | $query = $qb->getQuery(); |
155 | 155 | $query->execute(); |
156 | 156 | |
@@ -175,8 +175,8 @@ discard block |
||
175 | 175 | |
176 | 176 | $qb = $this->getEntityManager()->createQueryBuilder(); |
177 | 177 | $qb->delete($this->mainEntityClass, 'tbl') |
178 | - ->where('tbl.createdBy = :creator') |
|
179 | - ->setParameter('creator', $userId); |
|
178 | + ->where('tbl.createdBy = :creator') |
|
179 | + ->setParameter('creator', $userId); |
|
180 | 180 | $query = $qb->getQuery(); |
181 | 181 | $query->execute(); |
182 | 182 | |
@@ -201,8 +201,8 @@ discard block |
||
201 | 201 | |
202 | 202 | $qb = $this->getEntityManager()->createQueryBuilder(); |
203 | 203 | $qb->delete($this->mainEntityClass, 'tbl') |
204 | - ->where('tbl.updatedBy = :editor') |
|
205 | - ->setParameter('editor', $userId); |
|
204 | + ->where('tbl.updatedBy = :editor') |
|
205 | + ->setParameter('editor', $userId); |
|
206 | 206 | $query = $qb->getQuery(); |
207 | 207 | $query->execute(); |
208 | 208 | |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | { |
281 | 281 | if (0 < count($exclusions)) { |
282 | 282 | $qb->andWhere('tbl.id NOT IN (:excludedIdentifiers)') |
283 | - ->setParameter('excludedIdentifiers', $exclusions); |
|
283 | + ->setParameter('excludedIdentifiers', $exclusions); |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | return $qb; |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | $offset = ($currentPage - 1) * $resultsPerPage; |
333 | 333 | |
334 | 334 | $query->setFirstResult($offset) |
335 | - ->setMaxResults($resultsPerPage); |
|
335 | + ->setMaxResults($resultsPerPage); |
|
336 | 336 | |
337 | 337 | return $query; |
338 | 338 | } |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | |
405 | 405 | $qb = $this->getEntityManager()->createQueryBuilder(); |
406 | 406 | $qb->select($selection) |
407 | - ->from($this->mainEntityClass, 'tbl'); |
|
407 | + ->from($this->mainEntityClass, 'tbl'); |
|
408 | 408 | |
409 | 409 | if (true === $useJoins) { |
410 | 410 | $this->addJoinsToFrom($qb); |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | { |
442 | 442 | $qb = $this->getCountQuery(); |
443 | 443 | $qb->andWhere('tbl.' . $fieldName . ' = :' . $fieldName) |
444 | - ->setParameter($fieldName, $fieldValue); |
|
444 | + ->setParameter($fieldName, $fieldValue); |
|
445 | 445 | |
446 | 446 | if ($excludeId > 0) { |
447 | 447 | $qb = $this->addExclusion($qb, [$excludeId]); |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | |
478 | 478 | $qb = $this->getEntityManager()->createQueryBuilder(); |
479 | 479 | $qb->select($selection) |
480 | - ->from($this->mainEntityClass, 'tbl'); |
|
480 | + ->from($this->mainEntityClass, 'tbl'); |
|
481 | 481 | |
482 | 482 | if (true === $useJoins) { |
483 | 483 | $this->addJoinsToFrom($qb); |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | if ('RAND()' === $orderBy) { |
501 | 501 | // random selection |
502 | 502 | $qb->addSelect('MOD(tbl.id, ' . random_int(2, 15) . ') AS HIDDEN randomIdentifiers') |
503 | - ->orderBy('randomIdentifiers'); |
|
503 | + ->orderBy('randomIdentifiers'); |
|
504 | 504 | |
505 | 505 | return $qb; |
506 | 506 | } |
@@ -519,12 +519,12 @@ discard block |
||
519 | 519 | } |
520 | 520 | if (false !== strpos($orderBy, 'tbl.createdBy')) { |
521 | 521 | $qb->addSelect('tblCreator') |
522 | - ->leftJoin('tbl.createdBy', 'tblCreator'); |
|
522 | + ->leftJoin('tbl.createdBy', 'tblCreator'); |
|
523 | 523 | $orderBy = str_replace('tbl.createdBy', 'tblCreator.uname', $orderBy); |
524 | 524 | } |
525 | 525 | if (false !== strpos($orderBy, 'tbl.updatedBy')) { |
526 | 526 | $qb->addSelect('tblUpdater') |
527 | - ->leftJoin('tbl.updatedBy', 'tblUpdater'); |
|
527 | + ->leftJoin('tbl.updatedBy', 'tblUpdater'); |
|
528 | 528 | $orderBy = str_replace('tbl.updatedBy', 'tblUpdater.uname', $orderBy); |
529 | 529 | } |
530 | 530 | $qb->add('orderBy', $orderBy); |
@@ -267,7 +267,7 @@ |
||
267 | 267 | // retrieve identifier of the object we wish to edit |
268 | 268 | $routeParams = $request->get('_route_params', []); |
269 | 269 | if (array_key_exists($this->idField, $routeParams)) { |
270 | - $this->idValue = (int) !empty($routeParams[$this->idField]) ? $routeParams[$this->idField] : 0; |
|
270 | + $this->idValue = (int)!empty($routeParams[$this->idField]) ? $routeParams[$this->idField] : 0; |
|
271 | 271 | } |
272 | 272 | if (0 === $this->idValue) { |
273 | 273 | $this->idValue = $request->query->getInt($this->idField); |
@@ -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()); |
@@ -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()); |