diff --git a/PHP-Code-Sniffer-plugin.md b/PHP-Code-Sniffer-plugin.md index b976a65..7dfe081 100644 --- a/PHP-Code-Sniffer-plugin.md +++ b/PHP-Code-Sniffer-plugin.md @@ -1,19 +1,19 @@ Runs PHP Code Sniffer against your build. -### Configuration Options: - -* **allowed_warnings** - Optional - The warning limit for a successful build. -* **allowed_errors** - Optional - The error limit for a successful build. -* **suffixes** - Optional - An array of file extensions to check. -* **standard** - Optional - The standard against which your files should be checked (defaults to PSR2.) -* **tab_width** - Optional - Your chosen tab width. -* **encoding** - Optional - The file encoding you wish to check for. -* **path** - Optional - Path in which to run PHP Code Sniffer. -* **ignore** - Optional - A list of files / paths to ignore, defaults to the build_settings ignore list. +## Configuration +### Options +* **allowed_warnings** [int, optional] - The warning limit for a successful build. +* **allowed_errors** [int, optional] - The error limit for a successful build. +* **suffixes** [array, optional] - An array of file extensions to check. +* **standard** [string, optional] - The standard against which your files should be checked (defaults to PSR2.) +* **tab_width** [int, optional] - Your chosen tab width. +* **encoding** [string, optional] - The file encoding you wish to check for. +* **path** [string, optional] - Path in which to run PHP Code Sniffer. +* **ignore** [array, optional] - A list of files / paths to ignore, defaults to the build_settings ignore list. ### Example Simple example where PHPCS will run on app directory, but ignore the views folder, and use PSR-1 and PSR-2 rules for validation: -``` +```yml test: php_code_sniffer: path: "app" @@ -23,7 +23,7 @@ test: ``` For use with an existing project: -``` +```yml test: php_code_sniffer: standard: "/phpcs.xml" # The leading slash is needed to trigger an external ruleset.