Add PHP_CodeSniffer tooling
This commit is contained in:
parent
f832b58a3e
commit
9832946b35
|
@ -2,4 +2,5 @@
|
|||
/vendor/
|
||||
.php-cs-fixer.php
|
||||
composer.lock
|
||||
phpcs.xml
|
||||
phpstan.neon
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Useful PHP Basics
|
||||
* Copyright (C) 2023 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
|
||||
* PHP Basics
|
||||
* Copyright (C) 2024 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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__));
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset name="OCC Standard Ruleset">
|
||||
<description>Open Culture Consulting strictly follows PSR standards.</description>
|
||||
<file>./src</file>
|
||||
<arg name="extensions" value="php"/>
|
||||
<rule ref="PSR12"/>
|
||||
</ruleset>
|
Loading…
Reference in New Issue