Skip to content

eve's PHP coding standard for Laravel.

Notifications You must be signed in to change notification settings

Eveio/coding-standard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eve Coding Standard

eve's coding standard for PHP CodeSniffer, built on top of slevomat/coding-standard. Intended to be used for Laravel-based projects.

Installation

Require the package with Composer:

composer require --dev eve/coding-standard

Usage

  1. In your ruleset.xml, add a rule referencing the package's included rule set:

    <?xml version="1.0"?>
    <ruleset name="My Awesome Standards">
        <rule ref="./vendor/eve/coding-standard/ruleset.xml"/>
    
        <!-- add extra configurations if necessary -->
        <file>./app</file>
        <file>./bootstrap</file>
        <file>./config</file>
        <file>./database</file>
        <file>./routes</file>
        <file>./tests</file>
    </ruleset>
  2. Use it!

    # check for violations
    composer phpcs --standard=ruleset.xml
    
    # fix the violations if applicable
    composer phpcbf --standard=ruleset.xml 

License

MIT of course.