eloquent / phpstan-phony
此包已被废弃且不再维护。未建议任何替代包。
Phony 的 PHPStan 配置
0.8.0
2021-11-02 00:00 UTC
Requires
- php: ^7.3 || ^8
- phpstan/phpstan: ^1
Requires (Dev)
README
不再维护
此包不再维护。更多信息请参阅 此声明。
Phony 的 PHPStan 配置
安装
composer require --dev eloquent/phpstan-phony
用法
- 当使用 phpstan/extension-installer 时,无需配置。
- 或者,可以在 PHPStan 配置中添加一个 include
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 文件。