Skip to content

Commit 0be7357

Browse files
wouterjnicolas-grekas
authored andcommitted
Add missing return types to magic methods
1 parent 49a3f10 commit 0be7357

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Loader/Configurator/AbstractConfigurator.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ abstract class AbstractConfigurator
3434
/** @internal */
3535
protected Definition|Alias|null $definition = null;
3636

37+
/**
38+
* @return mixed
39+
*/
3740
public function __call(string $method, array $args)
3841
{
3942
if (method_exists($this, 'set'.$method)) {
@@ -48,6 +51,9 @@ public function __sleep(): array
4851
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
4952
}
5053

54+
/**
55+
* @return void
56+
*/
5157
public function __wakeup()
5258
{
5359
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);

ServiceLocator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ public function get(string $id): mixed
6060
}
6161
}
6262

63+
/**
64+
* @return mixed
65+
*/
6366
public function __invoke(string $id)
6467
{
6568
return isset($this->factories[$id]) ? $this->get($id) : null;

0 commit comments

Comments
 (0)