@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $messageModules = $messageModuleCollector->getKeys(); |
| 65 | 65 | |
| 66 | 66 | $variables = $variableApi->getAll(VariableApi::CONFIG); |
| 67 | - $variables['UseCompression'] = (bool)$variables['UseCompression']; |
|
| 67 | + $variables['UseCompression'] = (bool) $variables['UseCompression']; |
|
| 68 | 68 | $form = $this->createForm(MainSettingsType::class, |
| 69 | 69 | $variables, [ |
| 70 | 70 | 'languages' => $installedLanguageNames, |
@@ -119,9 +119,9 @@ discard block |
||
| 119 | 119 | |
| 120 | 120 | $form = $this->createForm(LocaleSettingsType::class, |
| 121 | 121 | [ |
| 122 | - 'multilingual' => (bool)$variableApi->getSystemVar('multilingual'), |
|
| 122 | + 'multilingual' => (bool) $variableApi->getSystemVar('multilingual'), |
|
| 123 | 123 | 'languageurl' => $variableApi->getSystemVar('languageurl'), |
| 124 | - 'language_detect' => (bool)$variableApi->getSystemVar('language_detect'), |
|
| 124 | + 'language_detect' => (bool) $variableApi->getSystemVar('language_detect'), |
|
| 125 | 125 | 'locale' => $variableApi->getSystemVar('locale'), |
| 126 | 126 | 'timezone' => $variableApi->getSystemVar('timezone'), |
| 127 | 127 | ], [ |
@@ -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())) { |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | $newStargArgs = str_replace(',', '&', $this->getSystemVar('startargs')); // replace comma with `&` |
| 110 | 110 | $this->setSystemVar('startargs', $newStargArgs); |
| 111 | 111 | case '2.9.11': |
| 112 | - $this->setSystemVar('UseCompression', (bool)$this->getSystemVar('UseCompression')); |
|
| 112 | + $this->setSystemVar('UseCompression', (bool) $this->getSystemVar('UseCompression')); |
|
| 113 | 113 | case '2.9.12': // ship with Core-1.4.4 |
| 114 | 114 | // reconfigure TZ settings |
| 115 | 115 | $this->setGuestTimeZone(); |
@@ -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 |