phpstan/phpstan-beberlei-assert

PHPStan beberlei/assert extension

0.11 2019-01-02 11:45 UTC

README

Build Status Latest Stable Version License

This extension specifies types of values passed to:

  • Assertion::integer
  • Assertion::string
  • Assertion::float
  • Assertion::numeric
  • Assertion::boolean
  • Assertion::scalar
  • Assertion::objectOrClass
  • Assertion::isResource
  • Assertion::isCallable
  • Assertion::isArray
  • Assertion::isInstanceOf
  • Assertion::notIsInstanceOf
  • Assertion::subclassOf
  • Assertion::true
  • Assertion::false
  • Assertion::null
  • Assertion::notNull
  • Assertion::same
  • Assertion::notSame
  • nullOr* and all* variants of the above methods

Assert::that, Assert::thatNullOr and Assert::thatAll chaining methods are also supported.

Assert\that, Assert\thatNullOr and Assert\thatAll functions are supported too.

Usage

To use this extension, require it in Composer:

composer require --dev phpstan/phpstan-beberlei-assert

And include extension.neon in your project's PHPStan config:

includes:
	- vendor/phpstan/phpstan-beberlei-assert/extension.neon