Skip to content

Commit

Permalink
Merge pull request #127 from basz/adds-php-cs-fixer
Browse files Browse the repository at this point in the history
Add php-cs-fixer to the default set of tools, when configuration for it is detected
  • Loading branch information
Ocramius committed Sep 5, 2022
2 parents 84fdcac + 1459227 commit 11412b3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ export default function createTools(config: Config): Array<Tool> {
command : './vendor/bin/codecept run',
filesToCheck : [ 'codeception.yml.dist', 'codeception.yml' ],
toolType : ToolType.CODE_CHECK,
},
{
executionType : ToolExecutionType.STATIC,
name : 'PHP CS Fixer',
command : './vendor/bin/php-cs-fixer fix -v --diff --dry-run',
filesToCheck : [ '.php-cs-fixer.php' ],
toolType : ToolType.CODE_CHECK,
}
]
// Remove all tools which do not need to run
Expand Down
3 changes: 3 additions & 0 deletions tests/code-check-phpcsfixer-php/.laminas-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"stablePHP": "7.4"
}
1 change: 1 addition & 0 deletions tests/code-check-phpcsfixer-php/.php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
10 changes: 10 additions & 0 deletions tests/code-check-phpcsfixer-php/matrix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"include": [
{
"name": "PHP CS Fixer [7.4, latest]",
"job": "{\"command\":\"./vendor/bin/php-cs-fixer fix -v --diff --dry-run\",\"php\":\"7.4\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[]}",
"operatingSystem": "ubuntu-latest",
"action": "laminas/laminas-continuous-integration-action@v1"
}
]
}

0 comments on commit 11412b3

Please sign in to comment.