File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 32
32
},
33
33
"scripts" : {
34
34
"test" : " phpunit" ,
35
- "analyse" : " phpstan analyse src tests --level=8 " ,
35
+ "analyse" : " phpstan analyse src tests --level=9 " ,
36
36
"check-style" : " phpcs -p --standard=PSR12 --exclude=Generic.Files.LineLength --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests" ,
37
37
"fix-style" : " phpcbf -p --standard=PSR12 --exclude=Generic.Files.LineLength --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests"
38
38
},
Original file line number Diff line number Diff line change 16
16
use Fruitcake \Cors \Exceptions \InvalidOptionException ;
17
17
use PHPUnit \Framework \TestCase ;
18
18
19
+ /**
20
+ * @phpstan-import-type CorsNormalizedOptions from CorsService
21
+ */
19
22
class CorsServiceTest extends TestCase
20
23
{
21
24
/**
@@ -113,7 +116,7 @@ public function itNormalizesUnderscoreOptions(): void
113
116
114
117
/**
115
118
* @param CorsService $service
116
- * @return array<mixed>
119
+ * @return CorsNormalizedOptions
117
120
*/
118
121
private function getOptionsFromService (CorsService $ service ): array
119
122
{
@@ -122,6 +125,9 @@ private function getOptionsFromService(CorsService $service): array
122
125
$ property = $ reflected ->getProperty ('options ' );
123
126
$ property ->setAccessible (true );
124
127
125
- return $ property ->getValue ($ service );
128
+ /** @var CorsNormalizedOptions $options */
129
+ $ options = $ property ->getValue ($ service );
130
+
131
+ return $ options ;
126
132
}
127
133
}
You can’t perform that action at this time.
0 commit comments