File tree Expand file tree Collapse file tree 2 files changed +32
-9
lines changed
Expand file tree Collapse file tree 2 files changed +32
-9
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ /**
6+ * This file is part of CodeIgniter 4 framework.
7+ *
8+ * (c) 2023 CodeIgniter Foundation <admin@codeigniter.com>
9+ *
10+ * For the full copyright and license information, please view
11+ * the LICENSE file that was distributed with this source code.
12+ */
13+
14+ namespace CodeIgniter \PHPStan \Tests ;
15+
16+ /**
17+ * @internal
18+ */
19+ trait AdditionalConfigFilesTrait
20+ {
21+ public static function getAdditionalConfigFiles (): array
22+ {
23+ return [
24+ ...parent ::getAdditionalConfigFiles (),
25+ __DIR__ . '/../extension.neon ' ,
26+ __DIR__ . '/extension-test.neon ' ,
27+ ];
28+ }
29+ }
Original file line number Diff line number Diff line change 1414namespace CodeIgniter \PHPStan \Tests \Rules \Functions ;
1515
1616use CodeIgniter \PHPStan \Rules \Functions \FactoriesFunctionArgumentTypeRule ;
17+ use CodeIgniter \PHPStan \Tests \AdditionalConfigFilesTrait ;
1718use CodeIgniter \PHPStan \Type \FactoriesReturnTypeHelper ;
1819use PHPStan \Rules \Rule ;
1920use PHPStan \Testing \RuleTestCase ;
2728#[Group('Integration ' )]
2829final class FactoriesFunctionArgumentTypeRuleTest extends RuleTestCase
2930{
31+ use AdditionalConfigFilesTrait;
32+
3033 protected function getRule (): Rule
3134 {
3235 return new FactoriesFunctionArgumentTypeRule (
@@ -79,13 +82,4 @@ public function testRule(): void
7982 ],
8083 ]);
8184 }
82-
83- public static function getAdditionalConfigFiles (): array
84- {
85- return [
86- ...parent ::getAdditionalConfigFiles (),
87- __DIR__ . '/../../../extension.neon ' ,
88- __DIR__ . '/../../extension-test.neon ' ,
89- ];
90- }
9185}
You can’t perform that action at this time.
0 commit comments