@@ -77,7 +77,7 @@ |
||
| 77 | 77 | // use provided lang if available |
| 78 | 78 | $langs = [$lang]; |
| 79 | 79 | } else { |
| 80 | - $multilingual = (bool)$this->variableApi->getSystemVar('multilingual'); |
|
| 80 | + $multilingual = (bool) $this->variableApi->getSystemVar('multilingual'); |
|
| 81 | 81 | if ($multilingual) { |
| 82 | 82 | // get all available locales |
| 83 | 83 | $langs = $installedLanguages; |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | 'route' => 'zikulasettingsmodule_settings_locale', |
| 95 | 95 | ])->setAttribute('icon', 'fas fa-spell-check'); |
| 96 | 96 | |
| 97 | - if (true === (bool)$this->variableApi->getSystemVar('multilingual')) { |
|
| 97 | + if (true === (bool) $this->variableApi->getSystemVar('multilingual')) { |
|
| 98 | 98 | if ('dev' === $this->kernel->getEnvironment()) { |
| 99 | 99 | $request = $this->requestStack->getCurrentRequest(); |
| 100 | 100 | if ($request->hasSession() && ($session = $request->getSession())) { |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | $this->entityManager->flush(); |
| 119 | 119 | |
| 120 | 120 | $collapseable = $this->getVar('collapseable'); |
| 121 | - $this->setVar('collapseable', (bool)$collapseable); |
|
| 121 | + $this->setVar('collapseable', (bool) $collapseable); |
|
| 122 | 122 | |
| 123 | 123 | case '3.9.2': |
| 124 | 124 | // convert Text and Html block types so properties is proper array |
@@ -139,10 +139,10 @@ discard block |
||
| 139 | 139 | $searchBlocks = $blockRepository->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); |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | $query->getResult(); |
| 100 | 100 | |
| 101 | 101 | // add new block positions |
| 102 | - foreach ((array)$blockorder as $order => $bid) { |
|
| 102 | + foreach ((array) $blockorder as $order => $bid) { |
|
| 103 | 103 | $placement = new BlockPlacementEntity(); |
| 104 | 104 | $placement->setPosition($em->getReference('ZikulaBlocksModule:BlockPositionEntity', $position)); |
| 105 | 105 | $placement->setBlock($em->getReference('ZikulaBlocksModule:BlockEntity', $bid)); |
@@ -97,10 +97,10 @@ |
||
| 97 | 97 | 'entrypoint' => ZikulaKernel::FRONT_CONTROLLER, |
| 98 | 98 | 'baseURL' => $event->getRequest()->getSchemeAndHttpHost() . '/', |
| 99 | 99 | 'baseURI' => $event->getRequest()->getBasePath(), |
| 100 | - 'ajaxtimeout' => (int)$this->variableApi->getSystemVar('ajaxtimeout', 5000), |
|
| 100 | + 'ajaxtimeout' => (int) $this->variableApi->getSystemVar('ajaxtimeout', 5000), |
|
| 101 | 101 | 'lang' => $event->getRequest()->getLocale(), |
| 102 | 102 | 'sessionName' => isset($session) ? $session->getName() : $this->defaultSessionName, |
| 103 | - 'uid' => (int)$this->currentUserApi->get('uid') |
|
| 103 | + 'uid' => (int) $this->currentUserApi->get('uid') |
|
| 104 | 104 | ]; |
| 105 | 105 | |
| 106 | 106 | $config = array_map('htmlspecialchars', $config); |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | $this->lifetime, |
| 114 | 114 | $this->kernel->getCacheDir() . '/assets/' . $type |
| 115 | 115 | ); |
| 116 | - $key = md5(serialize($assets)) . (int)$this->minify . (int)$this->compress . $this->lifetime . '.combined.' . $type; |
|
| 116 | + $key = md5(serialize($assets)) . (int) $this->minify . (int) $this->compress . $this->lifetime . '.combined.' . $type; |
|
| 117 | 117 | $data = $cacheService->get($key, function() use ($cachedFiles, $type) { |
| 118 | 118 | $data = []; |
| 119 | 119 | foreach ($cachedFiles as $k => $file) { |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | ->getQuery(); |
| 48 | 48 | $result = $query->execute(); |
| 49 | 49 | |
| 50 | - return (bool)$result; |
|
| 50 | + return (bool) $result; |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | public function deleteByExtension(string $extensionName): bool |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | ->getQuery(); |
| 60 | 60 | $result = $query->execute(); |
| 61 | 61 | |
| 62 | - return (bool)$result; |
|
| 62 | + return (bool) $result; |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | public function updateName(string $oldName, string $newName): bool |
@@ -73,6 +73,6 @@ discard block |
||
| 73 | 73 | ->getQuery(); |
| 74 | 74 | $result = $query->execute(); |
| 75 | 75 | |
| 76 | - return (bool)$result; |
|
| 76 | + return (bool) $result; |
|
| 77 | 77 | } |
| 78 | 78 | } |
@@ -258,7 +258,7 @@ |
||
| 258 | 258 | ): void { |
| 259 | 259 | foreach ($extensionsFromFile as $name => $extensionFromFile) { |
| 260 | 260 | foreach ($extensionsFromDB as $dbname => $extensionFromDB) { |
| 261 | - if (isset($extensionFromDB['name']) && in_array($extensionFromDB['name'], (array)$extensionFromFile['oldnames'], true)) { |
|
| 261 | + if (isset($extensionFromDB['name']) && in_array($extensionFromDB['name'], (array) $extensionFromFile['oldnames'], true)) { |
|
| 262 | 262 | // migrate its modvars |
| 263 | 263 | $this->extensionVarRepository->updateName($dbname, $name); |
| 264 | 264 | // rename the extension register |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | 'lockadmin' => $this->getVar('lockadmin', 1) ? 1 : 0, |
| 77 | 77 | 'adminId' => $this->getVar('adminid', 1), |
| 78 | 78 | 'schema' => $schemaHelper->getAllSchema(), |
| 79 | - 'enableFilter' => (bool)$this->getVar('filter', 1) |
|
| 79 | + 'enableFilter' => (bool) $this->getVar('filter', 1) |
|
| 80 | 80 | ]; |
| 81 | 81 | } |
| 82 | 82 | |