A set of coding style used by Adriano Rosa.
The default styles is located within the file .editorconfig
that should be copied into the project root.
Usage with VSCode
Download and install this Plugin:
https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig
.prettierrc
{
"endOfLine": "lf",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 80
}
First install CodeSniffer globally using composer:
composer global require "squizlabs/php_codesniffer=*"
Note: composer should be within your $PATH.
Check the version of installed script:
phpcs --version
phpcbf --version
Place the phpcs.xml
within the project root directory.
To check a possible code style issue:
phpcs
To fix a possible code style issue:
phpcbf
Adriano Rosa (https://adrianorosa.com)
Copyright © 2021, Adriano Rosa [email protected] All rights reserved.
For the full copyright and license information, please view the LICENSE file that was distributed within the source root of this project.