weblabormx / weblabor-cs
Code Standars for Weblabor
Requires
- php: ^8.2
- kubawerlos/php-cs-fixer-custom-fixers: ^3.21
- laravel/framework: >10.0
- laravel/pint: ^1.15
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-arch: ^2.7
- pestphp/pest-plugin-laravel: ^2.3
Conflicts
- laravel/framework: <10.0
README
Package to clean the code of projects
Installation
You can install the package via composer:
composer require weblabormx/weblabor-cs --dev
Usage
Just execute php artisan clean:code to clean the code.
This includes:
- compacting simple trait declarations on one line
- compacting simple variable declarations on one line
- removing blank lines inside related declaration blocks
- indenting Blade views following their tag and directive structure
Views are indented with four spaces per level. Only whitespace is ever changed:
a closing tag that belongs to an element opened on an earlier line gets a line
of its own, block directives such as @if, @foreach or @include get a line
of their own, and a tag that opens without closing on the same line breaks
before the tag that follows it. Plain text is never split.
Content whose whitespace is meaningful is respected: pre and textarea are
never modified, and script, style, @php blocks and multiline tags keep
their own layout, moving as a block. Mail views and views without any markup
are left alone.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.