eloquent / phpstan-phony
PHPStan configuration for Phony.
Installs: 103 817
Dependents: 22
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 2
Open Issues: 0
Type:phpstan-extension
Requires
- php: ^7.3 || ^8
- phpstan/phpstan: ^1
Requires (Dev)
README
No longer maintained
This package is no longer maintained. See this statement for more info.
PHPStan configuration for Phony
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.