Skip to content

Commit a6134de

Browse files
feature #50842 Add missing return types to magic methods (wouterj)
This PR was merged into the 6.4 branch. Discussion ---------- Add missing return types to magic methods | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | yes | Tickets | - | License | MIT | Doc PR | - I promise, these 72 methods really are the last methods that did not have a return type already 🙃 Commits ------- 6b270010c4 Add missing return types to magic methods
2 parents b86b1e2 + 0be7357 commit a6134de

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)