@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | /** |
| 51 | 51 | * Retrieves an array with all fields which can be used for sorting instances. |
| 52 | 52 | * |
| 53 | - * @return array Sorting fields array |
|
| 53 | + * @return string[] Sorting fields array |
|
| 54 | 54 | */ |
| 55 | 55 | public function getAllowedSortingFields() |
| 56 | 56 | { |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | /** |
| 104 | 104 | * Returns the request. |
| 105 | 105 | * |
| 106 | - * @return Request |
|
| 106 | + * @return null|Request |
|
| 107 | 107 | */ |
| 108 | 108 | public function getRequest() |
| 109 | 109 | { |
@@ -169,7 +169,6 @@ discard block |
||
| 169 | 169 | /** |
| 170 | 170 | * Returns an array of additional template variables which are specific to the object type treated by this repository. |
| 171 | 171 | * |
| 172 | - * @param ImageHelper $imageHelper ImageHelper service instance |
|
| 173 | 172 | * @param string $context Usage context (allowed values: controllerAction, api, actionHandler, block, contentType) |
| 174 | 173 | * @param array $args Additional arguments |
| 175 | 174 | * |
@@ -415,7 +414,7 @@ discard block |
||
| 415 | 414 | /** |
| 416 | 415 | * Selects an object from the database. |
| 417 | 416 | * |
| 418 | - * @param mixed $id The id (or array of ids) to use to retrieve the object (optional) (default=0) |
|
| 417 | + * @param integer $id The id (or array of ids) to use to retrieve the object (optional) (default=0) |
|
| 419 | 418 | * @param boolean $useJoins Whether to include joining related objects (optional) (default=true) |
| 420 | 419 | * @param boolean $slimMode If activated only some basic fields are selected without using any joins (optional) (default=false) |
| 421 | 420 | * |
@@ -457,7 +456,7 @@ discard block |
||
| 457 | 456 | * Adds where clauses excluding desired identifiers from selection. |
| 458 | 457 | * |
| 459 | 458 | * @param QueryBuilder $qb Query builder to be enhanced |
| 460 | - * @param array $excludesions Array of ids to be excluded from selection |
|
| 459 | + * @param array $exclusions Array of ids to be excluded from selection |
|
| 461 | 460 | * |
| 462 | 461 | * @return QueryBuilder Enriched query builder instance |
| 463 | 462 | */ |
@@ -273,9 +273,9 @@ discard block |
||
| 273 | 273 | |
| 274 | 274 | $qb = $this->getEntityManager()->createQueryBuilder(); |
| 275 | 275 | $qb->update('Zikula\RoutesModule\Entity\RouteEntity', 'tbl') |
| 276 | - ->set('tbl.createdBy', $newUserId) |
|
| 277 | - ->where('tbl.createdBy = :creator') |
|
| 278 | - ->setParameter('creator', $userId); |
|
| 276 | + ->set('tbl.createdBy', $newUserId) |
|
| 277 | + ->where('tbl.createdBy = :creator') |
|
| 278 | + ->setParameter('creator', $userId); |
|
| 279 | 279 | $query = $qb->getQuery(); |
| 280 | 280 | $query->execute(); |
| 281 | 281 | |
@@ -306,9 +306,9 @@ discard block |
||
| 306 | 306 | |
| 307 | 307 | $qb = $this->getEntityManager()->createQueryBuilder(); |
| 308 | 308 | $qb->update('Zikula\RoutesModule\Entity\RouteEntity', 'tbl') |
| 309 | - ->set('tbl.updatedBy', $newUserId) |
|
| 310 | - ->where('tbl.updatedBy = :editor') |
|
| 311 | - ->setParameter('editor', $userId); |
|
| 309 | + ->set('tbl.updatedBy', $newUserId) |
|
| 310 | + ->where('tbl.updatedBy = :editor') |
|
| 311 | + ->setParameter('editor', $userId); |
|
| 312 | 312 | $query = $qb->getQuery(); |
| 313 | 313 | $query->execute(); |
| 314 | 314 | |
@@ -337,8 +337,8 @@ discard block |
||
| 337 | 337 | |
| 338 | 338 | $qb = $this->getEntityManager()->createQueryBuilder(); |
| 339 | 339 | $qb->delete('Zikula\RoutesModule\Entity\RouteEntity', 'tbl') |
| 340 | - ->where('tbl.createdBy = :creator') |
|
| 341 | - ->setParameter('creator', $userId); |
|
| 340 | + ->where('tbl.createdBy = :creator') |
|
| 341 | + ->setParameter('creator', $userId); |
|
| 342 | 342 | $query = $qb->getQuery(); |
| 343 | 343 | |
| 344 | 344 | $query->execute(); |
@@ -368,8 +368,8 @@ discard block |
||
| 368 | 368 | |
| 369 | 369 | $qb = $this->getEntityManager()->createQueryBuilder(); |
| 370 | 370 | $qb->delete('Zikula\RoutesModule\Entity\RouteEntity', 'tbl') |
| 371 | - ->where('tbl.updatedBy = :editor') |
|
| 372 | - ->setParameter('editor', $userId); |
|
| 371 | + ->where('tbl.updatedBy = :editor') |
|
| 372 | + ->setParameter('editor', $userId); |
|
| 373 | 373 | $query = $qb->getQuery(); |
| 374 | 374 | |
| 375 | 375 | $query->execute(); |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | { |
| 466 | 466 | if (count($exclusions) > 0) { |
| 467 | 467 | $qb->andWhere('tbl.id NOT IN (:excludedIdentifiers)') |
| 468 | - ->setParameter('excludedIdentifiers', $exclusions); |
|
| 468 | + ->setParameter('excludedIdentifiers', $exclusions); |
|
| 469 | 469 | } |
| 470 | 470 | |
| 471 | 471 | return $qb; |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | $offset = ($currentPage-1) * $resultsPerPage; |
| 526 | 526 | |
| 527 | 527 | $query->setFirstResult($offset) |
| 528 | - ->setMaxResults($resultsPerPage); |
|
| 528 | + ->setMaxResults($resultsPerPage); |
|
| 529 | 529 | |
| 530 | 530 | return $query; |
| 531 | 531 | } |
@@ -588,14 +588,14 @@ discard block |
||
| 588 | 588 | if ((!is_numeric($v) && $v != '') || (is_numeric($v) && $v > 0)) { |
| 589 | 589 | if ($k == 'workflowState' && substr($v, 0, 1) == '!') { |
| 590 | 590 | $qb->andWhere('tbl.' . $k . ' != :' . $k) |
| 591 | - ->setParameter($k, substr($v, 1, strlen($v)-1)); |
|
| 591 | + ->setParameter($k, substr($v, 1, strlen($v)-1)); |
|
| 592 | 592 | } elseif (substr($v, 0, 1) == '%') { |
| 593 | 593 | $qb->andWhere('tbl.' . $k . ' LIKE :' . $k) |
| 594 | - ->setParameter($k, '%' . $v . '%'); |
|
| 594 | + ->setParameter($k, '%' . $v . '%'); |
|
| 595 | 595 | } else { |
| 596 | 596 | $qb->andWhere('tbl.' . $k . ' = :' . $k) |
| 597 | - ->setParameter($k, $v); |
|
| 598 | - } |
|
| 597 | + ->setParameter($k, $v); |
|
| 598 | + } |
|
| 599 | 599 | } |
| 600 | 600 | } |
| 601 | 601 | } |
@@ -745,7 +745,7 @@ discard block |
||
| 745 | 745 | |
| 746 | 746 | $qb = $this->getEntityManager()->createQueryBuilder(); |
| 747 | 747 | $qb->select($selection) |
| 748 | - ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl'); |
|
| 748 | + ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl'); |
|
| 749 | 749 | |
| 750 | 750 | if (true === $useJoins) { |
| 751 | 751 | $this->addJoinsToFrom($qb); |
@@ -790,7 +790,7 @@ discard block |
||
| 790 | 790 | { |
| 791 | 791 | $qb = $this->getCountQuery('', false); |
| 792 | 792 | $qb->andWhere('tbl.' . $fieldName . ' = :' . $fieldName) |
| 793 | - ->setParameter($fieldName, $fieldValue); |
|
| 793 | + ->setParameter($fieldName, $fieldValue); |
|
| 794 | 794 | |
| 795 | 795 | $qb = $this->addExclusion($qb, [$excludeId]); |
| 796 | 796 | |
@@ -836,7 +836,7 @@ discard block |
||
| 836 | 836 | |
| 837 | 837 | $qb = $this->getEntityManager()->createQueryBuilder(); |
| 838 | 838 | $qb->select($selection) |
| 839 | - ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl'); |
|
| 839 | + ->from('Zikula\RoutesModule\Entity\RouteEntity', 'tbl'); |
|
| 840 | 840 | |
| 841 | 841 | if (true === $useJoins) { |
| 842 | 842 | $this->addJoinsToFrom($qb); |
@@ -910,7 +910,7 @@ discard block |
||
| 910 | 910 | |
| 911 | 911 | $userId = $this->getRequest()->getSession()->get('uid'); |
| 912 | 912 | $qb->andWhere('tbl.createdBy = :creator') |
| 913 | - ->setParameter('creator', $userId); |
|
| 913 | + ->setParameter('creator', $userId); |
|
| 914 | 914 | } |
| 915 | 915 | |
| 916 | 916 | return $qb; |
@@ -929,7 +929,7 @@ discard block |
||
| 929 | 929 | if ($orderBy == 'RAND()') { |
| 930 | 930 | // random selection |
| 931 | 931 | $qb->addSelect('MOD(tbl.id, ' . mt_rand(2, 15) . ') AS HIDDEN randomIdentifiers') |
| 932 | - ->add('orderBy', 'randomIdentifiers'); |
|
| 932 | + ->add('orderBy', 'randomIdentifiers'); |
|
| 933 | 933 | $orderBy = ''; |
| 934 | 934 | } elseif (empty($orderBy)) { |
| 935 | 935 | $orderBy = $this->defaultSortingField; |
@@ -942,12 +942,12 @@ discard block |
||
| 942 | 942 | } |
| 943 | 943 | if (false !== strpos($orderBy, 'tbl.createdBy')) { |
| 944 | 944 | $qb->addSelect('tblCreator') |
| 945 | - ->leftJoin('tbl.createdBy', 'tblCreator'); |
|
| 945 | + ->leftJoin('tbl.createdBy', 'tblCreator'); |
|
| 946 | 946 | $orderBy = str_replace('tbl.createdBy', 'tblCreator.uname', $orderBy); |
| 947 | 947 | } |
| 948 | 948 | if (false !== strpos($orderBy, 'tbl.updatedBy')) { |
| 949 | 949 | $qb->addSelect('tblUpdater') |
| 950 | - ->leftJoin('tbl.updatedBy', 'tblUpdater'); |
|
| 950 | + ->leftJoin('tbl.updatedBy', 'tblUpdater'); |
|
| 951 | 951 | $orderBy = str_replace('tbl.updatedBy', 'tblUpdater.uname', $orderBy); |
| 952 | 952 | } |
| 953 | 953 | $qb->add('orderBy', $orderBy); |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function load(array $configs, ContainerBuilder $container) |
| 28 | 28 | { |
| 29 | - $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__.'/../Resources/config'))); |
|
| 29 | + $loader = new YamlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Resources/config'))); |
|
| 30 | 30 | |
| 31 | 31 | $loader->load('services.yml'); |
| 32 | 32 | $loader->load('doctrine.yml'); |