diff options
-rw-r--r-- | .phpcs.xml | 12 | ||||
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | composer.json | 4 |
3 files changed, 22 insertions, 2 deletions
diff --git a/.phpcs.xml b/.phpcs.xml new file mode 100644 index 00000000..d1457875 --- /dev/null +++ b/.phpcs.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<ruleset> + <description>Engelsystem PHP coding standard</description> + + <file>config</file> + <file>db</file> + <file>public/index.php</file> + <file>src</file> + <file>tests</file> + + <rule ref="PSR12" /> +</ruleset> @@ -197,8 +197,12 @@ For more information on how to use it call `./bin/migrate help` We use gettext. You may use POEdit to extract new texts from the sourcecode. Please config POEdit to extract also the twig template files using the following settings: https://gist.github.com/jlambe/a868d9b63d70902a12254ce47069d0e6 ### Code style -Please ensure that your pull requests follows the [PSR-12](http://www.php-fig.org/psr/psr-12/) coding style guide. +Please ensure that your pull requests follow the [PSR-12](https://www.php-fig.org/psr/psr-12/) coding style guide. You can check that by running ```php -vendor/bin/phpcs --standard=PSR12 config/ db/ public/index.php src/ tests/ +composer run phpcs +``` +You may auto fix reported issues by running +```php +composer run phpcbf ``` diff --git a/composer.json b/composer.json index 2f20655f..d76abe94 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,10 @@ "email": "igor.scheller@igorshp.de" } ], + "scripts": { + "phpcs": "phpcs -p", + "phpcbf": "phpcbf -p" + }, "require": { "php": ">=7.1.0", "ext-json": "*", |