Skip to content

Commit

Permalink
Remove return types from the stub, favouring annotations which fits e…
Browse files Browse the repository at this point in the history
…xisting implementors such as those found in service manager - this silences unusual errors from psalm.

Signed-off-by: George Steel <george@net-glue.co.uk>
  • Loading branch information
gsteel committed Jul 8, 2022
1 parent 7028b2a commit f584f93
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .psr-container.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ namespace Psr\Container {
*/
interface ContainerInterface
{
/** @param string|class-string $id */
public function has(string $id): bool;
/**
* @param string|class-string $id
* @return bool
*/
public function has(string $id);

/**
* @template T
* @psalm-param string|class-string<T> $id
* @psalm-return ($id is class-string ? T : mixed)
*/
public function get(string $id): object;
public function get(string $id);
}
}

0 comments on commit f584f93

Please sign in to comment.