Skip to content

Commit 1b7a2a3

Browse files
committed
Merge branch '3.4' into 4.1
* 3.4: 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 2068060 + 8f54459 commit 1b7a2a3

File tree

91 files changed

+562
-562
lines changed

Some content is hidden

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

91 files changed

+562
-562
lines changed

Argument/BoundArgument.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct($value)
3333
*/
3434
public function getValues()
3535
{
36-
return array($this->value, $this->identifier, $this->used);
36+
return [$this->value, $this->identifier, $this->used];
3737
}
3838

3939
/**

Argument/ServiceClosureArgument.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ServiceClosureArgument implements ArgumentInterface
2525

2626
public function __construct(Reference $reference)
2727
{
28-
$this->values = array($reference);
28+
$this->values = [$reference];
2929
}
3030

3131
/**
@@ -41,7 +41,7 @@ public function getValues()
4141
*/
4242
public function setValues(array $values)
4343
{
44-
if (array(0) !== array_keys($values) || !($values[0] instanceof Reference || null === $values[0])) {
44+
if ([0] !== array_keys($values) || !($values[0] instanceof Reference || null === $values[0])) {
4545
throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one Reference.');
4646
}
4747

Argument/TaggedIteratorArgument.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TaggedIteratorArgument extends IteratorArgument
2222

2323
public function __construct(string $tag)
2424
{
25-
parent::__construct(array());
25+
parent::__construct([]);
2626

2727
$this->tag = $tag;
2828
}

Compiler/AnalyzeServiceReferencesPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function processValue($value, $isRoot = false)
8787
return $value;
8888
}
8989
if ($value instanceof Expression) {
90-
$this->getExpressionLanguage()->compile((string) $value, array('this' => 'container'));
90+
$this->getExpressionLanguage()->compile((string) $value, ['this' => 'container']);
9191

9292
return $value;
9393
}

Compiler/AutowireRequiredMethodsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected function processValue($value, $isRoot = false)
3434
return $value;
3535
}
3636

37-
$alreadyCalledMethods = array();
37+
$alreadyCalledMethods = [];
3838

3939
foreach ($value->getMethodCalls() as list($method)) {
4040
$alreadyCalledMethods[strtolower($method)] = true;

Compiler/CheckCircularReferencesPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public function process(ContainerBuilder $container)
3636
{
3737
$graph = $container->getCompiler()->getServiceReferenceGraph();
3838

39-
$this->checkedNodes = array();
39+
$this->checkedNodes = [];
4040
foreach ($graph->getNodes() as $id => $node) {
41-
$this->currentPath = array($id);
41+
$this->currentPath = [$id];
4242

4343
$this->checkOutEdges($node->getOutEdges());
4444
}

Compiler/CheckDefinitionValidityPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function process(ContainerBuilder $container)
8383
if ($definition->isPublic() && !$definition->isPrivate()) {
8484
$resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs);
8585
if (null !== $usedEnvs) {
86-
throw new EnvParameterException(array($resolvedId), null, 'A service name ("%s") cannot contain dynamic values.');
86+
throw new EnvParameterException([$resolvedId], null, 'A service name ("%s") cannot contain dynamic values.');
8787
}
8888
}
8989
}
@@ -92,7 +92,7 @@ public function process(ContainerBuilder $container)
9292
if ($alias->isPublic() && !$alias->isPrivate()) {
9393
$resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs);
9494
if (null !== $usedEnvs) {
95-
throw new EnvParameterException(array($resolvedId), null, 'An alias name ("%s") cannot contain dynamic values.');
95+
throw new EnvParameterException([$resolvedId], null, 'An alias name ("%s") cannot contain dynamic values.');
9696
}
9797
}
9898
}

Compiler/MergeExtensionConfigurationPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function freezeAfterProcessing(Extension $extension, ContainerBuilder $co
119119
// Extension::processConfiguration() wasn't called, we cannot know how configs were merged
120120
return;
121121
}
122-
$this->processedEnvPlaceholders = array();
122+
$this->processedEnvPlaceholders = [];
123123

124124
// serialize config and container to catch env vars nested in object graphs
125125
$config = serialize($config).serialize($container->getDefinitions()).serialize($container->getAliases()).serialize($container->getParameterBag()->all());

Compiler/PriorityTaggedServiceTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ trait PriorityTaggedServiceTrait
3838
*/
3939
private function findAndSortTaggedServices($tagName, ContainerBuilder $container)
4040
{
41-
$services = array();
41+
$services = [];
4242

4343
foreach ($container->findTaggedServiceIds($tagName, true) as $serviceId => $attributes) {
4444
$priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;

Compiler/RegisterEnvVarProcessorsPass.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
*/
2828
class RegisterEnvVarProcessorsPass implements CompilerPassInterface
2929
{
30-
private static $allowedTypes = array('array', 'bool', 'float', 'int', 'string');
30+
private static $allowedTypes = ['array', 'bool', 'float', 'int', 'string'];
3131

3232
public function process(ContainerBuilder $container)
3333
{
3434
$bag = $container->getParameterBag();
35-
$types = array();
36-
$processors = array();
35+
$types = [];
36+
$processors = [];
3737
foreach ($container->findTaggedServiceIds('container.env_var_processor') as $id => $tags) {
3838
if (!$r = $container->getReflectionClass($class = $container->getDefinition($id)->getClass())) {
3939
throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
@@ -58,7 +58,7 @@ public function process(ContainerBuilder $container)
5858
if ($processors) {
5959
$container->register('container.env_var_processors_locator', ServiceLocator::class)
6060
->setPublic(true)
61-
->setArguments(array($processors))
61+
->setArguments([$processors])
6262
;
6363
}
6464
}

0 commit comments

Comments
 (0)