Install coding standard from Slevomat
MODIFY
composer.json
composer.json
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "^9.0",
- "squizlabs/php_codesniffer": "^3.5"
+ "slevomat/coding-standard": "^7.0",
+ "squizlabs/php_codesniffer": "^3.6"
},
"autoload": {
"psr-4": {

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": "d58c33aa1359b90a8e0d3222a459bcc6",
+ "content-hash": "5b4617b7547aef9c40473bcc84a63d83",
"packages": [
{
"name": "asm89/stack-cors",
}
],
"packages-dev": [
+ {
+ "name": "dealerdirect/phpcodesniffer-composer-installer",
+ "version": "v0.7.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
+ "reference": "fe390591e0241955f22eb9ba327d137e501c771c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c",
+ "reference": "fe390591e0241955f22eb9ba327d137e501c771c",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.0 || ^2.0",
+ "php": ">=5.3",
+ "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0"
+ },
+ "require-dev": {
+ "composer/composer": "*",
+ "phpcompatibility/php-compatibility": "^9.0",
+ "sensiolabs/security-checker": "^4.1.0"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
+ },
+ "autoload": {
+ "psr-4": {
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Franck Nijhof",
+ "email": "franck.nijhof@dealerdirect.com",
+ "homepage": "http://www.frenck.nl",
+ "role": "Developer / IT Manager"
+ }
+ ],
+ "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
+ "homepage": "http://www.dealerdirect.com",
+ "keywords": [
+ "PHPCodeSniffer",
+ "PHP_CodeSniffer",
+ "code quality",
+ "codesniffer",
+ "composer",
+ "installer",
+ "phpcs",
+ "plugin",
+ "qa",
+ "quality",
+ "standard",
+ "standards",
+ "style guide",
+ "stylecheck",
+ "tests"
+ ],
+ "time": "2020-12-07T18:04:37+00:00"
+ },
{
"name": "doctrine/instantiator",
"version": "1.4.0",
],
"time": "2020-12-19T10:15:11+00:00"
},
+ {
+ "name": "phpstan/phpdoc-parser",
+ "version": "0.5.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpdoc-parser.git",
+ "reference": "e352d065af1ae9b41c12d1dfd309e90f7b1f55c9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/e352d065af1ae9b41c12d1dfd309e90f7b1f55c9",
+ "reference": "e352d065af1ae9b41c12d1dfd309e90f7b1f55c9",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "phing/phing": "^2.16.3",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/extension-installer": "^1.0",
+ "phpstan/phpstan": "^0.12.60",
+ "phpstan/phpstan-strict-rules": "^0.12.5",
+ "phpunit/phpunit": "^7.5.20",
+ "symfony/process": "^5.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\PhpDocParser\\": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPDoc parser with support for nullable, intersection and generic types",
+ "time": "2021-04-03T14:46:19+00:00"
+ },
{
"name": "phpunit/php-code-coverage",
"version": "9.2.5",
],
"time": "2020-09-28T06:39:44+00:00"
},
+ {
+ "name": "slevomat/coding-standard",
+ "version": "7.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/slevomat/coding-standard.git",
+ "reference": "08580348e8bb68a36c8753d3db6ba816089129e6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/08580348e8bb68a36c8753d3db6ba816089129e6",
+ "reference": "08580348e8bb68a36c8753d3db6ba816089129e6",
+ "shasum": ""
+ },
+ "require": {
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7",
+ "php": "^7.1 || ^8.0",
+ "phpstan/phpdoc-parser": "0.5.1 - 0.5.4",
+ "squizlabs/php_codesniffer": "^3.6.0"
+ },
+ "require-dev": {
+ "phing/phing": "2.16.4",
+ "php-parallel-lint/php-parallel-lint": "1.3.0",
+ "phpstan/phpstan": "0.12.83",
+ "phpstan/phpstan-deprecation-rules": "0.12.6",
+ "phpstan/phpstan-phpunit": "0.12.18",
+ "phpstan/phpstan-strict-rules": "0.12.9",
+ "phpunit/phpunit": "7.5.20|8.5.5|9.5.4"
+ },
+ "type": "phpcodesniffer-standard",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "6.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "SlevomatCodingStandard\\": "SlevomatCodingStandard"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.",
+ "funding": [
+ {
+ "url": "https://github.com/kukulich",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-04-09T12:43:58+00:00"
+ },
{
"name": "squizlabs/php_codesniffer",
- "version": "3.5.8",
+ "version": "3.6.0",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "9d583721a7157ee997f235f327de038e7ea6dac4"
+ "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4",
- "reference": "9d583721a7157ee997f235f327de038e7ea6dac4",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
+ "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
"shasum": ""
},
"require": {
"phpcs",
"standards"
],
- "time": "2020-10-23T02:01:07+00:00"
+ "time": "2021-04-09T00:54:41+00:00"
},
{
"name": "theseer/tokenizer",

MODIFY
phpcs.xml
phpcs.xml
<file>./tests</file>
<rule ref="PSR12" />
+
+ <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses" />
</ruleset>

Install coding standard from Slevomat