@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $qb->from('ZikulaUsersModule:UserEntity', 'u'); |
| 109 | 109 | $qb->andWhere($qb->expr()->eq('tbl.user', 'u.uid')); |
| 110 | 110 | $qb->andWhere($qb->expr()->eq('tbl.user', ':uid')) |
| 111 | - ->setParameter('uid', $uid); |
|
| 111 | + ->setParameter('uid', $uid); |
|
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $i = 1; |
| 118 | 118 | foreach ($filters as $w_key => $w_value) { |
| 119 | 119 | $qb->andWhere($qb->expr()->eq('tbl.' . $w_key, '?' . $i)) |
| 120 | - ->setParameter($i, $w_value); |
|
| 120 | + ->setParameter($i, $w_value); |
|
| 121 | 121 | $i++; |
| 122 | 122 | } |
| 123 | 123 | } |
@@ -144,12 +144,12 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | if ($fieldName == 'uid') { |
| 146 | 146 | $qb->select('DISTINCT(u.' . $fieldName . ')') |
| 147 | - ->from('ZikulaUsersModule:UserEntity', 'u') |
|
| 148 | - ->where($qb->expr()->eq('tbl.user', 'u.uid')) |
|
| 149 | - ->addOrderBy('u.uname', 'ASC'); |
|
| 147 | + ->from('ZikulaUsersModule:UserEntity', 'u') |
|
| 148 | + ->where($qb->expr()->eq('tbl.user', 'u.uid')) |
|
| 149 | + ->addOrderBy('u.uname', 'ASC'); |
|
| 150 | 150 | } else { |
| 151 | 151 | $qb->select('DISTINCT(tbl.' . $fieldName . ')') |
| 152 | - ->addOrderBy('tbl.' . $fieldName, 'ASC'); |
|
| 152 | + ->addOrderBy('tbl.' . $fieldName, 'ASC'); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | $query = $qb->getQuery(); |
@@ -184,9 +184,9 @@ |
||
| 184 | 184 | $ldir = dirname(__FILE__); |
| 185 | 185 | $p = strpos($ldir, DIRECTORY_SEPARATOR . 'system'); // we are in system/AdminModule |
| 186 | 186 | $b = substr($ldir, 0, $p); |
| 187 | - $filePath = $b.'/'.$appDir.'/.htaccess'; |
|
| 187 | + $filePath = $b . '/' . $appDir . '/.htaccess'; |
|
| 188 | 188 | } else { |
| 189 | - $filePath = $appDir.'/.htaccess'; |
|
| 189 | + $filePath = $appDir . '/.htaccess'; |
|
| 190 | 190 | } |
| 191 | 191 | $app_htaccess = file_exists($filePath); |
| 192 | 192 | } |
@@ -25,6 +25,9 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | private $extensionStateMap = []; |
| 27 | 27 | |
| 28 | + /** |
|
| 29 | + * @param ZikulaKernel $kernel |
|
| 30 | + */ |
|
| 28 | 31 | public function getConnection($kernel) |
| 29 | 32 | { |
| 30 | 33 | // get bundles from persistence |
@@ -88,7 +91,7 @@ discard block |
||
| 88 | 91 | * @param string $class |
| 89 | 92 | * @param string $type |
| 90 | 93 | * |
| 91 | - * @return bool |
|
| 94 | + * @return boolean|null |
|
| 92 | 95 | */ |
| 93 | 96 | private function extensionIsActive(ZikulaKernel $kernel, $conn, $class, $type) |
| 94 | 97 | { |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | * Handle an AccessDeniedException |
| 86 | 86 | * |
| 87 | 87 | * @param GetResponseForExceptionEvent $event |
| 88 | - * @param $userLoggedIn |
|
| 88 | + * @param boolean $userLoggedIn |
|
| 89 | 89 | * @param string $message a custom error message (default: 'Access Denied') (The default message from Symfony) |
| 90 | 90 | * @see http://api.symfony.com/2.8/Symfony/Component/Security/Core/Exception/AccessDeniedException.html |
| 91 | 91 | */ |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | /** |
| 56 | 56 | * Returns the operators the plugin can handle. |
| 57 | 57 | * |
| 58 | - * @return array Operators |
|
| 58 | + * @return string[] Operators |
|
| 59 | 59 | */ |
| 60 | 60 | public function availableOperators() |
| 61 | 61 | { |
@@ -69,9 +69,9 @@ discard block |
||
| 69 | 69 | $config = $this->config; |
| 70 | 70 | $alias = $config->getAlias(); |
| 71 | 71 | $qb = $config->getQueryBuilder(); |
| 72 | - $qb->join($alias.'.categories', $alias.'_cat_plugin')->join( |
|
| 73 | - $alias.'_cat_plugin.category', |
|
| 74 | - $alias.'_cat_plugin_category' |
|
| 72 | + $qb->join($alias . '.categories', $alias . '_cat_plugin')->join( |
|
| 73 | + $alias . '_cat_plugin.category', |
|
| 74 | + $alias . '_cat_plugin_category' |
|
| 75 | 75 | ); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | if (empty($property)) { |
| 86 | 86 | $this->property = null; |
| 87 | 87 | } else { |
| 88 | - $this->property = (array) $property; |
|
| 88 | + $this->property = (array)$property; |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |
@@ -131,10 +131,10 @@ discard block |
||
| 131 | 131 | $alias = $config->getAlias(); |
| 132 | 132 | $expr = $config->getQueryBuilder()->expr(); |
| 133 | 133 | if ($op == 'sub' || is_numeric($value)) { |
| 134 | - $column = $alias.'_cat_plugin_category.id'; |
|
| 134 | + $column = $alias . '_cat_plugin_category.id'; |
|
| 135 | 135 | $prop = 'id'; |
| 136 | 136 | } else { |
| 137 | - $column = $alias.'_cat_plugin_category.name'; |
|
| 137 | + $column = $alias . '_cat_plugin_category.name'; |
|
| 138 | 138 | $prop = 'name'; |
| 139 | 139 | } |
| 140 | 140 | $con = null; |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | } |
| 159 | 159 | if (null !== $this->modname && null !== $this->property) { |
| 160 | 160 | $propertyCon = $expr->in( |
| 161 | - $alias.'_cat_plugin.categoryRegistryId', |
|
| 161 | + $alias . '_cat_plugin.categoryRegistryId', |
|
| 162 | 162 | $config->toParam($this->getRegistryIds(), 'category', $field) |
| 163 | 163 | ); |
| 164 | 164 | if (null !== $con) { |
@@ -31,6 +31,10 @@ |
||
| 31 | 31 | $this->linkContainers[$linkContainer->getBundleName()] = $linkContainer; |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | + /** |
|
| 35 | + * @param string $containerName |
|
| 36 | + * @param string $type |
|
| 37 | + */ |
|
| 34 | 38 | public function getLinks($containerName, $type = LinkContainerInterface::TYPE_ADMIN) |
| 35 | 39 | { |
| 36 | 40 | $links = []; |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | * This function must consider all the released versions of the module! |
| 56 | 56 | * If the upgrade fails at some point, it returns the last upgraded version. |
| 57 | 57 | * |
| 58 | - * @param string $oldversion Version number string to upgrade from |
|
| 58 | + * @param string $oldVersion Version number string to upgrade from |
|
| 59 | 59 | * |
| 60 | 60 | * @return boolean|string True on success, last valid version string or false if fails |
| 61 | 61 | */ |
@@ -49,7 +49,6 @@ |
||
| 49 | 49 | * Example: |
| 50 | 50 | * {{ route.defaults|zikularoutesmodule_arrayToString }} |
| 51 | 51 | * |
| 52 | - * @param array $array The input array. |
|
| 53 | 52 | * |
| 54 | 53 | * @return string Output string for display. |
| 55 | 54 | */ |
@@ -106,13 +106,13 @@ |
||
| 106 | 106 | $path = htmlspecialchars($route->getPathWithBundlePrefix()); |
| 107 | 107 | $container = $this->container; |
| 108 | 108 | |
| 109 | - $path = preg_replace_callback('#%(.*?)%#', function ($matches) use ($container) { |
|
| 109 | + $path = preg_replace_callback('#%(.*?)%#', function($matches) use ($container) { |
|
| 110 | 110 | return '<abbr title="' . htmlspecialchars($matches[0]) . '">' . htmlspecialchars($container->getParameter($matches[1])) . '</abbr>'; |
| 111 | 111 | }, $path); |
| 112 | 112 | |
| 113 | 113 | $defaults = $route->getDefaults(); |
| 114 | 114 | $requirements = $route->getRequirements(); |
| 115 | - $path = preg_replace_callback('#{(.*?)}#', function ($matches) use ($defaults, $requirements) { |
|
| 115 | + $path = preg_replace_callback('#{(.*?)}#', function($matches) use ($defaults, $requirements) { |
|
| 116 | 116 | $title = ''; |
| 117 | 117 | if (isset($defaults[$matches[1]])) { |
| 118 | 118 | $title .= $this->__f('Default: %s', ['%s' => htmlspecialchars($defaults[$matches[1]])]); |
@@ -54,7 +54,8 @@ |
||
| 54 | 54 | * |
| 55 | 55 | * @param ContainerInterface $container |
| 56 | 56 | */ |
| 57 | - public function setContainer(ContainerInterface $container) { |
|
| 57 | + public function setContainer(ContainerInterface $container) |
|
| 58 | + { |
|
| 58 | 59 | $this->container = $container; |
| 59 | 60 | } |
| 60 | 61 | |
@@ -251,6 +251,9 @@ |
||
| 251 | 251 | return false; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | + /** |
|
| 255 | + * @param string $name |
|
| 256 | + */ |
|
| 254 | 257 | private function setSystemVar($name, $value = '') |
| 255 | 258 | { |
| 256 | 259 | return $this->container->get('zikula_extensions_module.api.variable')->set(VariableApi::CONFIG, $name, $value); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $this->setSystemVar('sessionstoretofile', Constant::SESSION_STORAGE_FILE); |
| 56 | 56 | $this->setSystemVar('sessionsavepath', ''); |
| 57 | 57 | $this->setSystemVar('gc_probability', 100); |
| 58 | - $this->setSystemVar('sessioncsrftokenonetime', 1); // 1 means use same token for entire session |
|
| 58 | + $this->setSystemVar('sessioncsrftokenonetime', 1); // 1 means use same token for entire session |
|
| 59 | 59 | $this->setSystemVar('sessionrandregenerate', 1); |
| 60 | 60 | $this->setSystemVar('sessionregenerate', 1); |
| 61 | 61 | $this->setSystemVar('sessionregeneratefreq', 10); |
@@ -77,13 +77,13 @@ discard block |
||
| 77 | 77 | $this->setSystemVar('useids', 0); |
| 78 | 78 | $this->setSystemVar('idsmail', 0); |
| 79 | 79 | $this->setSystemVar('idsrulepath', 'system/SecurityCenterModule/Resources/config/phpids_zikula_default.xml'); |
| 80 | - $this->setSystemVar('idssoftblock', 1); // do not block requests, but warn for debugging |
|
| 81 | - $this->setSystemVar('idsfilter', 'xml'); // filter type |
|
| 82 | - $this->setSystemVar('idsimpactthresholdone', 1); // db logging |
|
| 83 | - $this->setSystemVar('idsimpactthresholdtwo', 10); // mail admin |
|
| 84 | - $this->setSystemVar('idsimpactthresholdthree', 25); // block request |
|
| 85 | - $this->setSystemVar('idsimpactthresholdfour', 75); // kick user, destroy session |
|
| 86 | - $this->setSystemVar('idsimpactmode', 1); // per request per default |
|
| 80 | + $this->setSystemVar('idssoftblock', 1); // do not block requests, but warn for debugging |
|
| 81 | + $this->setSystemVar('idsfilter', 'xml'); // filter type |
|
| 82 | + $this->setSystemVar('idsimpactthresholdone', 1); // db logging |
|
| 83 | + $this->setSystemVar('idsimpactthresholdtwo', 10); // mail admin |
|
| 84 | + $this->setSystemVar('idsimpactthresholdthree', 25); // block request |
|
| 85 | + $this->setSystemVar('idsimpactthresholdfour', 75); // kick user, destroy session |
|
| 86 | + $this->setSystemVar('idsimpactmode', 1); // per request per default |
|
| 87 | 87 | $this->setSystemVar('idshtmlfields', ['POST.__wysiwyg']); |
| 88 | 88 | $this->setSystemVar('idsjsonfields', ['POST.__jsondata']); |
| 89 | 89 | $this->setSystemVar('idsexceptions', [ |