mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
phpstan: enable checkMissingCallableSignature
This commit is contained in:
@@ -701,6 +701,7 @@ class PluginManager{
|
||||
}
|
||||
|
||||
$handlerClosure = $method->getClosure($listener);
|
||||
if($handlerClosure === null) throw new AssumptionFailedError("This should never happen");
|
||||
|
||||
try{
|
||||
$paramType = $parameters[0]->getType();
|
||||
|
@@ -117,6 +117,8 @@ class Utils{
|
||||
/**
|
||||
* Generates an unique identifier to a callable
|
||||
*
|
||||
* @phpstan-param callable(mixed...) : mixed $variable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getCallableIdentifier(callable $variable){
|
||||
@@ -132,6 +134,7 @@ class Utils{
|
||||
/**
|
||||
* Returns a readable identifier for the given Closure, including file and line.
|
||||
*
|
||||
* @phpstan-param \Closure(mixed...) : mixed $closure
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public static function getNiceClosureName(\Closure $closure) : string{
|
||||
@@ -685,6 +688,8 @@ class Utils{
|
||||
*
|
||||
* @param callable $signature Dummy callable with the required parameters and return type
|
||||
* @param callable $subject Callable to check the signature of
|
||||
* @phpstan-param callable(mixed...) : mixed $signature
|
||||
* @phpstan-param callable(mixed...) : mixed $subject
|
||||
*
|
||||
* @throws \DaveRandom\CallbackValidator\InvalidCallbackException
|
||||
* @throws \TypeError
|
||||
|
Reference in New Issue
Block a user