| 1 | <?php |
||
| 9 | class ScriptLoader |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | protected $_scriptFiles = array(); |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $_homeScriptFolder = ''; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $_magentoRootFolder = ''; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var array |
||
| 28 | */ |
||
| 29 | protected $_scriptFolders = array(); |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param array $scriptFolders |
||
| 33 | * @param string $magentoRootFolder |
||
|
1 ignored issue
–
show
|
|||
| 34 | */ |
||
| 35 | public function __construct(array $scriptFolders, $magentoRootFolder = null) |
||
| 56 | |||
| 57 | protected function findScripts() |
||
| 77 | |||
| 78 | /** |
||
| 79 | * Reads the first line. If it's a comment return it. |
||
| 80 | * |
||
| 81 | * @param string $file |
||
| 82 | * |
||
| 83 | * @return string |
||
| 84 | */ |
||
| 85 | protected function _readFirstLineOfFile($file) |
||
| 100 | |||
| 101 | /** |
||
| 102 | * @param string $pathname |
||
| 103 | * |
||
| 104 | * @return string |
||
| 105 | */ |
||
| 106 | protected function _getLocation($pathname) |
||
| 122 | |||
| 123 | /** |
||
| 124 | * @return array |
||
| 125 | */ |
||
| 126 | public function getFiles() |
||
| 130 | } |
||
| 131 |
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.