All Projects → proget-hq → phpstan-phpspec

proget-hq / phpstan-phpspec

Licence: MIT license
PhpSpec extension for PHPStan

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to phpstan-phpspec

phpstan-wordpress
WordPress extensions for PHPStan ⛏️
Stars: ✭ 182 (+857.89%)
Mutual labels:  static-analysis, phpstan, phpstan-extension
phpstan-dba
PHPStan based SQL static analysis and type inference for the database access layer
Stars: ✭ 163 (+757.89%)
Mutual labels:  static-analysis, phpstan, phpstan-extension
phpstan-enum
Enum class reflection extension for PHPStan
Stars: ✭ 42 (+121.05%)
Mutual labels:  phpstan, phpstan-extension
Monofony
Main repository for all Monofony bundles
Stars: ✭ 47 (+147.37%)
Mutual labels:  phpspec, phpstan
phpstan
PHP Static Analysis in Github Actions.
Stars: ✭ 41 (+115.79%)
Mutual labels:  static-analysis, phpstan
phpstan-nette
Nette Framework class reflection extension for PHPStan & framework-specific rules
Stars: ✭ 87 (+357.89%)
Mutual labels:  static-analysis, phpstan
vim-phpstan
A Vim plugin for PHPStan - https://github.com/phpstan/phpstan. It calls `phpstan` to do static analysis of your PHP code and displays the errors in Vim's quickfix list.
Stars: ✭ 26 (+36.84%)
Mutual labels:  static-analysis, phpstan
Phpstan
PHP Static Analysis Tool - discover bugs in your code without running it!
Stars: ✭ 10,534 (+55342.11%)
Mutual labels:  static-analysis, phpstan
woocommerce-stubs
WooCommerce function and class declaration stubs for static analysis.
Stars: ✭ 49 (+157.89%)
Mutual labels:  static-analysis, phpstan
phpstan-webmozart-assert
PHPStan extension for webmozart/assert
Stars: ✭ 132 (+594.74%)
Mutual labels:  static-analysis, phpstan
phpstan-symfony
*DEPRECATED* Symfony extension for PHPStan
Stars: ✭ 42 (+121.05%)
Mutual labels:  static-analysis, phpstan
phpstan-extensions
Extensions for PHPStan
Stars: ✭ 61 (+221.05%)
Mutual labels:  static-analysis, phpstan
phpcs-psr4-sniff
[READ-ONLY] PHP_CodeSniffer sniff that checks class name matches PSR-4 project structure.
Stars: ✭ 23 (+21.05%)
Mutual labels:  static-analysis
swap-detector
A library for detecting swapped arguments in function calls, and a Clang Static Analyzer plugin used to demonstrate the library.
Stars: ✭ 19 (+0%)
Mutual labels:  static-analysis
Lyra
No description or website provided.
Stars: ✭ 23 (+21.05%)
Mutual labels:  static-analysis
gospal
Go static program analyser
Stars: ✭ 56 (+194.74%)
Mutual labels:  static-analysis
lints
Lint all your JavaScript, CSS, HTML, Markdown and Dockerfiles with a single command
Stars: ✭ 14 (-26.32%)
Mutual labels:  static-analysis
qulice
Quality Police for Java projects: aggregator of Checkstyle, PMD, and SpotBugs
Stars: ✭ 286 (+1405.26%)
Mutual labels:  static-analysis
luli
A static analysis and linter tool for Lua
Stars: ✭ 45 (+136.84%)
Mutual labels:  static-analysis
sbt-findbugs
FindBugs static analysis plugin for sbt.
Stars: ✭ 47 (+147.37%)
Mutual labels:  static-analysis

PhpSpec extension for PHPStan

Minimum PHP Version Latest Stable Version Build Status Total Downloads License

What does it do?

  • Currently compatible with original specs from PhpSpec itself
  • Check if custom matcher exist in given spec class
    • support fot getMatchers method
  • Provides correct return type for Collaborator in spec methods
    • will* methods
    • support for array return type (check if array item has correct type)
  • Allow to user Propehcy as Collaborator arguments
    • Argument::cetera(), Argument::any()
  • Provides correct attributes for Collaborator
  • Provides correct methods for ObjectBehavior:
    • should* methods
    • during* methods
    • beConstructedWith, 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 getWrappedObject method
  • Support ObjectState Matcher and 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/'
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].