phpstan/phpstan-beberlei-assert

PHPStan beberlei/assert extension

Installs: 88 186

Dependents: 25

Suggesters: 0

Stars: 12

Watchers: 3

Forks: 2

Open Issues: 2

Type:phpstan-extension

0.11.1 2019-05-12 16:55 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.

Installation

To use this extension, require it in Composer:

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

If you also install phpstan/extension-installer then you're all set!

Manual installation

If you don't want to use phpstan/extension-installer, include extension.neon in your project's PHPStan config:

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