File tree 6 files changed +30
-64
lines changed
6 files changed +30
-64
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,6 @@ indent_style = tab
11
11
indent_size = tab
12
12
tab_width = 4
13
13
14
- [{* .json, * .yaml, * .yml, * .md} ]
14
+ [{* .json,* .yaml,* .yml,* .md} ]
15
15
indent_style = space
16
16
indent_size = 2
Original file line number Diff line number Diff line change @@ -7,6 +7,5 @@ tests export-ignore
7
7
.travis.yml export-ignore
8
8
Makefile export-ignore
9
9
phpstan.neon export-ignore
10
- phpstan.php export-ignore
11
10
README.md export-ignore
12
11
ruleset.xml export-ignore
Original file line number Diff line number Diff line change 6
6
/composer.lock
7
7
8
8
# Tests
9
- /temp
10
9
/coverage.xml
Original file line number Diff line number Diff line change 1
- .PHONY : install qa cs csf phpstan tests coverage
2
-
1
+ .PHONY : install
3
2
install :
4
3
composer update
5
4
5
+ .PHONY : qa
6
6
qa : phpstan cs
7
7
8
+ .PHONY : cs
8
9
cs :
9
10
ifdef GITHUB_ACTION
10
- vendor/bin/codesniffer -q --report=checkstyle src tests | cs2pr
11
+ vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp -q --report=checkstyle src tests | cs2pr
11
12
else
12
- vendor/bin/codesniffer src tests
13
+ vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests
13
14
endif
14
15
16
+ .PHONY : csf
15
17
csf :
16
- vendor/bin/codefixer src tests
18
+ vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --extensions= " php,phpt " --colors -nsp src tests
17
19
20
+ .PHONY : phpstan
18
21
phpstan :
19
22
vendor/bin/phpstan analyse -c phpstan.neon
20
23
24
+ .PHONY : tests
21
25
tests :
22
26
vendor/bin/tester -s -p php --colors 1 -C tests/Cases
23
27
28
+ .PHONY : coverage
24
29
coverage :
25
30
ifdef GITHUB_ACTION
26
31
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases
27
32
else
28
33
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.html --coverage-src src tests/Cases
29
34
endif
30
-
31
- # Docker
32
- .PHONY : redis-start redis-stop
33
-
34
- redis-start : redis-stop
35
- docker run -it -d -p 6379:6379 --name contributte-redis redis:5-alpine
36
-
37
- redis-stop :
38
- docker stop contributte-redis || true
39
- docker rm contributte-redis || true
Original file line number Diff line number Diff line change 1
1
includes :
2
- - vendor/phpstan/phpstan-deprecation-rules/rules.neon
3
- - vendor/phpstan/phpstan-nette/extension.neon
4
- - vendor/phpstan/phpstan-nette/rules.neon
2
+ - vendor/contributte/phpstan/phpstan.neon
3
+ - phpstan-baseline.neon
5
4
6
5
parameters :
7
- level : 8
6
+ level : 9
7
+ phpVersion : 80200
8
+
9
+ scanDirectories :
10
+ - src
11
+
12
+ fileExtensions :
13
+ - php
14
+ - phpt
8
15
9
16
paths :
10
17
- src
18
+ - .docs
11
19
12
20
excludePaths :
13
21
- src/DI/RedisExtension24.php
14
22
15
23
ignoreErrors :
16
- - " #^Do\\-while loop condition is always false\\.$ #"
17
-
18
- # backward compatibility with nette/caching < 3.1
19
- -
20
- message : """
21
- #^Class Contributte\\\\Redis\\\\Caching\\\\RedisJournal implements deprecated interface Nette\\\\Caching\\\\Storages\\\\IJournal\\:
22
- use Nette\\\\Caching\\\\Storages\\\\Journal$#
23
- """
24
- count : 1
25
- path : src/Caching/RedisJournal.php
26
-
27
- -
28
- message : """
29
- #^Class Contributte\\\\Redis\\\\Caching\\\\RedisStorage implements deprecated interface Nette\\\\Caching\\\\IStorage\\:
30
- use Nette\\\\Caching\\\\Storage$#
31
- """
32
- count : 1
33
- path : src/Caching/RedisStorage.php
34
-
35
- -
36
- message : """
37
- #^Parameter \\$journal of method Contributte\\\\Redis\\\\Caching\\\\RedisStorage\\:\\:__construct\\(\\) has typehint with deprecated interface Nette\\\\Caching\\\\Storages\\\\IJournal\\:
38
- use Nette\\\\Caching\\\\Storages\\\\Journal$#
39
- """
40
- count : 1
41
- path : src/Caching/RedisStorage.php
42
-
43
- -
44
- message : """
45
- #^Fetching class constant class of deprecated class Nette\\\\Caching\\\\IStorage\\:
46
- use Nette\\\\Caching\\\\Storage$#
47
- """
48
- count : 3
49
- path : src/DI/RedisExtension.php
Original file line number Diff line number Diff line change 1
- <?xml version =" 1.0" ?>
2
- <ruleset >
3
- <!-- Contributte Coding Standard -->
4
- <rule ref =" ./vendor/ninjify/coding-standard/contributte.xml" >
5
- <exclude name =" Squiz.Commenting.FunctionComment.InvalidTypeHint" />
6
- <exclude name =" SlevomatCodingStandard.ControlStructures.RequireTernaryOperator.TernaryOperatorNotUsed" />
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <ruleset name =" Contributte" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" vendor/squizlabs/php_codesniffer/phpcs.xsd" >
3
+ <!-- Rulesets -->
4
+ <rule ref =" ./vendor/contributte/qa/ruleset-8.2.xml" >
5
+ <exclude name =" SlevomatCodingStandard.PHP.DisallowReference.DisallowedPassingByReference" />
7
6
</rule >
8
7
9
- <!-- Specific rules -->
8
+ <!-- Rules -->
10
9
<rule ref =" SlevomatCodingStandard.Files.TypeNameMatchesFileName" >
11
10
<properties >
12
11
<property name =" rootNamespaces" type =" array" >
16
15
</properties >
17
16
</rule >
18
17
19
- <!-- Exclude folders -->
18
+ <!-- Excludes -->
20
19
<exclude-pattern >/tests/tmp</exclude-pattern >
21
20
</ruleset >
You can’t perform that action at this time.
0 commit comments