| Conditions | 3 |
| Paths | 3 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public static function getRenderedStub($stubFileName, $keysMap = null) |
||
| 23 | { |
||
| 24 | $mapping = []; |
||
| 25 | |||
| 26 | $stubContent = self::getStubContentByFileName($stubFileName); |
||
| 27 | |||
| 28 | // When Stub type is Staitc Stub |
||
| 29 | if (is_null($keysMap)) { |
||
| 30 | return $stubContent; |
||
| 31 | } |
||
| 32 | |||
| 33 | foreach ($keysMap as $key => $map) { |
||
| 34 | |||
| 35 | $normalizedKey = str_replace('$', '', $key); |
||
| 36 | |||
| 37 | $searchKey = "{{" . '$' . $normalizedKey . "}}"; |
||
| 38 | |||
| 39 | $mapping[$searchKey] = $map; |
||
| 40 | } |
||
| 41 | |||
| 42 | return str_replace(array_keys($mapping), array_values($mapping), $stubContent); |
||
| 43 | } |
||
| 44 | |||
| 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.