| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 54 | private static function getStubContentByFileName($stubName) |
||
| 55 | { |
||
| 56 | $stubName = str_replace(self::STUBS_FILE_FORMAT, '', $stubName); |
||
| 57 | |||
| 58 | $stubFilePath = __DIR__ . DIRECTORY_SEPARATOR . self::STUBS_FOLDER_NAME . DIRECTORY_SEPARATOR . $stubName . self::STUBS_FILE_FORMAT; |
||
| 59 | |||
| 60 | if (!(file_exists($stubFilePath) && is_readable($stubFilePath))) { |
||
| 61 | throw new InvalidArgumentException("$stubName is not found in stubs folder"); |
||
| 62 | } |
||
| 63 | |||
| 64 | return file_get_contents($stubFilePath); |
||
| 65 | } |
||
| 66 | } |
||
| 67 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.