-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from gsteel/qa/psr-stub
Improve type inference for Plugin Managers
- Loading branch information
Showing
32 changed files
with
407 additions
and
535 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
"intl" | ||
], | ||
"ignore_php_platform_requirements": { | ||
"8.0": true, | ||
"8.1": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Psr\Container { | ||
/** | ||
* Provides automatic type inference for Psalm when retrieving a service from a container using a FQCN | ||
*/ | ||
interface ContainerInterface | ||
{ | ||
/** | ||
* @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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.