diff --git a/README.md b/README.md index ba212a1..857a258 100644 --- a/README.md +++ b/README.md @@ -113,5 +113,5 @@ composer test-unit **You will need to have [docker](https://www.docker.com/) installed for these.** ```bash -composer test +composer check ``` diff --git a/composer.json b/composer.json index 5ee9c89..22c0785 100644 --- a/composer.json +++ b/composer.json @@ -26,16 +26,19 @@ }, "require-dev": { "phpunit/phpunit": "^9", - "orchestra/testbench": "^6.17" + "orchestra/testbench": "^6.17", + "squizlabs/php_codesniffer": "^3.6" }, "scripts": { "test-unit": "php ./vendor/bin/phpunit tests/Unit", - "test": [ + "check": [ "@docker-up", - "@docker-test" + "@docker-test", + "@docker-cs" ], "docker-up": "docker compose up -d database", - "docker-test": "docker compose run --rm app php ./vendor/bin/phpunit" + "docker-test": "docker compose run --rm app php ./vendor/bin/phpunit", + "docker-cs": "docker compose run --rm app php ./vendor/bin/phpcs --standard=PSR12 src/" }, "extra": { "laravel": { diff --git a/composer.lock b/composer.lock index 59dfa05..c1d44be 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "add04221409f74cc82fe15f261156db1", + "content-hash": "8378f5d6d033ddcf7ab0cacb9047c74c", "packages": [ { "name": "brick/math", @@ -6738,6 +6738,62 @@ ], "time": "2021-04-28T09:47:47+00:00" }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "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" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2021-04-09T00:54:41+00:00" + }, { "name": "symfony/stopwatch", "version": "v5.2.7",