Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Coding Standard Laravel Package

whatwedo/php-coding-standard

View on GitHub
Deep Wiki
Context7

Latest Stable Version

PhpCodingStandard

This project is a set of coding standard rules, which we are using at whatwedo. It's heavily based on Simplify/EasyCodingStandard.

Installation

We suggest to use Composer to install this project:

composer require whatwedo/php-coding-standard

Usage

Without custom configuration

You can run the checks without project specific configuration using one of following commands:

vendor/bin/ecs check SRC_DIRECTORY --config vendor/whatwedo/php-coding-standard/config/whatwedo-symfony.php # Symfony projects
vendor/bin/ecs check SRC_DIRECTORY --config vendor/whatwedo/php-coding-standard/config/whatwedo-wordpress.php # WordPress projects
vendor/bin/ecs check SRC_DIRECTORY --config vendor/whatwedo/php-coding-standard/config/whatwedo-common.php # Common PHP projects

With custom configuration

If you want to add additional checkers or exclude files, you have to create an ecs.php file in your own project root directory.

<?php
declare(strict_types=1);

use Symplify\EasyCodingStandard\Config\ECSConfig;

return static function (ECSConfig $ecsConfig): void {
    /*
    // Remove rules with $ecsConfig->skip()
    $ecsConfig->skip([
        SlevomatCodingStandard\Sniffs\Variables\UnusedVariableSniff::class => null,

        // Explicitly remove some rules in a specific files
        PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer::class => [
            __DIR__ . '/PATH/FILE.php'
        ],
    ]);
    */

    // This need to come last
    $ecsConfig->sets([__DIR__ . '/vendor/whatwedo/php-coding-standard/config/whatwedo-common.php']);
};

Then run the following command:

vendor/bin/ecs check SRC_DIRECTORY

To fix certain issues automatically add --fix add the end

For other configuration options, check out Simplify/EasyCodingStandard.

Dependencies

License

This bundle is under the MIT license. See the complete license in the bundle: LICENSE

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware