Add PHP_CodeSniffer tooling
This commit is contained in:
parent
f832b58a3e
commit
9832946b35
|
@ -2,4 +2,5 @@
|
||||||
/vendor/
|
/vendor/
|
||||||
.php-cs-fixer.php
|
.php-cs-fixer.php
|
||||||
composer.lock
|
composer.lock
|
||||||
|
phpcs.xml
|
||||||
phpstan.neon
|
phpstan.neon
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Useful PHP Basics
|
* PHP Basics
|
||||||
* Copyright (C) 2023 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
|
* Copyright (C) 2024 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -30,9 +30,5 @@ namespace PhpCsFixer;
|
||||||
*/
|
*/
|
||||||
return (new Config())
|
return (new Config())
|
||||||
->setRiskyAllowed(true)
|
->setRiskyAllowed(true)
|
||||||
->setRules([
|
->setRules(['@PSR12' => true])
|
||||||
'@PSR12' => true,
|
->setFinder((new Finder())->in(__DIR__));
|
||||||
])
|
|
||||||
->setFinder(
|
|
||||||
(new Finder())->in(__DIR__)
|
|
||||||
);
|
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpstan/phpstan": "^1.10.56",
|
"phpstan/phpstan": "^1.10.56",
|
||||||
"phpstan/phpstan-strict-rules": "^1.5",
|
"phpstan/phpstan-strict-rules": "^1.5",
|
||||||
"friendsofphp/php-cs-fixer": "^3.48"
|
"friendsofphp/php-cs-fixer": "^3.48",
|
||||||
|
"squizlabs/php_codesniffer": "^3.8"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"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