Download the PHP package jangregor/phpstan-prophecy without Composer
On this page you can find all versions of the php package jangregor/phpstan-prophecy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jangregor/phpstan-prophecy
More information about jangregor/phpstan-prophecy
Files in jangregor/phpstan-prophecy
Package phpstan-prophecy
Short Description Provides a phpstan/phpstan extension for phpspec/prophecy
License MIT
Informations about the package phpstan-prophecy
phpstan-prophecy
Provides a phpspec/prophecy
extension for phpstan/phpstan
.
Installation
Run
Configuration
Automatic
When using phpstan/extension-installer
, no further setup is required.
Manual
When not using phpstan/extension-installer
, extension.neon
needs to be included in phpstan.neon
:
Usage
prophesize()
and reveal()
:bulb: With this extension enabled, phpstan/phpstan
will understand that $testDouble
is an instance of SomeModel
.
prophesize()
, willExtend()
, and reveal()
:bulb: With this extension enabled, phpstan/phpstan
will understand that $testDouble
is an instance of SomeModel
.
prophesize()
, willImplement()
, and reveal()
:bulb: With this extension enabled, phpstan/phpstan
will understand that $testDouble
is an instance of SomeModel
that also implements SomeInterface
.
Method Predictions
:bulb: With this extension enabled, phpstan/phpstan
will understand that $prophecy
accepts method calls to all methods that are implemented by its prophesized class (or additionally implemented interfaces, when using willImplement()
).
Method Arguments
:exclamation: Currently here are no checks in place to validate the arguments of methods that are invoked on prophecies.
Development
A development environment is provided via .docker/Dockerfile
.
Run
to build and tag the Docker image.
Run
to open a shell in the Docker container.
Changelog
Please have a look at CHANGELOG.md
.
Contributing
Please have a look at CONTRIBUTING.md
.
License
This package is licensed using the MIT License.
Please have a look at LICENSE.md
.