@@ -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 | |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | $query = $qb->select($qb->expr()->max('p.sequence')) |
| 96 | 96 | ->getQuery(); |
| 97 | 97 | |
| 98 | - return (int)$query->getSingleScalarResult(); |
|
| 98 | + return (int) $query->getSingleScalarResult(); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | public function updateSequencesFrom(int $value, int $amount = 1): void |
@@ -69,8 +69,8 @@ |
||
| 69 | 69 | |
| 70 | 70 | $modVars = $variableApi->getAll('ZikulaAdminModule'); |
| 71 | 71 | $dataValues = $modVars; |
| 72 | - $dataValues['ignoreinstallercheck'] = (bool)$dataValues['ignoreinstallercheck']; |
|
| 73 | - $dataValues['admingraphic'] = (bool)$dataValues['admingraphic']; |
|
| 72 | + $dataValues['ignoreinstallercheck'] = (bool) $dataValues['ignoreinstallercheck']; |
|
| 73 | + $dataValues['admingraphic'] = (bool) $dataValues['admingraphic']; |
|
| 74 | 74 | |
| 75 | 75 | $modules = []; |
| 76 | 76 | foreach ($adminModules as $adminModule) { |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | continue; |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | - $moduleId = (int)$adminModule['id']; |
|
| 297 | + $moduleId = (int) $adminModule['id']; |
|
| 298 | 298 | $moduleCategory = $adminCategoryRepository->getModuleCategory($moduleId); |
| 299 | 299 | $catid = null !== $moduleCategory ? $moduleCategory['cid'] : 0; |
| 300 | 300 | |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | $menuText .= ' (<i class="fas fa-exclamation-triangle"></i> ' . $this->trans('invalid route') . ')'; |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | - $moduleName = (string)$adminModule['name']; |
|
| 330 | + $moduleName = (string) $adminModule['name']; |
|
| 331 | 331 | /** @var \Knp\Menu\ItemInterface $extensionMenu */ |
| 332 | 332 | $extensionMenu = $extensionMenuCollector->get($moduleName, ExtensionMenuInterface::TYPE_ADMIN); |
| 333 | 333 | if (isset($extensionMenu)) { |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | $menuText .= ' (<i class="fas fa-exclamation-triangle"></i> ' . $this->trans('invalid route') . ')'; |
| 397 | 397 | } |
| 398 | 398 | |
| 399 | - $moduleId = (int)$adminModule['id']; |
|
| 399 | + $moduleId = (int) $adminModule['id']; |
|
| 400 | 400 | $moduleCategory = $adminCategoryRepository->getModuleCategory($moduleId); |
| 401 | 401 | $catid = null !== $moduleCategory ? $moduleCategory['cid'] : 0; |
| 402 | 402 | |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | // empty and we are not admin |
| 460 | 460 | if (false === $permission) { |
| 461 | 461 | // show the first category |
| 462 | - $acid = !empty($possibleCategoryIds) ? (int)$possibleCategoryIds[0] : null; |
|
| 462 | + $acid = !empty($possibleCategoryIds) ? (int) $possibleCategoryIds[0] : null; |
|
| 463 | 463 | } |
| 464 | 464 | |
| 465 | 465 | return $this->render('@ZikulaAdminModule/Admin/categoryMenu.html.twig', [ |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | ->setParameter('cid', $cid) |
| 42 | 42 | ->getQuery(); |
| 43 | 43 | |
| 44 | - return (int)$query->getSingleScalarResult(); |
|
| 44 | + return (int) $query->getSingleScalarResult(); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | public function setModuleCategory(ExtensionEntity $moduleEntity, AdminCategoryEntity $adminCategoryEntity): void |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | ->select('COUNT(c.cid)') |
| 33 | 33 | ->getQuery(); |
| 34 | 34 | |
| 35 | - return (int)$query->getSingleScalarResult(); |
|
| 35 | + return (int) $query->getSingleScalarResult(); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function getModuleCategory(int $moduleId): ?AdminCategoryEntity |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | ->setParameter('mid', $moduleId) |
| 45 | 45 | ->getQuery(); |
| 46 | 46 | |
| 47 | - $categoryId = (int)$query->getSingleScalarResult(); |
|
| 47 | + $categoryId = (int) $query->getSingleScalarResult(); |
|
| 48 | 48 | if (!$categoryId) { |
| 49 | 49 | return null; |
| 50 | 50 | } |
@@ -73,13 +73,13 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | $this->variableApi = $variableApi; |
| 75 | 75 | |
| 76 | - $this->enabled = (bool)$variableApi->getSystemVar('updatecheck'); |
|
| 76 | + $this->enabled = (bool) $variableApi->getSystemVar('updatecheck'); |
|
| 77 | 77 | $this->currentVersion = ZikulaKernel::VERSION; |
| 78 | - $this->lastChecked = (int)$variableApi->getSystemVar('updatelastchecked'); |
|
| 79 | - $this->checkInterval = (int)$variableApi->getSystemVar('updatefrequency'); |
|
| 78 | + $this->lastChecked = (int) $variableApi->getSystemVar('updatelastchecked'); |
|
| 79 | + $this->checkInterval = (int) $variableApi->getSystemVar('updatefrequency'); |
|
| 80 | 80 | $this->updateversion = $variableApi->getSystemVar('updateversion'); |
| 81 | 81 | |
| 82 | - $this->force = (bool)$requestStack->getMasterRequest()->query->get('forceupdatecheck'); |
|
| 82 | + $this->force = (bool) $requestStack->getMasterRequest()->query->get('forceupdatecheck'); |
|
| 83 | 83 | $this->checked = false; |
| 84 | 84 | $this->releases = false; |
| 85 | 85 | |
@@ -147,9 +147,9 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | if (true === $this->checked && '' !== $this->updateversion) { |
| 150 | - $this->variableApi->set(VariableApi::CONFIG, 'updatelastchecked', (int)time()); |
|
| 150 | + $this->variableApi->set(VariableApi::CONFIG, 'updatelastchecked', (int) time()); |
|
| 151 | 151 | $this->variableApi->set(VariableApi::CONFIG, 'updateversion', $this->updateversion); |
| 152 | - $this->lastChecked = (int)$this->variableApi->getSystemVar('updatelastchecked'); |
|
| 152 | + $this->lastChecked = (int) $this->variableApi->getSystemVar('updatelastchecked'); |
|
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | |