File tree Expand file tree Collapse file tree 4 files changed +17
-19
lines changed
Expand file tree Collapse file tree 4 files changed +17
-19
lines changed Original file line number Diff line number Diff line change 55/tags
66/composer.lock
77/phpunit.xml
8- /phpcs.xml
98/tools
109/vendor
1110* .mo
@@ -16,6 +15,7 @@ error.log
1615/tests /test_app /config /TestsQueue /schema-dump-test.lock
1716/tests /test_app /Plugin /TestBlog /config /Queue /*
1817.phpunit.cache
18+ .phpcs.cache
1919
2020# IDE and editor specific files #
2121# ################################
Original file line number Diff line number Diff line change 6060 " @cs-check" ,
6161 " @test"
6262 ],
63- "cs-check" : " phpcs --colors -p src/ tests/ " ,
64- "cs-fix" : " phpcbf --colors -p src/ tests/ " ,
63+ "cs-check" : " phpcs" ,
64+ "cs-fix" : " phpcbf" ,
6565 "stan" : " @phpstan" ,
6666 "phpstan" : " tools/phpstan analyse" ,
6767 "stan-baseline" : " tools/phpstan --generate-baseline" ,
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <ruleset name =" CakePHP PluginInstaller" >
3+ <file >src/</file >
4+ <file >tests/</file >
5+ <rule ref =" CakePHP" />
6+ <arg value =" nps" />
7+ <arg name =" colors" />
8+ <arg name =" parallel" value =" 4" />
9+ <arg name =" cache" value =" .phpcs.cache" />
10+
11+ <exclude-pattern >tests/comparisons/*</exclude-pattern >
12+ </ruleset >
Original file line number Diff line number Diff line change 3030use PHPUnit \Framework \Attributes \DataProvider ;
3131use TestApp \TestProcessor ;
3232use TestApp \WelcomeMailer ;
33- use Traversable ;
3433
3534class ProcessorTest extends TestCase
3635{
@@ -47,21 +46,8 @@ class ProcessorTest extends TestCase
4746 */
4847 protected function eventListToArray (EventList $ events ): array
4948 {
50- if ($ events instanceof Traversable) {
51- /** @var array<\Cake\Event\EventInterface> */
52- return iterator_to_array ($ events );
53- }
54-
55- $ result = [];
56- $ count = $ events ->count ();
57- for ($ i = 0 ; $ i < $ count ; $ i ++) {
58- $ event = $ events [$ i ];
59- if ($ event !== null ) {
60- $ result [] = $ event ;
61- }
62- }
63-
64- return $ result ;
49+ /** @var array<\Cake\Event\EventInterface> */
50+ return iterator_to_array ($ events );
6551 }
6652
6753 /**
You can’t perform that action at this time.
0 commit comments