As for all our application we use a custom set of coding standards. Here is a description and links to documentation to help follow them :
-
PSR-1 for files side-effects and classes declarations
-
PSR-2 for namespaces, uses, classes, properties, methods, elseif, and switch
declarations as well as control structure spacing and end file new line -
PHPCS/Generic for CodeAnalysis/EmptyStatement, CodeAnalysis/ForLoopShouldBeWhileLoop, CodeAnalysis/ForLoopWithTestFunctionCall, CodeAnalysis/JumbledIncrementer, CodeAnalysis/UnconditionalIfStatement, CodeAnalysis/UnnecessaryFinalModifier, CodeAnalysis/UselessOverridingMethod, ControlStructures/InlineControlStructure, Files/ByteOrderMark, Files/LineEndings, Files/LineLength with a hard limit at 120 char, Formatting/DisallowMultipleStatements, Formatting/MultipleStatementAlignment, Formatting/SpaceAfterCast, Functions/CallTimePassByReference, Functions/FunctionCallArgumentSpacing, Functions/OpeningFunctionBraceBsdAllman, NamingConventions/ConstructorName, NamingConventions/UpperCaseConstantName, NamingConventions/CamelCapsFunctionName, PHP/CharacterBeforePHPOpeningTag, PHP/DeprecatedFunctions, PHP/DisallowShortOpenTag, PHP/ForbiddenFunctions, PHP/LowerCaseConstant, PHP/NoSilencedErrors, WhiteSpace/DisallowTabIndent, WhiteSpace/ScopeIndent,
-
PHPCS/Squiz for PHP/DisallowSizeFunctionsInLoops, PHP/Eval, PHP/ForbiddenFunctions with functions exit, var_dump, sizeof, delete, print_r, eval, PHP/GlobalKeyword, PHP/InnerFunctions, PHP/LowercasePHPFunctions, PHP/NonExecutableCode, Scope/MemberVarScope, Scope/MethodScope, Scope/StaticThisUsage, WhiteSpace/CastSpacing, WhiteSpace/LanguageConstructSpacing, WhiteSpace/ScopeKeywordSpacing, WhiteSpace/LogicalOperatorSpacing, WhiteSpace/OperatorSpacing, WhiteSpace/ScopeClosingBrace, WhiteSpace/SuperfluousWhitespace,
Squiz/ArrayDeclarationSniff:NoCommaAfterLast,CommaAfterLast,FirstValueNoNewline