Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use davidlienhard/coding-standard #31

Merged
merged 1 commit into from
Apr 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@
"issues": "https://github.com/davidlienhard/log/issues/",
"email": "david.lienhard@tourasia.ch"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.tourbase.ch"
}
],
"require": {
"php": "^8.0"
},
"require-dev": {
"phpunit/phpunit": "^9",
"squizlabs/php_codesniffer": "^3",
"phpstan/phpstan": "^0"
"phpstan/phpstan": "^0",
"davidlienhard/coding-standard": "^0"
},
"autoload": {
"classmap": [
Expand Down
227 changes: 226 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 1 addition & 41 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,11 @@
<description>tourBase coding standard</description>

<!-- inherit rules -->
<rule ref="PSR2" />

<!-- force use of short array syntax ([ ])-->
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found">
<type>error</type>
</rule>

<!-- check whitespaces before and after operators -->
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
<properties>
<property name="ignoreNewlines" value="true" />
</properties>
<type>error</type>
</rule>

<!-- disallow and & or, force && and || -->
<rule ref="Squiz.Operators.ValidLogicalOperators">
<type>error</type>
</rule>

<!-- require strict types to be set -->
<rule ref="Generic.PHP.RequireStrictTypes">
<type>error</type>
</rule>

<!-- extend line limit to 180 -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="180"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>
<rule ref="DavidLienhard" />

<!-- Paths to check -->
<file>src</file>

<!-- dont display warnings -->
<arg name="warning-severity" value="0"/>

<!-- parse only php files -->
<arg name="extensions" value="php"/>

<!-- show process -->
<arg value="p"/>

<!-- folders / files to exclude -->
<exclude-pattern>vendor/*</exclude-pattern>
</ruleset>
Loading