Namespace PHPStan\Reflection\Callables

Interfaces
CallableParametersAcceptor

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