Skip to content

Commit e2582ef

Browse files
[4.4] Add return types on internal|final|private methods (bis)
1 parent c999d54 commit e2582ef

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ChildDefinition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ public function replaceArgument($index, $value)
109109
/**
110110
* @internal
111111
*/
112-
public function setAutoconfigured($autoconfigured)
112+
public function setAutoconfigured($autoconfigured): self
113113
{
114114
throw new BadMethodCallException('A ChildDefinition cannot be autoconfigured.');
115115
}
116116

117117
/**
118118
* @internal
119119
*/
120-
public function setInstanceofConditionals(array $instanceof)
120+
public function setInstanceofConditionals(array $instanceof): self
121121
{
122122
throw new BadMethodCallException('A ChildDefinition cannot have instanceof conditionals set on it.');
123123
}

Compiler/MergeExtensionConfigurationPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function freezeAfterProcessing(Extension $extension, ContainerBuilder $co
137137
/**
138138
* {@inheritdoc}
139139
*/
140-
public function getEnvPlaceholders()
140+
public function getEnvPlaceholders(): array
141141
{
142142
return null !== $this->processedEnvPlaceholders ? $this->processedEnvPlaceholders : parent::getEnvPlaceholders();
143143
}
@@ -167,7 +167,7 @@ public function __construct(ExtensionInterface $extension, ParameterBagInterface
167167
/**
168168
* {@inheritdoc}
169169
*/
170-
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0)
170+
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): self
171171
{
172172
throw new LogicException(sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.', \get_class($pass), $this->extensionClass));
173173
}

Tests/Fixtures/ScalarFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ final class ScalarFactory
77
/**
88
* @return string
99
*/
10-
public static function getSomeValue()
10+
public static function getSomeValue(): string
1111
{
1212
return 'some value';
1313
}

0 commit comments

Comments
 (0)