eloquent/phpstan-phony

此包已被废弃且不再维护。未建议任何替代包。

Phony 的 PHPStan 配置

安装量: 103,521

依赖者: 20

建议者: 0

安全: 0

星星: 5

关注者: 3

分支: 2

开放问题: 0

类型: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

不再维护

此包不再维护。更多信息请参阅 此声明

Phony 的 PHPStan 配置

Current version image

安装

composer require --dev eloquent/phpstan-phony

用法

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

功能

此仓库目前支持以下 Phony 模拟用例的正确类型信息

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 文件