eloquent/phpstan-phony

PHPStan configuration for Phony.

0.3.0 2018-07-11 05:37 UTC

README

Current version image Current build status image Current Windows build status image

Installation

Usage

Once installed, a simple include can be added to the PHPStan configuration:

includes:
  - vendor/eloquent/phpstan-phony/phony.neon

Features

This repo currently supports correct type information for the following Phony mocking use cases:

mock(ClassA::class)->get();
partialMock(ClassA::class)->get();
mockBuilder(ClassA::class)->get();
mockBuilder(ClassA::class)->full();
mockBuilder(ClassA::class)->partial();
mockBuilder(ClassA::class)->partialWith();

Phony::mock(ClassA::class)->get();
Phony::partialMock(ClassA::class)->get();
Phony::mockBuilder(ClassA::class)->get();
Phony::mockBuilder(ClassA::class)->full();
Phony::mockBuilder(ClassA::class)->partial();
Phony::mockBuilder(ClassA::class)->partialWith();

mock(ClassA::class)->methodA;
onStatic(mock(ClassA::class))->staticMethodA;

License

For the full copyright and license information, please view the LICENSE file.