Skip to content

Commit

Permalink
[TASK] Update GitHub CI workflow for correct php-cs-fixer version, co…
Browse files Browse the repository at this point in the history
…de style fixes
  • Loading branch information
davkraid committed Aug 11, 2023
1 parent c968d41 commit d6ae2fb
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: php-cs-fixer
tools: php-cs-fixer:3.14.1
- name: Check PHP CS
run: php-cs-fixer fix --config php-cs-fixer.php --dry-run --using-cache no --show-progress dots -vvv

Expand Down
2 changes: 1 addition & 1 deletion Classes/Command/UpdateIpDatabaseCommand.php
Expand Up @@ -124,7 +124,7 @@ private function loadCsv(): array
$data[] = [
'ip_from' => $row[0],
'ip_to' => $row[1],
'country_code' => $row[2]
'country_code' => $row[2],
];
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/FrontendTest.php
Expand Up @@ -21,7 +21,7 @@
class FrontendTest extends FunctionalTestCase
{
protected array $testExtensionsToLoad = [
'typo3conf/ext/locate'
'typo3conf/ext/locate',
];

protected function setUp(): void
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/Store/Session/SessionStoreTest.php
Expand Up @@ -22,7 +22,7 @@ class SessionStoreTest extends FunctionalTestCase
protected $subject;

protected array $testExtensionsToLoad = [
'typo3conf/ext/locate'
'typo3conf/ext/locate',
];

protected function setUp(): void
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Utility/LocateUtilityTest.php
Expand Up @@ -22,7 +22,7 @@ class LocateUtilityTest extends FunctionalTestCase
protected $subject;

protected array $testExtensionsToLoad = [
'typo3conf/ext/locate'
'typo3conf/ext/locate',
];

protected function setUp(): void
Expand Down Expand Up @@ -57,7 +57,7 @@ public function transformValuesTest()
'de-DE',
'de_DE',
'de_de',
'de-de'
'de-de',
];

foreach ($values as $value) {
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Expand Up @@ -37,7 +37,8 @@
},
"require-dev": {
"phpunit/phpunit": "^9.6",
"typo3/testing-framework": "^7.0"
"typo3/testing-framework": "^7.0",
"friendsofphp/php-cs-fixer": "v3.14.1"
},
"suggest": {
"jaybizzle/crawler-detect": "If you do not want to redirect bots.",
Expand Down Expand Up @@ -72,7 +73,8 @@
"TYPO3\\TestingFramework\\Composer\\ExtensionTestEnvironment::prepare",
"mkdir -p .Build/web/typo3conf/ext/",
"[ -L .Build/web/typo3conf/ext/locate ] || ln -snvf ../../../../. .Build/web/typo3conf/ext/locate"
]
],
"cs-fix": ".Build/bin/php-cs-fixer fix --config php-cs-fixer.php --using-cache no --show-progress dots -v"
},
"extra": {
"typo3/cms": {
Expand Down
3 changes: 2 additions & 1 deletion php-cs-fixer.php
Expand Up @@ -62,7 +62,7 @@
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_superfluous_elseif' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_comma_in_singleline' => true,
'no_unneeded_control_parentheses' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
Expand All @@ -82,6 +82,7 @@
'single_quote' => true,
'single_line_comment_style' => ['comment_types' => ['hash']],
'single_trait_insert_per_statement' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
'whitespace_after_comma_in_array' => true,
])
->setFinder($finder);

0 comments on commit d6ae2fb

Please sign in to comment.