File tree 7 files changed +133
-34
lines changed
7 files changed +133
-34
lines changed Original file line number Diff line number Diff line change
1
+ [* .yml ]
2
+ indent_size = 2
Original file line number Diff line number Diff line change 1
1
name : CI
2
2
3
3
on :
4
- pull_request :
5
- push :
6
- branches : [master]
4
+ pull_request :
5
+ push :
6
+ branches : [ master ]
7
7
8
8
jobs :
9
- cs :
10
- name : ' Code Style'
11
- runs-on : ubuntu-latest
12
-
13
- steps :
14
- - name : Checkout code
15
- uses : actions/checkout@v2
16
-
17
- - name : Setup PHP
18
- uses : shivammathur/setup-php@v2
19
- with :
20
- php-version : 8.1
21
- coverage : none
22
- tools : php-cs-fixer:3.34, cs2pr
23
-
24
- - name : Display PHP-CS-Fixer version
25
- run : php-cs-fixer --version
26
-
27
- - name : PHP-CS-Fixer
28
- run : php-cs-fixer fix --dry-run --format=checkstyle | cs2pr
9
+ cs :
10
+ name : ' Code Style'
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - name : Checkout code
15
+ uses : actions/checkout@v2
16
+
17
+ - name : Setup PHP
18
+ uses : shivammathur/setup-php@v2
19
+ with :
20
+ php-version : 8.2
21
+ coverage : none
22
+ tools : php-cs-fixer:3.34, cs2pr
23
+
24
+ - name : Display PHP-CS-Fixer version
25
+ run : php-cs-fixer --version
26
+
27
+ - name : PHP-CS-Fixer
28
+ run : php-cs-fixer fix --dry-run --format=checkstyle | cs2pr
29
+
30
+ phpstan :
31
+ name : PHPStan
32
+ runs-on : ubuntu-latest
33
+
34
+ steps :
35
+ - name : Checkout code
36
+ uses : actions/checkout@v3
37
+
38
+ - name : Setup PHP
39
+ uses : shivammathur/setup-php@v2
40
+ with :
41
+ php-version : 8.2
42
+ coverage : none
43
+ tools : phpstan:1.10, cs2pr
44
+
45
+ - name : Download dependencies
46
+ uses : ramsey/composer-install@v2
47
+
48
+ - name : PHPStan
49
+ run : phpstan analyze --no-progress --error-format=checkstyle | cs2pr
50
+
51
+ psalm :
52
+ name : Psalm
53
+ runs-on : ubuntu-latest
54
+ steps :
55
+ - name : Checkout code
56
+ uses : actions/checkout@v3
57
+
58
+ - name : Setup PHP
59
+ uses : shivammathur/setup-php@v2
60
+ with :
61
+ php-version : 8.2
62
+ coverage : none
63
+ tools : vimeo/psalm:5.15
64
+
65
+ - name : Download dependencies
66
+ uses : ramsey/composer-install@v2
67
+
68
+ - name : Psalm
69
+ run : psalm --no-progress --output-format=github
Original file line number Diff line number Diff line change
1
+ parameters :
2
+ ignoreErrors : []
Original file line number Diff line number Diff line change
1
+ includes:
2
+ - ./phpstan-baseline.neon
3
+
4
+ parameters:
5
+ level: 5
6
+ reportUnmatchedIgnoredErrors: false
7
+ paths:
8
+ - src
9
+
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <files psalm-version =" 5.15.0@5c774aca4746caf3d239d9c8cadb9f882ca29352" >
3
+ <file src =" src/Command/TranslationStatsCommand.php" >
4
+ <UnusedVariable >
5
+ <code >$source</code >
6
+ <code >$source</code >
7
+ </UnusedVariable >
8
+ </file >
9
+ <file src =" src/Service/DataProvider.php" >
10
+ <UnusedForeachValue >
11
+ <code >$rows</code >
12
+ </UnusedForeachValue >
13
+ <UnusedVariable >
14
+ <code >$language</code >
15
+ </UnusedVariable >
16
+ </file >
17
+ </files >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <psalm
3
+ errorLevel =" 7"
4
+ resolveFromConfigFile =" true"
5
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
6
+ xmlns =" https://getpsalm.org/schema/config"
7
+ xsi : schemaLocation =" https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8
+ findUnusedBaselineEntry =" true"
9
+ findUnusedCode =" true"
10
+ errorBaseline =" psalm.baseline.xml"
11
+ >
12
+ <projectFiles >
13
+ <directory name =" src" />
14
+ <ignoreFiles >
15
+ <directory name =" vendor" />
16
+ </ignoreFiles >
17
+ </projectFiles >
18
+ <issueHandlers >
19
+ <PossiblyUnusedMethod >
20
+ <errorLevel type =" suppress" >
21
+ <directory name =" src" />
22
+ </errorLevel >
23
+ </PossiblyUnusedMethod >
24
+ <UnusedClass >
25
+ <errorLevel type =" suppress" >
26
+ <directory name =" src" />
27
+ </errorLevel >
28
+ </UnusedClass >
29
+ </issueHandlers >
30
+ </psalm >
Original file line number Diff line number Diff line change 4
4
5
5
namespace App \Model ;
6
6
7
+ /**
8
+ * @implements \Iterator<int, GithubIssue>
9
+ */
7
10
class ComponentCollection implements \Countable, \Iterator
8
11
{
9
12
private ?GithubIssue $ issue ;
@@ -44,37 +47,32 @@ public function getLanguage(): string
44
47
return $ this ->language ;
45
48
}
46
49
47
- public function current ()
50
+ public function current (): GithubIssue
48
51
{
49
52
return $ this ->data [$ this ->cursor ];
50
53
}
51
54
52
- public function next ()
55
+ public function next (): void
53
56
{
54
57
++$ this ->cursor ;
55
- if ($ this ->valid ()) {
56
- return $ this ->data [$ this ->cursor ];
57
- }
58
-
59
- return false ;
60
58
}
61
59
62
- public function key ()
60
+ public function key (): int
63
61
{
64
62
return $ this ->cursor ;
65
63
}
66
64
67
- public function valid ()
65
+ public function valid (): bool
68
66
{
69
67
return isset ($ this ->data [$ this ->cursor ]);
70
68
}
71
69
72
- public function rewind ()
70
+ public function rewind (): void
73
71
{
74
72
$ this ->cursor = 0 ;
75
73
}
76
74
77
- public function count ()
75
+ public function count (): int
78
76
{
79
77
return count ($ this ->data );
80
78
}
You can’t perform that action at this time.
0 commit comments