weblabormx/weblabor-cs

Code Standars for Weblabor

Maintainers

Package info

gitlab.weblabor.mx/weblabormx/paquetes/weblabor-cs

Homepage

pkg:composer/weblabormx/weblabor-cs

Transparency log

Statistics

Installs: 8 829

Dependents: 0

Suggesters: 0

v1.2.1 2026-08-11 16:18 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.