mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-04 22:47:21 +00:00
minor #4522 Add @template on RuntimeLoaderinterface (Twig 4) (smnandre)
This PR was merged into the 4.x branch.
Discussion
----------
Add `@template` on RuntimeLoaderinterface (Twig 4)
Do php-stan annotation have an impact on BC promise?
The interface uses the term "class" already.. i'm guessing it's ok ?
Commits
-------
c24c71a3ca Add `@template` on RuntimeLoaderinterface (Twig 4)
This commit is contained in:
@@ -21,7 +21,11 @@ interface RuntimeLoaderInterface
|
||||
/**
|
||||
* Creates the runtime implementation of a Twig element (filter/function/test).
|
||||
*
|
||||
* @return object|null The runtime instance or null if the loader does not know how to create the runtime for this class
|
||||
* @template TRuntime of object
|
||||
*
|
||||
* @param class-string<TRuntime> $class A runtime class name
|
||||
*
|
||||
* @return TRuntime|null The runtime instance or null if the loader does not know how to create the runtime for this class
|
||||
*/
|
||||
public function load(string $class): ?object;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user