Skip to content

Commit 29063f2

Browse files
committed
Merge branch '4.1' into 4.2
* 4.1: fixed tests fixed CS fixed CS fixed CS fixed short array CS in comments fixed CS in ExpressionLanguage fixtures fixed CS in generated files fixed CS on generated container files fixed CS on Form PHP templates fixed CS on YAML fixtures fixed fixtures switched array() to []
2 parents 22522df + 0e2b81a commit 29063f2

File tree

221 files changed

+1407
-1407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+1407
-1407
lines changed

CacheWarmer/AbstractPhpFileCacheWarmer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ public function warmUp($cacheDir)
4646
{
4747
$arrayAdapter = new ArrayAdapter();
4848

49-
spl_autoload_register(array(PhpArrayAdapter::class, 'throwOnRequiredClass'));
49+
spl_autoload_register([PhpArrayAdapter::class, 'throwOnRequiredClass']);
5050
try {
5151
if (!$this->doWarmUp($cacheDir, $arrayAdapter)) {
5252
return;
5353
}
5454
} finally {
55-
spl_autoload_unregister(array(PhpArrayAdapter::class, 'throwOnRequiredClass'));
55+
spl_autoload_unregister([PhpArrayAdapter::class, 'throwOnRequiredClass']);
5656
}
5757

5858
// the ArrayAdapter stores the values serialized

CacheWarmer/RouterCacheWarmer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ public function isOptional()
6767
*/
6868
public static function getSubscribedServices()
6969
{
70-
return array(
70+
return [
7171
'router' => RouterInterface::class,
72-
);
72+
];
7373
}
7474
}

CacheWarmer/SerializerCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function doWarmUp($cacheDir, ArrayAdapter $arrayAdapter)
7676
*/
7777
private function extractSupportedLoaders(array $loaders)
7878
{
79-
$supportedLoaders = array();
79+
$supportedLoaders = [];
8080

8181
foreach ($loaders as $loader) {
8282
if ($loader instanceof XmlFileLoader || $loader instanceof YamlFileLoader) {

CacheWarmer/TemplateFinder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function findAllTemplates()
5252
return $this->templates;
5353
}
5454

55-
$templates = array();
55+
$templates = [];
5656

5757
foreach ($this->kernel->getBundles() as $bundle) {
5858
$templates = array_merge($templates, $this->findTemplatesInBundle($bundle));
@@ -72,7 +72,7 @@ public function findAllTemplates()
7272
*/
7373
private function findTemplatesInFolder($dir)
7474
{
75-
$templates = array();
75+
$templates = [];
7676

7777
if (is_dir($dir)) {
7878
$finder = new Finder();

CacheWarmer/TemplatePathsCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(TemplateFinderInterface $finder, TemplateLocator $lo
3939
public function warmUp($cacheDir)
4040
{
4141
$filesystem = new Filesystem();
42-
$templates = array();
42+
$templates = [];
4343

4444
foreach ($this->finder->findAllTemplates() as $template) {
4545
$templates[$template->getLogicalName()] = rtrim($filesystem->makePathRelative($this->locator->locate($template), $cacheDir), '/');

CacheWarmer/TranslationsCacheWarmer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public function isOptional()
6060
*/
6161
public static function getSubscribedServices()
6262
{
63-
return array(
63+
return [
6464
'translator' => TranslatorInterface::class,
65-
);
65+
];
6666
}
6767
}

CacheWarmer/ValidatorCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ protected function warmUpPhpArrayAdapter(PhpArrayAdapter $phpArrayAdapter, array
8686
*/
8787
private function extractSupportedLoaders(array $loaders)
8888
{
89-
$supportedLoaders = array();
89+
$supportedLoaders = [];
9090

9191
foreach ($loaders as $loader) {
9292
if ($loader instanceof XmlFileLoader || $loader instanceof YamlFileLoader) {

Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Client extends BaseClient
3434
/**
3535
* {@inheritdoc}
3636
*/
37-
public function __construct(KernelInterface $kernel, array $server = array(), History $history = null, CookieJar $cookieJar = null)
37+
public function __construct(KernelInterface $kernel, array $server = [], History $history = null, CookieJar $cookieJar = null)
3838
{
3939
parent::__construct($kernel, $server, $history, $cookieJar);
4040
}

Command/AbstractConfigCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ abstract class AbstractConfigCommand extends ContainerDebugCommand
2929
protected function listBundles($output)
3030
{
3131
$title = 'Available registered bundles with their extension alias if available';
32-
$headers = array('Bundle name', 'Extension alias');
33-
$rows = array();
32+
$headers = ['Bundle name', 'Extension alias'];
33+
$rows = [];
3434

3535
$bundles = $this->getApplication()->getKernel()->getBundles();
3636
usort($bundles, function ($bundleA, $bundleB) {
@@ -39,7 +39,7 @@ protected function listBundles($output)
3939

4040
foreach ($bundles as $bundle) {
4141
$extension = $bundle->getContainerExtension();
42-
$rows[] = array($bundle->getName(), $extension ? $extension->getAlias() : '');
42+
$rows[] = [$bundle->getName(), $extension ? $extension->getAlias() : ''];
4343
}
4444

4545
if ($output instanceof StyleInterface) {

Command/AssetsInstallCommand.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public function __construct(Filesystem $filesystem)
5656
protected function configure()
5757
{
5858
$this
59-
->setDefinition(array(
59+
->setDefinition([
6060
new InputArgument('target', InputArgument::OPTIONAL, 'The target directory', null),
61-
))
61+
])
6262
->addOption('symlink', null, InputOption::VALUE_NONE, 'Symlinks the assets instead of copying it')
6363
->addOption('relative', null, InputOption::VALUE_NONE, 'Make relative symlinks')
6464
->addOption('no-cleanup', null, InputOption::VALUE_NONE, 'Do not remove the assets of the bundles that no longer exist')
@@ -125,10 +125,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
125125

126126
$io->newLine();
127127

128-
$rows = array();
128+
$rows = [];
129129
$copyUsed = false;
130130
$exitCode = 0;
131-
$validAssetDirs = array();
131+
$validAssetDirs = [];
132132
/** @var BundleInterface $bundle */
133133
foreach ($kernel->getBundles() as $bundle) {
134134
if (!is_dir($originDir = $bundle->getPath().'/Resources/public')) {
@@ -161,13 +161,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
161161
}
162162

163163
if ($method === $expectedMethod) {
164-
$rows[] = array(sprintf('<fg=green;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */), $message, $method);
164+
$rows[] = [sprintf('<fg=green;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */), $message, $method];
165165
} else {
166-
$rows[] = array(sprintf('<fg=yellow;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'WARNING' : '!'), $message, $method);
166+
$rows[] = [sprintf('<fg=yellow;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'WARNING' : '!'), $message, $method];
167167
}
168168
} catch (\Exception $e) {
169169
$exitCode = 1;
170-
$rows[] = array(sprintf('<fg=red;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */), $message, $e->getMessage());
170+
$rows[] = [sprintf('<fg=red;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */), $message, $e->getMessage()];
171171
}
172172
}
173173
// remove the assets of the bundles that no longer exist
@@ -177,7 +177,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
177177
}
178178

179179
if ($rows) {
180-
$io->table(array('', 'Bundle', 'Method / Error'), $rows);
180+
$io->table(['', 'Bundle', 'Method / Error'], $rows);
181181
}
182182

183183
if (0 !== $exitCode) {

0 commit comments

Comments
 (0)