proget-hq/phpstan-phpspec
最新稳定版本:0.3.0
Composer 安装命令:
composer require proget-hq/phpstan-phpspec
包简介
PhpSpec extension for PHPStan
README 文档
README
What does it do?
- Currently compatible with original specs from
PhpSpecitself - Check if custom matcher exist in given spec class
- support fot
getMatchersmethod
- support fot
- Provides correct return type for
Collaboratorin spec methodswill*methods- support for array return type (check if array item has correct type)
- Allow to user
PropehcyasCollaboratorargumentsArgument::cetera(),Argument::any()
- Provides correct attributes for
Collaborator - Provides correct methods for
ObjectBehavior:should*methodsduring*methodsbeConstructedWith,beConstructedThrough,beAnInstanceOf- search original spec class (subject) and check if methods exists
- Provides correct attributes for
ObjectBehavior:- public attributes
- static properties (with
$this->CONSTANT_NAME)
- Provides correct class for
getWrappedObjectmethod - Support
ObjectState Matcherand check if appropriate methods exists
Compatibility
| PHPStan version | PhpSpec version | PhpSpec extension version |
|---|---|---|
| ^0.11.6 | ^6.0 | 0.3.x |
| ^0.11.6 | ^5.1 | 0.2.x |
| ^0.10.7 | ^5.1 | 0.1.x |
Installation
composer require --dev proget-hq/phpstan-phpspec
Configuration
Put this into your phpstan.neon config:
includes: - vendor/proget-hq/phpstan-phpspec/extension.neon parameters: specDir: 'spec/'
统计信息
- 总下载量: 30.24k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 20
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-19