Merge pull request #201 from yguedidi/add-more-precise-types
Add more precise types
This commit is contained in:
@@ -27,7 +27,10 @@ final class InitializedSymfonyExtensionEnvironment implements SymfonyExtensionEn
|
|||||||
/** @var Suite */
|
/** @var Suite */
|
||||||
private $suite;
|
private $suite;
|
||||||
|
|
||||||
/** @var Context[] */
|
/**
|
||||||
|
* @var array<class-string<Context>, Context>
|
||||||
|
* @psalm-var class-string-map<T as Context, T>
|
||||||
|
*/
|
||||||
private $contexts = [];
|
private $contexts = [];
|
||||||
|
|
||||||
public function __construct(Suite $suite)
|
public function __construct(Suite $suite)
|
||||||
@@ -74,6 +77,12 @@ final class InitializedSymfonyExtensionEnvironment implements SymfonyExtensionEn
|
|||||||
/**
|
/**
|
||||||
* @see http://behat.org/en/latest/cookbooks/accessing_contexts_from_each_other.html
|
* @see http://behat.org/en/latest/cookbooks/accessing_contexts_from_each_other.html
|
||||||
*
|
*
|
||||||
|
* @template T of Context
|
||||||
|
*
|
||||||
|
* @param class-string<T> $class
|
||||||
|
*
|
||||||
|
* @return T
|
||||||
|
*
|
||||||
* @throws ContextNotFoundException
|
* @throws ContextNotFoundException
|
||||||
*/
|
*/
|
||||||
public function getContext(string $class): Context
|
public function getContext(string $class): Context
|
||||||
|
|||||||
Reference in New Issue
Block a user