Skip to content

Commit 1c6c9da

Browse files
committed
init
1 parent 0fc5756 commit 1c6c9da

15 files changed

Lines changed: 8359 additions & 0 deletions

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# phpstan-craftcms
2+
3+
[![Latest Version on Packagist][ico-version]][link-packagist]
4+
5+
Extension for PHPStan for better support for Craft CMS. The following features are provided:
6+
7+
- Configure autoload of Craft CMS for analysis
8+
- Stub to support different `ElementQuery`-classes
9+
10+
## Install
11+
12+
Via Composer
13+
14+
``` bash
15+
$ composer require --dev jensderond/phpstan-craftcms
16+
```
17+
18+
## Usage
19+
20+
Add `phpstan-craftcms` to the project `phpstan.neon` / `phpstan.neon.dist`:
21+
```neon
22+
includes:
23+
- vendor/jensderond/phpstan-craftcms/extension.neon
24+
```
25+
26+
## Credits
27+
28+
- [Studio Stomp][link-author]
29+
- [marcusgaius/phpstan](https://github.com/marcusgaius/phpstan)
30+
- [erickskrauch/phpstan-yii2](https://github.com/erickskrauch/phpstan-yii2)

composer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "jensderond/phpstan-craftcms",
3+
"description": "CraftCMS extension for PHPStan",
4+
"version": "1.0.0",
5+
"require": {
6+
"phpstan/phpstan": "^2.1"
7+
},
8+
"require-dev": {
9+
"craftcms/cms": "~5",
10+
"laravel/pint": "^1.25"
11+
},
12+
"license": "MIT",
13+
"autoload": {
14+
"psr-4": {
15+
"Jensderond\\PhpstanCraftcms\\": "src/"
16+
}
17+
},
18+
"authors": [
19+
{
20+
"name": "Jens de Rond",
21+
"email": "jensderond@gmail.com"
22+
}
23+
],
24+
"scripts": {
25+
"lint": "pint"
26+
},
27+
"config": {
28+
"allow-plugins": {
29+
"yiisoft/yii2-composer": true,
30+
"craftcms/plugin-installer": true
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)