Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mhujer/phpstan-consistence
Custom PHPStan Rules for Consistence library (https://github.com/phpstan/phpstan and https://github.com/consistence/consistence/)
https://github.com/mhujer/phpstan-consistence
php phpstan phpstan-extension phpstan-rules static-analysis
Last synced: about 1 month ago
JSON representation
Custom PHPStan Rules for Consistence library (https://github.com/phpstan/phpstan and https://github.com/consistence/consistence/)
- Host: GitHub
- URL: https://github.com/mhujer/phpstan-consistence
- Owner: mhujer
- License: mit
- Created: 2017-12-24T10:31:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-11-05T12:25:16.000Z (about 3 years ago)
- Last Synced: 2024-11-07T08:07:05.561Z (about 2 months ago)
- Topics: php, phpstan, phpstan-extension, phpstan-rules, static-analysis
- Language: PHP
- Size: 19.5 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Custom PHPStan Rules for Consistence library
[![Build Status](https://travis-ci.org/mhujer/phpstan-consistence.svg)](https://travis-ci.org/mhujer/phpstan-consistence)
[![Coverage Status](https://coveralls.io/repos/github/mhujer/phpstan-consistence/badge.svg)](https://coveralls.io/github/mhujer/phpstan-consistence)
[![Latest Stable Version](https://poser.pugx.org/mhujer/phpstan-consistence/v/stable)](https://packagist.org/packages/mhujer/phpstan-consistence)
[![License](https://poser.pugx.org/mhujer/phpstan-consistence/license)](https://packagist.org/packages/mhujer/phpstan-consistence)This repository provides following custom [PHPStan](https://github.com/phpstan/phpstan) rules for [Consistence library](https://github.com/consistence/consistence/)
* Check that no class extends `\Consistence\ObjectPrototype` or uses `\Consistence\Type\ObjectMixinTrait` somewhere in its hierarchy tree. The type of errors it prevents is caught by PHPStan so there is no need to extend/use anymore.
* Check that Consistence function wrappers (from `ArrayType`) are used for array manipulation## Usage
To use those rules, require them in [Composer](https://getcomposer.org/):
```bash
composer require --dev mhujer/phpstan-consistence
```And include them in your project's PHPStan config:
```yaml
includes:
- vendor/mhujer/phpstan-consistence/rules.neon
```