Skip to content

Commit ef36811

Browse files
wouterjnicolas-grekas
authored andcommitted
[Components] Convert to native return types
1 parent 47075c6 commit ef36811

File tree

57 files changed

+125
-440
lines changed

Some content is hidden

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

57 files changed

+125
-440
lines changed

Argument/ArgumentInterface.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,5 @@ interface ArgumentInterface
2020
{
2121
public function getValues(): array;
2222

23-
/**
24-
* @return void
25-
*/
26-
public function setValues(array $values);
23+
public function setValues(array $values): void;
2724
}

Argument/IteratorArgument.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ public function getValues(): array
3030
return $this->values;
3131
}
3232

33-
/**
34-
* @return void
35-
*/
36-
public function setValues(array $values)
33+
public function setValues(array $values): void
3734
{
3835
$this->values = $values;
3936
}

Argument/ServiceClosureArgument.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ public function getValues(): array
3232
return $this->values;
3333
}
3434

35-
/**
36-
* @return void
37-
*/
38-
public function setValues(array $values)
35+
public function setValues(array $values): void
3936
{
4037
if ([0] !== array_keys($values)) {
4138
throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one value.');

Argument/ServiceLocatorArgument.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ public function getValues(): array
4141
return $this->values;
4242
}
4343

44-
/**
45-
* @return void
46-
*/
47-
public function setValues(array $values)
44+
public function setValues(array $values): void
4845
{
4946
$this->values = $values;
5047
}

Argument/TaggedIteratorArgument.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ public function __construct(string $tag, string $indexAttribute = null, string $
5252
$this->excludeSelf = $excludeSelf;
5353
}
5454

55-
/**
56-
* @return string
57-
*/
58-
public function getTag()
55+
public function getTag(): string
5956
{
6057
return $this->tag;
6158
}

Compiler/AbstractRecursivePass.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ abstract class AbstractRecursivePass implements CompilerPassInterface
3737
private ExpressionLanguage $expressionLanguage;
3838
private bool $inExpression = false;
3939

40-
/**
41-
* @return void
42-
*/
43-
public function process(ContainerBuilder $container)
40+
public function process(ContainerBuilder $container): void
4441
{
4542
$this->container = $container;
4643

@@ -51,10 +48,7 @@ public function process(ContainerBuilder $container)
5148
}
5249
}
5350

54-
/**
55-
* @return void
56-
*/
57-
protected function enableExpressionProcessing()
51+
protected function enableExpressionProcessing(): void
5852
{
5953
$this->processExpressions = true;
6054
}
@@ -71,10 +65,8 @@ protected function inExpression(bool $reset = true): bool
7165

7266
/**
7367
* Processes a value found in a definition tree.
74-
*
75-
* @return mixed
7668
*/
77-
protected function processValue(mixed $value, bool $isRoot = false)
69+
protected function processValue(mixed $value, bool $isRoot = false): mixed
7870
{
7971
if (\is_array($value)) {
8072
foreach ($value as $k => $v) {

Compiler/AnalyzeServiceReferencesPass.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@ public function __construct(bool $onlyConstructorArguments = false, bool $hasPro
5656

5757
/**
5858
* Processes a ContainerBuilder object to populate the service reference graph.
59-
*
60-
* @return void
6159
*/
62-
public function process(ContainerBuilder $container)
60+
public function process(ContainerBuilder $container): void
6361
{
6462
$this->container = $container;
6563
$this->graph = $container->getCompiler()->getServiceReferenceGraph();

Compiler/AutoAliasServicePass.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@
2020
*/
2121
class AutoAliasServicePass implements CompilerPassInterface
2222
{
23-
/**
24-
* @return void
25-
*/
26-
public function process(ContainerBuilder $container)
23+
public function process(ContainerBuilder $container): void
2724
{
2825
foreach ($container->findTaggedServiceIds('auto_alias') as $serviceId => $tags) {
2926
foreach ($tags as $tag) {

Compiler/AutowirePass.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ public function withValue(\ReflectionParameter $parameter): self
6868
};
6969
}
7070

71-
/**
72-
* @return void
73-
*/
74-
public function process(ContainerBuilder $container)
71+
public function process(ContainerBuilder $container): void
7572
{
7673
$this->defaultArgument->bag = $container->getParameterBag();
7774

Compiler/CheckCircularReferencesPass.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ class CheckCircularReferencesPass implements CompilerPassInterface
3131

3232
/**
3333
* Checks the ContainerBuilder object for circular references.
34-
*
35-
* @return void
3634
*/
37-
public function process(ContainerBuilder $container)
35+
public function process(ContainerBuilder $container): void
3836
{
3937
$graph = $container->getCompiler()->getServiceReferenceGraph();
4038

0 commit comments

Comments
 (0)