eloquent/phpstan-phony

This package is abandoned and no longer maintained. No replacement package was suggested.

PHPStan configuration for Phony.

Installs: 104 036

Dependents: 22

Suggesters: 0

Security: 0

Stars: 5

Watchers: 3

Forks: 2

Open Issues: 0

Type:phpstan-extension

0.8.0 2021-11-02 00:00 UTC

This package is auto-updated.

Last update: 2023-08-08 04:10:40 UTC


README

No longer maintained

This package is no longer maintained. See this statement for more info.

PHPStan configuration for Phony

Current version image

Installation

composer require --dev eloquent/phpstan-phony

Usage

  • When using phpstan/extension-installer, no configuration is necessary.
  • Alternatively, an 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();
mock([ClassA::class, ClassB::class])->get();
partialMock(ClassA::class)->get();
partialMock([ClassA::class, ClassB::class])->get();
mockBuilder(ClassA::class)->get();
mockBuilder([ClassA::class, ClassB::class])->get();
mockBuilder(ClassA::class)->full();
mockBuilder([ClassA::class, ClassB::class])->full();
mockBuilder(ClassA::class)->partial();
mockBuilder([ClassA::class, ClassB::class])->partial();
mockBuilder(ClassA::class)->partialWith();
mockBuilder([ClassA::class, ClassB::class])->partialWith();

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

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

License

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