-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed commits ---------------- * fb76eba 2022-06-13 Zombaya Add php-cs-fixer as tool to project. Installed according to best practice in README of php-cs-fixer. * 549ceae 2022-06-14 Zombaya Add pipeline-check for valid codestyle using php-cs-fixer * 11812f2 2022-09-13 Zombaya Update CONTRIBUTING.md and set version of php-cs-fixer fixed to current latest version * 01cb480 2022-09-13 Zombaya Autoformat src and tests to PSR-12 using php-cs-fixer * e5e6e9599 2022-09-13 Zombaya Add release-file
- Loading branch information
Showing
10 changed files
with
2,151 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
{ | ||
"type": "enhancement", | ||
"category": "", | ||
"description": "Add php-cs-fixer as tool to format code and lint code according to PSR-12 during github actions" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in([ | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
]) | ||
->exclude([ | ||
'data' | ||
]) | ||
; | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRules([ | ||
'@PER' => true, | ||
|
||
// By default, visibility is required by PSR-12 for property, method and const. | ||
// PHP >= 7.1 is required for const. | ||
// Since we support PHP >= 5.5, the required visibility for const's is disabled. | ||
// See https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/doc/rules/class_notation/visibility_required.rst | ||
'visibility_required' => [ | ||
'elements' => [ | ||
'property', | ||
'method', | ||
], | ||
] | ||
]) | ||
->setFinder($finder) | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.php-cs-fixer.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"require": { | ||
"friendsofphp/php-cs-fixer": "^3.11.0" | ||
} | ||
} |
Oops, something went wrong.