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 3232    },
3333    "scripts" : {
3434        "test" : " phpunit"  ,
35-         "analyse" : " phpstan analyse src tests --level=8 "  ,
35+         "analyse" : " phpstan analyse src tests --level=9 "  ,
3636        "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"  ,
3737        "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" 
3838    },
Original file line number Diff line number Diff line change 1616use  Fruitcake \Cors \Exceptions \InvalidOptionException ;
1717use  PHPUnit \Framework \TestCase ;
1818
19+ /** 
20+  * @phpstan-import-type CorsNormalizedOptions from CorsService 
21+  */ 
1922class  CorsServiceTest extends  TestCase
2023{
2124    /** 
@@ -113,7 +116,7 @@ public function itNormalizesUnderscoreOptions(): void
113116
114117    /** 
115118     * @param CorsService $service 
116-      * @return array<mixed>  
119+      * @return CorsNormalizedOptions  
117120     */ 
118121    private  function  getOptionsFromService (CorsService   $ service ): array 
119122    {
@@ -122,6 +125,9 @@ private function getOptionsFromService(CorsService $service): array
122125        $ property  = $ reflected ->getProperty ('options ' );
123126        $ property ->setAccessible (true );
124127
125-         return  $ property ->getValue ($ service );
128+         /** @var CorsNormalizedOptions $options */ 
129+         $ options  = $ property ->getValue ($ service );
130+ 
131+         return  $ options ;
126132    }
127133}
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments