@@ -71,7 +71,7 @@ |
||
| 71 | 71 | { |
| 72 | 72 | $string = preg_replace_callback( |
| 73 | 73 | '/(.)@(.)/s', |
| 74 | - static function ($m) { |
|
| 74 | + static function($m) { |
|
| 75 | 75 | return '&#' . sprintf('%03d', ord($m[1])) . ';@&#' . sprintf('%03d', ord($m[2])) . ';'; |
| 76 | 76 | }, |
| 77 | 77 | $string |
@@ -84,13 +84,13 @@ |
||
| 84 | 84 | $webPackCssFiles = $this->lookupCollection->getEntrypointLookup($this->entryPoint) |
| 85 | 85 | ->getCssFiles($this->entryName); |
| 86 | 86 | $cssFiles = array_flip($webPackCssFiles); |
| 87 | - array_walk($cssFiles, function (&$weight) { $weight += AssetBag::WEIGHT_WEBPACK_OFFSET; }); |
|
| 87 | + array_walk($cssFiles, function(&$weight) { $weight += AssetBag::WEIGHT_WEBPACK_OFFSET; }); |
|
| 88 | 88 | $this->cssAssetBag->add($cssFiles); |
| 89 | 89 | |
| 90 | 90 | $webPackJsFiles = $this->lookupCollection->getEntrypointLookup($this->entryPoint) |
| 91 | 91 | ->getJavaScriptFiles($this->entryName); |
| 92 | 92 | $jsFiles = array_flip($webPackJsFiles); |
| 93 | - array_walk($jsFiles, function (&$weight) { $weight += AssetBag::WEIGHT_WEBPACK_OFFSET; }); |
|
| 93 | + array_walk($jsFiles, function(&$weight) { $weight += AssetBag::WEIGHT_WEBPACK_OFFSET; }); |
|
| 94 | 94 | $this->jsAssetBag->add($jsFiles); |
| 95 | 95 | } |
| 96 | 96 | } |
@@ -170,7 +170,8 @@ |
||
| 170 | 170 | continue; |
| 171 | 171 | } |
| 172 | 172 | $C = u($contents); |
| 173 | - if (!$C->containsAny($publicPath)) { // check if replaced previously |
|
| 173 | + if (!$C->containsAny($publicPath)) { |
|
| 174 | +// check if replaced previously |
|
| 174 | 175 | $success = file_put_contents($this->projectDir . $path, $C->replaceMatches($search[0], $search[1])->toString()); |
| 175 | 176 | if (false === $success) { |
| 176 | 177 | throw new CannotWriteFileException(sprintf('Could not write to path %s, please check your file permissions.', $path)); |
@@ -14,6 +14,6 @@ |
||
| 14 | 14 | require_once dirname(__DIR__) . '/vendor/autoload_runtime.php'; |
| 15 | 15 | require_once dirname(__DIR__) . '/config/bootstrap.php'; |
| 16 | 16 | |
| 17 | -return function (array $context) { |
|
| 17 | +return function(array $context) { |
|
| 18 | 18 | return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG'], $context['DATABASE_URL']); |
| 19 | 19 | }; |
@@ -261,7 +261,7 @@ |
||
| 261 | 261 | if ($this->mailLoggingEnabled) { |
| 262 | 262 | $this->logger->info(sprintf('Email sent to %s', 'multiple users'), [ |
| 263 | 263 | 'in' => __METHOD__, |
| 264 | - 'users' => array_reduce($users, function ($result, UserEntity $user) { return $result . $user->getEmail() . ','; }, 'emails: ') |
|
| 264 | + 'users' => array_reduce($users, function($result, UserEntity $user) { return $result . $user->getEmail() . ','; }, 'emails: ') |
|
| 265 | 265 | ]); |
| 266 | 266 | } |
| 267 | 267 | |
@@ -103,8 +103,8 @@ |
||
| 103 | 103 | { |
| 104 | 104 | $api = $this->getMockBuilder(PermissionApiInterface::class) |
| 105 | 105 | ->getMock(); |
| 106 | - $api->method('hasPermission')->willReturnCallback(static function ($component = null, $instance = null, $level = ACCESS_NONE, $user = null) { |
|
| 107 | - list(/* $regId */ , $catId) = explode('::', $instance); |
|
| 106 | + $api->method('hasPermission')->willReturnCallback(static function($component = null, $instance = null, $level = ACCESS_NONE, $user = null) { |
|
| 107 | + list(/* $regId */, $catId) = explode('::', $instance); |
|
| 108 | 108 | |
| 109 | 109 | return 0 === $catId % 2; |
| 110 | 110 | }); |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | foreach ($blocks as $block) { |
| 108 | 108 | $bKey = $block['bkey']; |
| 109 | 109 | if (mb_strpos($bKey, ':')) { |
| 110 | - [/* $moduleName */ , $bKey] = explode(':', $bKey); |
|
| 110 | + [/* $moduleName */, $bKey] = explode(':', $bKey); |
|
| 111 | 111 | } |
| 112 | 112 | $this->entityManager->getConnection()->executeUpdate('UPDATE blocks SET bKey=? WHERE bid=?', [trim($bKey, '\\'), $block['bid']]); |
| 113 | 113 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | 'symfony-messenger-bridge' => 'Symfony Messenger Bridge', |
| 47 | 47 | ]; |
| 48 | 48 | $types = array_keys($typeOrder); |
| 49 | - usort($packages, function ($a, $b) use ($types) { |
|
| 49 | + usort($packages, function($a, $b) use ($types) { |
|
| 50 | 50 | $typeOrder = array_search($a['type'], $types) - array_search($b['type'], $types); |
| 51 | 51 | if (0 !== $typeOrder) { |
| 52 | 52 | return $typeOrder; |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | $tmp[] = $author['name']; |
| 100 | 100 | } |
| 101 | - usort($authors, function ($a, $b) { |
|
| 101 | + usort($authors, function($a, $b) { |
|
| 102 | 102 | return strcmp($a['name'], $b['name']); |
| 103 | 103 | }); |
| 104 | 104 | foreach ($authors as $author) { |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | return $formBuilder->getForm(); |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - private function generateThemeVarFormElements(string $themeVarsPath, FormBuilderInterface &$formBuilder): void |
|
| 114 | + private function generateThemeVarFormElements(string $themeVarsPath, FormBuilderInterface & $formBuilder): void |
|
| 115 | 115 | { |
| 116 | 116 | $variableDefinitions = Yaml::parse(file_get_contents($themeVarsPath)); |
| 117 | 117 | foreach ($variableDefinitions as $fieldName => $definitions) { |