Add phive tools folder, Switch to tabs for indent and add phpcs.xml
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,3 +3,5 @@ vendor
|
||||
composer.lock
|
||||
**/.env
|
||||
**/.target
|
||||
.phpunit.cache/
|
||||
tools/
|
||||
|
||||
8
.phive/phars.xml
Normal file
8
.phive/phars.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phive xmlns="https://phar.io/phive">
|
||||
<phar name="phpcs" version="^4.0.1" installed="4.0.1" location="./tools/phpcs" copy="false"/>
|
||||
<phar name="phpcbf" version="^4.0.1" installed="4.0.1" location="./tools/phpcbf" copy="false"/>
|
||||
<phar name="phan" version="^5.5.2" installed="5.5.2" location="./tools/phan" copy="false"/>
|
||||
<phar name="phpstan" version="^2.1.33" installed="2.1.33" location="./tools/phpstan" copy="false"/>
|
||||
<phar name="phpunit" version="^12.5.4" installed="12.5.4" location="./tools/phpunit" copy="false"/>
|
||||
</phive>
|
||||
@@ -152,3 +152,19 @@ New entries can be written with
|
||||
|
||||
On sucessful run the log data is accessable with `$aws->getLog()`
|
||||
On exception the log data is in the error message json (see exceptions)
|
||||
|
||||
## Development
|
||||
|
||||
### Phan
|
||||
|
||||
`vendor/bin/phan --analyze-twice`
|
||||
|
||||
### PHPstan
|
||||
|
||||
`vendor/bin/phpstan`
|
||||
|
||||
### PHPUnit
|
||||
|
||||
Unit tests have to be run from base folder with
|
||||
|
||||
`vendor/bin/phpunit test/phpUnitTests/`
|
||||
18
phpcs.xml
Normal file
18
phpcs.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="MyStandard">
|
||||
<description>PSR12 override rules (strict, standard). Switch spaces indent to tab.</description>
|
||||
<arg name="tab-width" value="4"/>
|
||||
<rule ref="PSR1"/>
|
||||
<rule ref="PSR12">
|
||||
<!-- turn off white space check for tab -->
|
||||
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
|
||||
</rule>
|
||||
<!-- no space indent, must be tab, 4 is tab iwdth -->
|
||||
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
|
||||
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
||||
<properties>
|
||||
<property name="indent" value="4"/>
|
||||
<property name="tabIndent" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
</ruleset>
|
||||
Reference in New Issue
Block a user