Skip to content

Commit 95728ed

Browse files
authored
Merge pull request #228 from phpcr/cs-fixer
apply latest php-cs-fixer rules
2 parents e24912e + ad13022 commit 95728ed

File tree

15 files changed

+33
-105
lines changed

15 files changed

+33
-105
lines changed

.github/workflows/test-application.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
test:
1313
name: "PHP ${{ matrix.php-version }} ${{ matrix.dependencies }} ${{ matrix.dev-dependencies && 'dev' }}"
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-latest
1515

1616
strategy:
1717
fail-fast: false
@@ -22,7 +22,8 @@ jobs:
2222
- php-version: '8.1'
2323
- php-version: '8.2'
2424
- php-version: '8.3'
25-
- php-version: '8.3'
25+
- php-version: '8.4'
26+
- php-version: '8.5'
2627

2728
steps:
2829
- name: Checkout project

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
},
3434
"require-dev": {
3535
"ramsey/uuid": "^3.5",
36-
"phpunit/phpunit": "^7.5 || ^8.0 || ^9.0",
37-
"phpstan/phpstan": "^1.9",
36+
"phpunit/phpunit": "^9.0",
37+
"phpstan/phpstan": "^2.1",
3838
"friendsofphp/php-cs-fixer": "^3.40"
3939
},
4040
"suggest": {

phpstan.neon.dist

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,3 @@ parameters:
99
message: "#^Empty array passed to foreach\\.$#"
1010
count: 5
1111
path: src/PHPCR/Util/Console/Helper/PhpcrHelper.php
12-
# only formulated in phpdoc that the return value must be countable
13-
-
14-
message: "#expects array|Countable, Iterator<mixed, PHPCR\\Query\\RowInterface> given\\.$#"
15-
count: 1
16-
path: src/PHPCR/Util/Console/Command/NodesUpdateCommand.php

phpstan.tests.neon.dist

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,3 @@ parameters:
66
excludePaths:
77
analyse:
88
- tests/*/Fixtures/*
9-
10-
ignoreErrors:
11-
# too pedantic for tests
12-
-
13-
message: "#^Parameter \\#1 \\.\\.\\.\\$arrays of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#"
14-
count: 1
15-
path: tests/PHPCR/Tests/Util/CND/Reader/FileReaderTest.php
16-
17-
-
18-
message: "#^Parameter \\#3 \\.\\.\\.\\$arrays of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#"
19-
count: 1
20-
path: tests/PHPCR/Tests/Util/CND/Reader/FileReaderTest.php

src/PHPCR/Util/CND/Parser/AbstractParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected function checkToken(int $type, ?string $data = null, bool $ignoreCase
4444
}
4545

4646
if ($data && $token->getData() !== $data) {
47-
if ($ignoreCase && is_string($data) && is_string($token->getData())) {
47+
if ($ignoreCase) {
4848
return 0 !== strcasecmp($data, $token->getData());
4949
}
5050

src/PHPCR/Util/CND/Parser/CndParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ private function parseChildNodeDef(NodeTypeTemplateInterface $nodeType): void
595595
*/
596596
private function parseChildNodeAttributes(
597597
NodeTypeTemplateInterface $parentType,
598-
NodeDefinitionTemplateInterface $childType
598+
NodeDefinitionTemplateInterface $childType,
599599
): void {
600600
while (true) {
601601
if ($this->checkTokenIn(Token::TK_IDENTIFIER, $this->PRIMARY)) {

src/PHPCR/Util/CND/Scanner/Token.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __construct(
2222
*/
2323
private string $data = '',
2424
private int $line = 0,
25-
private int $row = 0
25+
private int $row = 0,
2626
) {
2727
}
2828

src/PHPCR/Util/CND/Writer/CndWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class CndWriter
3333
private array $namespaces = [];
3434

3535
public function __construct(
36-
private NamespaceRegistryInterface $ns
36+
private NamespaceRegistryInterface $ns,
3737
) {
3838
}
3939

src/PHPCR/Util/Console/Helper/TreeDumper/ConsoleDumperItemVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class ConsoleDumperItemVisitor implements ItemVisitorInterface
2020
protected int $level = 0;
2121

2222
public function __construct(
23-
protected OutputInterface $output
23+
protected OutputInterface $output,
2424
) {
2525
}
2626

src/PHPCR/Util/QOM/QueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class QueryBuilder
6868
private array $params = [];
6969

7070
public function __construct(
71-
private QueryObjectModelFactoryInterface $qomFactory
71+
private QueryObjectModelFactoryInterface $qomFactory,
7272
) {
7373
}
7474

0 commit comments

Comments
 (0)