Skip to content

Commit 3daad6e

Browse files
authored
Merge pull request #3 from rdohms/task/up-to-9
Upgrade to Doctrine Standard 9
2 parents 4c53a5c + fa2fb1a commit 3daad6e

10 files changed

+61
-62
lines changed

.github/workflows/check-cs-checker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
php: [8.x, 7.4]
16+
php: [8.x]
1717

1818
steps:
1919
- name: Checkout code
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ubuntu-latest
3737
strategy:
3838
matrix:
39-
php: [8.x, 7.4]
39+
php: [8.x]
4040

4141
steps:
4242
- name: Checkout code

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"license": "MIT",
66
"require": {
77
"php": "^7.2 || ^8",
8-
"doctrine/coding-standard": "^8"
8+
"doctrine/coding-standard": "^9"
99
}
1010
}

composer.lock

Lines changed: 44 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/expected_report.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ PHP CODE SNIFFER REPORT SUMMARY
33
----------------------------------------------------------------------
44
FILE ERRORS WARNINGS
55
----------------------------------------------------------------------
6-
tests/input/concatenation_spacing.php 56 0
6+
tests/input/concatenation_spacing.php 55 0
77
tests/input/example-class.php 36 0
8-
tests/input/not_spacing.php 8 0
9-
tests/input/return_type_on_closures.php 28 0
10-
tests/input/return_type_on_methods.php 14 0
11-
tests/input/test-case.php 8 0
8+
tests/input/not_spacing.php 7 0
9+
tests/input/return_type_on_closures.php 27 0
10+
tests/input/return_type_on_methods.php 13 0
11+
tests/input/test-case.php 7 0
1212
----------------------------------------------------------------------
13-
A TOTAL OF 150 ERRORS AND 0 WARNINGS WERE FOUND IN 6 FILES
13+
A TOTAL OF 145 ERRORS AND 0 WARNINGS WERE FOUND IN 6 FILES
1414
----------------------------------------------------------------------
15-
PHPCBF CAN FIX 139 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
15+
PHPCBF CAN FIX 134 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
1616
----------------------------------------------------------------------
1717

1818

tests/fixed/concatenation_spacing.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
$string = 'Standards' . 'are awesome';

tests/fixed/example-class.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Example;
@@ -33,10 +34,7 @@ class Example implements IteratorAggregate
3334

3435
private bool $baz;
3536

36-
/**
37-
* @var ControlStructureSniff|int|string|null
38-
*/
39-
private $baxBax;
37+
private ControlStructureSniff|int|string|null $baxBax = null;
4038

4139
public function __construct(?int $foo = null, array $bar = [], bool $baz = false, $baxBax = 'unused')
4240
{

tests/fixed/not_spacing.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
$test = 1;

tests/fixed/return_type_on_closures.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
static function (): void {

tests/fixed/return_type_on_methods.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Blah;

tests/fixed/test-case.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Fancy;

0 commit comments

Comments
 (0)