Skip to content

appocular/coding-standard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Appocular Coding Standard

This is the PHP coding standard used by Appocular, based on PSR12 and Slevomat Coding Standard.

It incorporates PSR12 unmodified, and most of Slevomat, disabling Slevomat rules where they conflict with PSR12. Some other Slevomat rules have been disabled, see the changelog or the ruleset.xml for details.

Installation

composer require --dev appocular/coding-standard

Configuration

Example .phpcs.xml:

<?xml version="1.0"?>
<ruleset>
    <file>./app</file>
    <file>./bootstrap</file>
    <file>./database</file>
    <file>./routes</file>
    <file>./tests</file>
    <rule ref="AppocularCodingStandard"/>
    <rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
      <properties>
        <!-- Tell Slevomat the root directories of our namespaces, so
             it can check if the filepath is correct. -->
      <property name="rootNamespaces" type="array">
        <element key="app" value="Appocular\Assessor"/>
        <element key="tests" value="Appocular\Assessor"/>
      </property>
      </properties>
    </rule>
</ruleset>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •