Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WebifyCMS Dev Tools

Set of development tools to analyze and auto fix code standards, formatting and other stuffs for WebifyCMS packages.
Set of development tools to analyze and auto-fix code standards, formatting and other stuff for WebifyCMS packages.

The following libraries are included:

Expand Down Expand Up @@ -46,7 +46,7 @@ includes:

- Rector

Add `rector.php` in the root directory and the following, if you need to add more paths you can add them as well:
Add `rector.php` in the root directory and the following, if you need to add more paths, you can add them as well:

```php
use Webify\Tools\Rector;
Expand All @@ -68,6 +68,15 @@ return (new Rector())
vendor/bin/phpstan analyse [options] [<paths>...]
```

Additionally, add the following to your `phpstan.neon` file to enable installed PHPStan extensions:

```neon
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
```

- Run code sniffer and format your codes.

(Recommended) If you wish to fix manually, you can just output the rules that will apply like the following.
Expand All @@ -76,7 +85,7 @@ vendor/bin/phpstan analyse [options] [<paths>...]
./vendor/bin/php-cs-fixer fix --verbose --diff --show-progress=dots --dry-run
```

If you wish to auto fix the files, and output the summary of changes you can run the following.
If you wish to auto-fix the files and output the summary of changes, you can run the following.

```bash
./vendor/bin/php-cs-fixer fix --verbose --show-progress=dots
Expand Down
4 changes: 0 additions & 4 deletions phpstan-default.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
# @license https://webifycms.com/extension/tools/license
# @author Mohammed Shifreen <mshifreen@gmail.com>

includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
parameters:
level: 8
treatPhpDocTypesAsCertain: false
Expand Down
5 changes: 4 additions & 1 deletion phpstan.dist.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@
# @author Mohammed Shifreen <mshifreen@gmail.com>

includes:
- phpstan-default.neon
- phpstan-default.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon