Run PHPCS in pipeline
MODIFY
.travis.yml
.travis.yml
@@ -13,5 +13,11 @@ before_script:
- php artisan key:generate
- php artisan migrate --database=testing
-script:
- - vendor/bin/phpunit
+jobs:
+ include:
+ - stage: test
+ name: "PHPUnit"
+ script: vendor/bin/phpunit
+ - stage: test
+ name: "PHPCS"
+ script: vendor/bin/phpcs

MODIFY
composer.json
composer.json
"fzaninotto/faker": "~1.4",
"laravel/dusk": "^5.11",
"mockery/mockery": "0.9.*",
- "phpunit/phpunit": "^8.5"
+ "phpunit/phpunit": "^8.5",
+ "squizlabs/php_codesniffer": "^3.5"
},
"autoload": {
"classmap": [

MODIFY
composer.lock
composer.lock
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "49c86ef203605f5284ca40603b16433e",
+ "content-hash": "dce85ba80a00286fbf031229a07b1647",
"packages": [
{
"name": "asm89/stack-cors",
"homepage": "https://github.com/sebastianbergmann/version",
"time": "2016-10-03T07:35:21+00:00"
},
+ {
+ "name": "squizlabs/php_codesniffer",
+ "version": "3.5.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
+ "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/73e2e7f57d958e7228fce50dc0c61f58f017f9f6",
+ "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6",
+ "shasum": ""
+ },
+ "require": {
+ "ext-simplexml": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlwriter": "*",
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
+ },
+ "bin": [
+ "bin/phpcs",
+ "bin/phpcbf"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.x-dev"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Greg Sherwood",
+ "role": "lead"
+ }
+ ],
+ "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
+ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
+ "keywords": [
+ "phpcs",
+ "standards"
+ ],
+ "time": "2020-04-17T01:09:41+00:00"
+ },
{
"name": "theseer/tokenizer",
"version": "1.1.3",

ADD
phpcs.xml
+<?xml version="1.0"?>
+<ruleset name="Budget">
+ <file>./app</file>
+ <file>./config</file>
+
+ <rule ref="Generic.Arrays.DisallowLongArraySyntax" />
+</ruleset>

Run PHPCS in pipeline