| 1 | <?php  | 
            ||
| 10 | class Registry  | 
            ||
| 11 | { | 
            ||
| 12 | /**  | 
            ||
| 13 | * @var array<RegistryEntry>  | 
            ||
| 14 | */  | 
            ||
| 15 | private $entries = [];  | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | * Add a entry to the registry  | 
            ||
| 19 | *  | 
            ||
| 20 | * @param RegistryEntry $entry  | 
            ||
| 21 | */  | 
            ||
| 22 | 2 | public function add(RegistryEntry $entry)  | 
            |
| 28 | |||
| 29 | /**  | 
            ||
| 30 | * Get entries for index and type  | 
            ||
| 31 | *  | 
            ||
| 32 | * @param string $index  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 33 | * @param string $type  | 
            ||
| 34 | *  | 
            ||
| 35 | * @return array<ProviderEntry>  | 
            ||
| 36 | */  | 
            ||
| 37 | 3 | public function get($index = null, $type = null)  | 
            |
| 46 | }  | 
            
This check looks for
@paramannotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.