@@ -47,7 +47,7 @@ |
||
47 | 47 | } |
48 | 48 | if (isset($component)) { |
49 | 49 | $qb->andWhere("p.component LIKE :permgrpparts") |
50 | - ->setParameter('permgrpparts', $component.'%'); |
|
50 | + ->setParameter('permgrpparts', $component . '%'); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | return $qb->getQuery()->getResult(); |
@@ -63,7 +63,7 @@ |
||
63 | 63 | $templateParameters['lockadmin'] = $this->getVar('lockadmin', 1) ? 1 : 0; |
64 | 64 | $templateParameters['adminId'] = $this->getVar('adminid', 1); |
65 | 65 | $templateParameters['schema'] = $this->get('zikula_permissions_module.helper.schema_helper')->getAllSchema(); |
66 | - $templateParameters['enableFilter'] = (bool) $this->getVar('filter', 1); |
|
66 | + $templateParameters['enableFilter'] = (bool)$this->getVar('filter', 1); |
|
67 | 67 | |
68 | 68 | return $templateParameters; |
69 | 69 | } |
@@ -135,7 +135,7 @@ |
||
135 | 135 | $factory = new RandomLibFactory(); |
136 | 136 | $generator = $factory->getMediumStrengthGenerator(); |
137 | 137 | $chars = str_replace($saltDelimiter, '', $this->randomStringCharacters); |
138 | - $saltStr = $generator->generateString($saltLength, $chars); |
|
138 | + $saltStr = $generator->generateString($saltLength, $chars); |
|
139 | 139 | |
140 | 140 | return $this->buildSaltedHash($unhashedData, $hashMethodName, $saltStr, $hashMethodNameToCode, $saltDelimiter); |
141 | 141 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $this->entityManager->flush(); |
121 | 121 | |
122 | 122 | $collapseable = $this->getVar('collapseable'); |
123 | - $this->setVar('collapseable', (bool) $collapseable); |
|
123 | + $this->setVar('collapseable', (bool)$collapseable); |
|
124 | 124 | |
125 | 125 | case '3.9.2': |
126 | 126 | // convert Text and Html block types so properties is proper array |
@@ -139,10 +139,10 @@ discard block |
||
139 | 139 | $searchBlocks = $this->entityManager->getRepository('ZikulaBlocksModule:BlockEntity')->findBy(['blocktype' => 'Search']); |
140 | 140 | foreach ($searchBlocks as $searchBlock) { |
141 | 141 | $properties = $searchBlock->getProperties(); |
142 | - $properties['displaySearchBtn'] = (bool) $properties['displaySearchBtn']; |
|
142 | + $properties['displaySearchBtn'] = (bool)$properties['displaySearchBtn']; |
|
143 | 143 | if (isset($properties['active'])) { |
144 | 144 | foreach ($properties['active'] as $module => $active) { |
145 | - $properties['active'][$module] = (bool) $active; |
|
145 | + $properties['active'][$module] = (bool)$active; |
|
146 | 146 | } |
147 | 147 | } |
148 | 148 | $searchBlock->setProperties($properties); |
@@ -32,10 +32,10 @@ |
||
32 | 32 | ; |
33 | 33 | $builder->get('content') |
34 | 34 | ->addModelTransformer(new CallbackTransformer( |
35 | - function ($originalDescription) { |
|
35 | + function($originalDescription) { |
|
36 | 36 | return $originalDescription; |
37 | 37 | }, |
38 | - function ($submittedDescription) { |
|
38 | + function($submittedDescription) { |
|
39 | 39 | // remove all HTML tags |
40 | 40 | return strip_tags($submittedDescription); |
41 | 41 | } |
@@ -85,7 +85,7 @@ |
||
85 | 85 | */ |
86 | 86 | public function deleteAction(Request $request, BlockPositionEntity $positionEntity) |
87 | 87 | { |
88 | - if (!$this->hasPermission('ZikulaBlocksModule::position', $positionEntity->getName() .'::'. $positionEntity->getPid(), ACCESS_DELETE)) { |
|
88 | + if (!$this->hasPermission('ZikulaBlocksModule::position', $positionEntity->getName() . '::' . $positionEntity->getPid(), ACCESS_DELETE)) { |
|
89 | 89 | throw new AccessDeniedException(); |
90 | 90 | } |
91 | 91 |
@@ -82,7 +82,7 @@ |
||
82 | 82 | $blockClassName = preg_match('/.*Block$/', $blockClassName) ? $blockClassName : $blockClassName . 'Block'; |
83 | 83 | } catch (\Exception $e) { |
84 | 84 | $moduleBundle = null; |
85 | - $blockClassName = '\\' . ucwords($moduleName).'\\'.'Block\\'.ucwords($blockEntity->getBkey()); |
|
85 | + $blockClassName = '\\' . ucwords($moduleName) . '\\' . 'Block\\' . ucwords($blockEntity->getBkey()); |
|
86 | 86 | $blockClassName = preg_match('/.*Block$/', $blockClassName) ? $blockClassName : $blockClassName . 'Block'; |
87 | 87 | $blockClassNameOld = '\\' . ucwords($moduleName) . '_' . 'Block_' . ucwords($blockEntity->getBkey()); |
88 | 88 | $blockClassName = class_exists($blockClassName) ? $blockClassName : $blockClassNameOld; |
@@ -104,7 +104,7 @@ |
||
104 | 104 | || (self::STRATEGY_PREFIX_EXCEPT_DEFAULT === $this->strategy && $this->defaultLocale !== $locale)) { |
105 | 105 | $i18nPattern = '/' . $locale . $i18nPattern; |
106 | 106 | if (null !== $route->getOption('i18n_prefix')) { |
107 | - $i18nPattern = $route->getOption('i18n_prefix').$i18nPattern; |
|
107 | + $i18nPattern = $route->getOption('i18n_prefix') . $i18nPattern; |
|
108 | 108 | } |
109 | 109 | } |
110 | 110 |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | } else { |
146 | 146 | // single identifier |
147 | 147 | if (array_key_exists($idField, $routeParams)) { |
148 | - $id = (int) !empty($routeParams[$idField]) ? $routeParams[$idField] : $defaultValue; |
|
148 | + $id = (int)!empty($routeParams[$idField]) ? $routeParams[$idField] : $defaultValue; |
|
149 | 149 | } elseif ($request->query->has($idField)) { |
150 | 150 | $id = $request->query->getInt($idField, $defaultValue); |
151 | 151 | } else { |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | if (!$id && $idField != 'id' && count($idFields) == 1) { |
158 | 158 | $defaultValue = isset($args['id']) && is_numeric($args['id']) ? $args['id'] : 0; |
159 | 159 | if (array_key_exists('id', $routeParams)) { |
160 | - $id = (int) !empty($routeParams['id']) ? $routeParams['id'] : $defaultValue; |
|
160 | + $id = (int)!empty($routeParams['id']) ? $routeParams['id'] : $defaultValue; |
|
161 | 161 | } elseif ($request->query->has('id')) { |
162 | - $id = (int) $request->query->getInt('id', $defaultValue); |
|
162 | + $id = (int)$request->query->getInt('id', $defaultValue); |
|
163 | 163 | } else { |
164 | 164 | $id = $defaultValue; |
165 | 165 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | * @param string $context Usage context (allowed values: controllerAction, api, helper, actionHandler, block, contentType, util) |
89 | 89 | * @param array $args Additional arguments |
90 | 90 | * |
91 | - * @return array List of allowed object types |
|
91 | + * @return string[] List of allowed object types |
|
92 | 92 | */ |
93 | 93 | public function getObjectTypes($context = '', array $args = []) |
94 | 94 | { |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | * @param string $context Usage context (allowed values: controllerAction, api, actionHandler, block, contentType) |
382 | 382 | * @param array $args Additional arguments |
383 | 383 | * |
384 | - * @return array List of template variables to be assigned |
|
384 | + * @return string List of template variables to be assigned |
|
385 | 385 | */ |
386 | 386 | public function addTemplateParameters($objectType = '', array $parameters = [], $context = '', array $args = []) |
387 | 387 | { |