Download the PHP package efabrica/coding-standard without Composer
On this page you can find all versions of the php package efabrica/coding-standard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download efabrica/coding-standard
More information about efabrica/coding-standard
Files in efabrica/coding-standard
Download efabrica/coding-standard
More information about efabrica/coding-standard
Files in efabrica/coding-standard
Vendor efabrica
Package coding-standard
Short Description PSR2 based coding standard for PHP PHP_CodeSniffer
License MIT
Package coding-standard
Short Description PSR2 based coding standard for PHP PHP_CodeSniffer
License MIT
Please rate this library. Is it a good library?
Informations about the package coding-standard
eFabrica coding standards
eFabrica coding standards for PHP_CodeSniffer are based on PSR2.
eFabrica coding standard
Is based on PSR2 and adds some rules:
- Allows max. 1 empty line between code lines
- Doesn't allow any whitespace at the end of lines
- Doesn't allow any whitespace between closing parenthesis and return type colon
- Requires exactly one space between type and variable
- Requires exactly one space between return type colon and return type
- Requires exactly one space before and after each operator
- Requires exactly one space before and after . (dot) in string concatenating
- Requires exactly one space after keywords private, protected, public, abstract, final
- Requires exactly one blank line before and one blank line after namespace statement
- Requires max. one namespace per file
- Doesn't allow any blank lines between uses and trait uses
- Requires one line before first use and one line after last use (not applied if it is trait use and it is first / last in class)
- Requires exactly one blank line before and after each function except first and last
- Requires exactly one blank line before and after each member var except first and last
- Requires
new
with parentheses. - Prefer to use single quotes over double quotes. Double quotes are allowed if string contains variable
- Requires trailing comma after the last element of multi-line array
- Requires all names as reference (no fully qualified or partial names - everything is in uses)
- Requires all uses to be used
- Requires alphabetically sorted uses
- Disallows leading backslash for uses
- Disallows snake_case for properties, variables, function names, method names
- Doesn't allow underscore in method names
- Doesn't allow multiple spaces between type and property / variable / parameter
- Class structure is defined as follows: uses, enum cases, constants, properties, constructor, methods
- Requires visibility for all constants
- Requires exactly one blank line between methods
- Doesn't allow any useless comments
Usage
for {dirs} use space-separated list of directories \ for {other-options} see
vendor/bin/phpcs --help
or visit PHP_CodeSniffer documentation
eFabricaStrict coding standard
Is based on eFabrica coding standard and adds some strict rules:
- Use
declare(strict_types=1);
at the top of each PHP file. Use one empty line before and also after declare - Requires each class to be declared either as abstract or as final
Usage
for {dirs} use space-separated list of directories \ for {other-options} see
vendor/bin/phpcs --help
or visit PHP_CodeSniffer documentation
All versions of coding-standard with dependencies
PHP Build Version
Package Version
Requires
slevomat/coding-standard Version
^8.4
The package efabrica/coding-standard contains the following files
Loading the files please wait ....