@@ -47,7 +47,7 @@ |
||
| 47 | 47 | /** |
| 48 | 48 | * Returns a list of functions to add to the existing list. |
| 49 | 49 | * |
| 50 | - * @return array An array of functions |
|
| 50 | + * @return \Twig_SimpleFunction[] An array of functions |
|
| 51 | 51 | */ |
| 52 | 52 | public function getFunctions() |
| 53 | 53 | { |
@@ -53,6 +53,9 @@ discard block |
||
| 53 | 53 | return $paginator; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | + /** |
|
| 57 | + * @param string $indexBy |
|
| 58 | + */ |
|
| 56 | 59 | public function getIndexedArrayCollection($indexBy) |
| 57 | 60 | { |
| 58 | 61 | $qb = $this->createQueryBuilder('e')->indexBy('e', 'e.' . $indexBy); |
@@ -78,6 +81,9 @@ discard block |
||
| 78 | 81 | $this->_em->flush($entity); |
| 79 | 82 | } |
| 80 | 83 | |
| 84 | + /** |
|
| 85 | + * @param ExtensionEntity $entity |
|
| 86 | + */ |
|
| 81 | 87 | public function removeAndFlush($entity) |
| 82 | 88 | { |
| 83 | 89 | $this->_em->remove($entity); |
@@ -378,7 +378,7 @@ |
||
| 378 | 378 | /** |
| 379 | 379 | * Get list of allowed redirect codes. |
| 380 | 380 | * |
| 381 | - * @return array list of possible redirect codes |
|
| 381 | + * @return string[] list of possible redirect codes |
|
| 382 | 382 | */ |
| 383 | 383 | protected function getRedirectCodes() |
| 384 | 384 | { |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | try { |
| 222 | 222 | // execute the workflow action |
| 223 | 223 | $success = $this->workflowHelper->executeAction($entity, $action); |
| 224 | - } catch(\Exception $e) { |
|
| 224 | + } catch (\Exception $e) { |
|
| 225 | 225 | $flashBag->add('error', $this->__f('Sorry, but an error occured during the %action% action. Please apply the changes again!', ['%action%' => $action]) . ' ' . $e->getMessage()); |
| 226 | 226 | $logArgs = ['app' => 'ZikulaRoutesModule', 'user' => $this->currentUserApi->get('uname'), 'entity' => 'route', 'id' => $entity->createCompositeIdentifier(), 'errorMessage' => $e->getMessage()]; |
| 227 | 227 | $this->logger->error('{app}: User {user} tried to edit the {entity} with id {id}, but failed. Error details: {errorMessage}.', $logArgs); |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | return $this->router->generate($routePrefix . 'view'); |
| 276 | 276 | case 'userOwnView': |
| 277 | 277 | case 'adminOwnView': |
| 278 | - return $this->router->generate($routePrefix . 'view', [ 'own' => 1 ]); |
|
| 278 | + return $this->router->generate($routePrefix . 'view', ['own' => 1]); |
|
| 279 | 279 | case 'userDisplay': |
| 280 | 280 | case 'adminDisplay': |
| 281 | 281 | if ($args['commandName'] != 'delete' && !($this->templateParameters['mode'] == 'create' && $args['commandName'] == 'cancel')) { |
@@ -177,6 +177,9 @@ |
||
| 177 | 177 | return $this->container->get('zikula_extensions_module.api.variable')->set(VariableApi::CONFIG, $name, $value); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | + /** |
|
| 181 | + * @param string $name |
|
| 182 | + */ |
|
| 180 | 183 | private function getSystemVar($name) |
| 181 | 184 | { |
| 182 | 185 | return $this->container->get('zikula_extensions_module.api.variable')->getSystemVar($name); |
@@ -142,9 +142,9 @@ |
||
| 142 | 142 | $newStargArgs = str_replace(',', '&', $this->getSystemVar('startargs')); // replace comma with `&` |
| 143 | 143 | $this->setSystemVar('startargs', $newStargArgs); |
| 144 | 144 | case '2.9.11': |
| 145 | - $this->setSystemVar('shorturls', (bool) $this->getSystemVar('shorturls')); |
|
| 146 | - $this->setSystemVar('shorturlsstripentrypoint', (bool) $this->getSystemVar('shorturlsstripentrypoint')); |
|
| 147 | - $this->setSystemVar('useCompression', (bool) $this->getSystemVar('useCompression')); |
|
| 145 | + $this->setSystemVar('shorturls', (bool)$this->getSystemVar('shorturls')); |
|
| 146 | + $this->setSystemVar('shorturlsstripentrypoint', (bool)$this->getSystemVar('shorturlsstripentrypoint')); |
|
| 147 | + $this->setSystemVar('useCompression', (bool)$this->getSystemVar('useCompression')); |
|
| 148 | 148 | case '2.9.12': // ship with Core-1.4.4 |
| 149 | 149 | // reconfigure TZ settings |
| 150 | 150 | $this->setGuestTimeZone(); |
@@ -85,14 +85,14 @@ |
||
| 85 | 85 | $header .= implode("\n", $this->headers->all()) . "\n"; |
| 86 | 86 | $header .= ($this->scriptPosition == 'head') ? $this->jsResolver->compile() : ''; |
| 87 | 87 | if (strripos($source, '</head>')) { |
| 88 | - $source = str_replace('</head>', $header."\n</head>", $source); |
|
| 88 | + $source = str_replace('</head>', $header . "\n</head>", $source); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | // compile and replace foot |
| 92 | 92 | $footer = ($this->scriptPosition == 'foot') ? $this->jsResolver->compile() : ''; |
| 93 | 93 | $footer .= trim(implode("\n", $this->footers->all()) . "\n"); |
| 94 | 94 | if (false === empty($footer)) { |
| 95 | - $source = str_replace('</body>', $footer."\n</body>", $source); |
|
| 95 | + $source = str_replace('</body>', $footer . "\n</body>", $source); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | return $source; |
@@ -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 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | if ($sessionId != '') { |
| 36 | 36 | $qb->where('tbl.sesid = :sid') |
| 37 | - ->setParameter('sid', $sessionId); |
|
| 37 | + ->setParameter('sid', $sessionId); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | $query = $qb->getQuery(); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $i = 1; |
| 65 | 65 | foreach ($filters as $w_key => $w_value) { |
| 66 | 66 | $qb->andWhere($qb->expr()->eq('tbl.' . $w_key, '?' . $i)) |
| 67 | - ->setParameter($i, $w_value); |
|
| 67 | + ->setParameter($i, $w_value); |
|
| 68 | 68 | $i++; |
| 69 | 69 | } |
| 70 | 70 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | if ($sessionId != '') { |
| 106 | 106 | $qb->orWhere('tbl.sesid = :sid') |
| 107 | - ->setParameter('sid', $sessionId); |
|
| 107 | + ->setParameter('sid', $sessionId); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | $query = $qb->getQuery(); |
@@ -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 | } |
@@ -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 | } |