bitvalencia/laravel-style-rules

This package is abandoned and no longer maintained. No replacement package was suggested.

Laravel style rules for PHP-CS-Fixer

1.0.0 2020-07-05 23:06 UTC

This package is auto-updated.

Last update: 2023-03-25 15:10:14 UTC


README

These are the rules applied across all our projects.

Installation

You can install using composer from Packagist.

composer require bitvalencia/laravel-style-rules --dev

Usage

In your .php_cs config file

<?php

// specify the paths to fix

$finder = PhpCsFixer\Finder::create()
    ->notPath('bootstrap/*')
    ->notPath('storage/*')
    ->notPath('vendor')
    ->in([
        __DIR__ . '/app',
        __DIR__ . '/tests',
        __DIR__ . '/database',
    ])
    ->name('*.php')
    ->notName('*.blade.php')
    ->ignoreDotFiles(true)
    ->ignoreVCS(true);


// then call and return the following style function

return BitValencia\style_rules($finder);

Running

Running the command

./vendor/bin/php-cs-fixer fix

Running in CI

./vendor/bin/php-cs-fixer fix --dry-run

Resources

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.