Interface PHPStan\Type\UnaryOperatorTypeSpecifyingExtension

This is the extension interface to implement if you want to describe how unary operators like -, +, ~ should infer types for PHP extensions that overload the behaviour, like GMP.

To register it in the configuration file use the phpstan.broker.unaryOperatorTypeSpecifyingExtension service tag:

services:
	-
		class: App\PHPStan\MyExtension
		tags:
			- phpstan.broker.unaryOperatorTypeSpecifyingExtension
  • PHPStan\Type\UnaryOperatorTypeSpecifyingExtension
    • PHPStan\Type\Php\GmpUnaryOperatorTypeSpecifyingExtension implements UnaryOperatorTypeSpecifyingExtension
    • PHPStan\Type\Php\BcMathNumberUnaryOperatorTypeSpecifyingExtension implements UnaryOperatorTypeSpecifyingExtension
Methods