Interface PHPStan\Reflection\Callables\CallableParametersAcceptor

extends ParametersAcceptor

A ParametersAcceptor for callable types (closures, first-class callables). Extends ParametersAcceptor with information about side effects, exceptions, and other runtime behavior of callable values. This is what PHPStan knows about a closure or callable when it's passed as a parameter or stored in a variable. Implemented by ClosureType and used as the return type of Type::getCallableParametersAcceptors(). Provides:

  • Throw points (what exceptions the callable may throw)
  • Impure points (what side effects the callable may have)
  • Purity information
  • Variables captured from outer scope (used variables)
  • Expressions that are invalidated by calling this callable
  • PHPStan\Reflection\Callables\CallableParametersAcceptor extends ParametersAcceptor
    • PHPStan\Type\CallableType implements CompoundType, CallableParametersAcceptor uses MaybeArrayTypeTrait, MaybeIterableTypeTrait, MaybeObjectTypeTrait, MaybeOffsetAccessibleTypeTrait, TruthyBooleanTypeTrait, UndecidedComparisonCompoundTypeTrait, NonRemoveableTypeTrait, NonGeneralizableTypeTrait
    • PHPStan\Type\ClosureType implements TypeWithClassName, CallableParametersAcceptor uses NonArrayTypeTrait, NonIterableTypeTrait, UndecidedComparisonTypeTrait, NonOffsetAccessibleTypeTrait, NonRemoveableTypeTrait, NonGeneralizableTypeTrait
    • PHPStan\Reflection\Callables\FunctionCallableVariant implements CallableParametersAcceptor, ExtendedParametersAcceptor
    • PHPStan\Reflection\InaccessibleMethod implements CallableParametersAcceptor
    • PHPStan\Reflection\TrivialParametersAcceptor implements ExtendedParametersAcceptor, CallableParametersAcceptor
    • PHPStan\Reflection\ResolvedFunctionVariantWithCallable implements ResolvedFunctionVariant, CallableParametersAcceptor
    • PHPStan\Reflection\ExtendedCallableFunctionVariant implements CallableParametersAcceptor
Methods
Methods inherited from PHPStan\Reflection\ParametersAcceptor
getTemplateTypeMap(), getResolvedTemplateTypeMap(), getParameters(), isVariadic(), getReturnType()