@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | if (!in_array(AbstractCategoryAssignment::class, $classParents, true)) { |
| 47 | 47 | throw new InvalidConfigurationException("Option 'entityCategoryClass' must extend Zikula\\CategoriesModule\\Entity\\AbstractCategoryAssignment"); |
| 48 | 48 | } |
| 49 | - $this->entityCategoryClass = (string)$options['entityCategoryClass']; |
|
| 50 | - $this->multiple = (bool)($options['multiple'] ?? false); |
|
| 49 | + $this->entityCategoryClass = (string) $options['entityCategoryClass']; |
|
| 50 | + $this->multiple = (bool) ($options['multiple'] ?? false); |
|
| 51 | 51 | $this->entityManager = $options['em']; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $class = $this->entityCategoryClass; |
| 58 | 58 | |
| 59 | 59 | foreach ($value as $regId => $categories) { |
| 60 | - $regId = (int)mb_substr($regId, mb_strpos($regId, '_') + 1); |
|
| 60 | + $regId = (int) mb_substr($regId, mb_strpos($regId, '_') + 1); |
|
| 61 | 61 | $subCollection = new ArrayCollection(); |
| 62 | 62 | if (!is_array($categories) && $categories instanceof CategoryEntity) { |
| 63 | 63 | $categories = [$categories]; |
@@ -192,8 +192,8 @@ |
||
| 192 | 192 | $count = $this->migrationHelper->countUnMigratedUsers(); |
| 193 | 193 | if ($count > 0) { |
| 194 | 194 | $io->text($this->translator->trans('Beginning user migration...')); |
| 195 | - $userMigrationMaxuid = (int)$this->migrationHelper->getMaxUnMigratedUid(); |
|
| 196 | - $progressBar = new ProgressBar($output, (int)ceil($count / MigrationHelper::BATCH_LIMIT)); |
|
| 195 | + $userMigrationMaxuid = (int) $this->migrationHelper->getMaxUnMigratedUid(); |
|
| 196 | + $progressBar = new ProgressBar($output, (int) ceil($count / MigrationHelper::BATCH_LIMIT)); |
|
| 197 | 197 | $progressBar->start(); |
| 198 | 198 | $lastUid = 0; |
| 199 | 199 | do { |
@@ -134,7 +134,7 @@ |
||
| 134 | 134 | $results['phpsatisfied'] = version_compare($phpVersion, ZikulaKernel::PHP_MINIMUM_VERSION, '>='); |
| 135 | 135 | $results['pdo'] = extension_loaded('pdo'); |
| 136 | 136 | $supportsUnicode = preg_match('/^\p{L}+$/u', 'TheseAreLetters'); |
| 137 | - $results['pcreUnicodePropertiesEnabled'] = (isset($supportsUnicode) && (bool)$supportsUnicode); |
|
| 137 | + $results['pcreUnicodePropertiesEnabled'] = (isset($supportsUnicode) && (bool) $supportsUnicode); |
|
| 138 | 138 | $requirementsMet = true; |
| 139 | 139 | foreach ($results as $check) { |
| 140 | 140 | if (!$check) { |
@@ -75,6 +75,6 @@ |
||
| 75 | 75 | |
| 76 | 76 | public function hasErrors(): bool |
| 77 | 77 | { |
| 78 | - return (bool)$this->errors; |
|
| 78 | + return (bool) $this->errors; |
|
| 79 | 79 | } |
| 80 | 80 | } |
@@ -163,11 +163,11 @@ |
||
| 163 | 163 | $html = ''; |
| 164 | 164 | |
| 165 | 165 | foreach ($value as $key => $val) { |
| 166 | - $html .= '<li><strong>' . htmlspecialchars((string)$key, ENT_QUOTES) . ':</strong>'; |
|
| 166 | + $html .= '<li><strong>' . htmlspecialchars((string) $key, ENT_QUOTES) . ':</strong>'; |
|
| 167 | 167 | if (is_array($val)) { |
| 168 | 168 | $html .= $this->formatValue($val) . "</li>\n"; |
| 169 | 169 | } else { |
| 170 | - $val = !empty($val) ? htmlspecialchars((string)$val, ENT_QUOTES) : '<em>null</em>'; |
|
| 170 | + $val = !empty($val) ? htmlspecialchars((string) $val, ENT_QUOTES) : '<em>null</em>'; |
|
| 171 | 171 | $html .= ' ' . $val . "</li>\n"; |
| 172 | 172 | } |
| 173 | 173 | } |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | return; |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | - $siteOff = (bool)$this->variableApi->getSystemVar('siteoff'); |
|
| 112 | + $siteOff = (bool) $this->variableApi->getSystemVar('siteoff'); |
|
| 113 | 113 | $hasAdminPerms = $this->permissionApi->hasPermission('ZikulaSettingsModule::', 'SiteOff::', ACCESS_ADMIN); |
| 114 | 114 | |
| 115 | 115 | // Check for site closed |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | } elseif (is_int($value['operand']) || is_array($value['operand']) || $value['operand'] instanceof DateTime) { |
| 55 | 55 | $dbValue = $value['operand']; |
| 56 | 56 | } else { |
| 57 | - $dbValue = (string)$value['operand']; |
|
| 57 | + $dbValue = (string) $value['operand']; |
|
| 58 | 58 | } |
| 59 | 59 | $methodMap = [ |
| 60 | 60 | '=' => 'eq', |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | |
| 111 | 111 | public function hasException(): bool |
| 112 | 112 | { |
| 113 | - return (bool)$this->exception; |
|
| 113 | + return (bool) $this->exception; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | public function getSubject() |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); |
| 56 | 56 | $body = $this->parser->subparse([$this, 'decideCaseFork']); |
| 57 | 57 | |
| 58 | - $cases->setNode((string)$i, new Node([ |
|
| 58 | + $cases->setNode((string) $i, new Node([ |
|
| 59 | 59 | 'expression' => $expr, |
| 60 | 60 | 'body' => $body, |
| 61 | 61 | ])); |
@@ -75,8 +75,8 @@ discard block |
||
| 75 | 75 | $this->parser->getStream()->expect(Token::BLOCK_END_TYPE); |
| 76 | 76 | $this->parser->subparse([$this, 'decideCaseFork']); |
| 77 | 77 | |
| 78 | - if ($cases->hasNode((string)$i)) { |
|
| 79 | - $cases->getNode((string)$i)->setAttribute('break', true); |
|
| 78 | + if ($cases->hasNode((string) $i)) { |
|
| 79 | + $cases->getNode((string) $i)->setAttribute('break', true); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | break; |