diff --git a/.gitignore b/.gitignore index 3eed260..fe915ae 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ /vendor/ .php-cs-fixer.php composer.lock +phpcs.xml phpstan.neon diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 8286899..32a7a44 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -1,8 +1,8 @@ + * PHP Basics + * Copyright (C) 2024 Sebastian Meyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -11,11 +11,11 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ declare(strict_types=1); @@ -30,9 +30,5 @@ namespace PhpCsFixer; */ return (new Config()) ->setRiskyAllowed(true) - ->setRules([ - '@PSR12' => true, - ]) - ->setFinder( - (new Finder())->in(__DIR__) - ); + ->setRules(['@PSR12' => true]) + ->setFinder((new Finder())->in(__DIR__)); diff --git a/composer.json b/composer.json index fec3721..5c61f53 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,8 @@ "require-dev": { "phpstan/phpstan": "^1.10.56", "phpstan/phpstan-strict-rules": "^1.5", - "friendsofphp/php-cs-fixer": "^3.48" + "friendsofphp/php-cs-fixer": "^3.48", + "squizlabs/php_codesniffer": "^3.8" }, "autoload": { "psr-4": { diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 0000000..55e97f3 --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,7 @@ + + + Open Culture Consulting strictly follows PSR standards. + ./src + + +