Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 5 |
Lines | 6 |
Ratio | 50 % |
Changes | 0 |
1 | <?php |
||
44 | public function guess() |
||
45 | { |
||
46 | // Try fully qualified namespace |
||
47 | View Code Duplication | if (class_exists($class = $this->namespaceBase.'\\'.$this->namespaceSuffix.'\\'.$this->contextClass)) { |
|
48 | return $class; |
||
49 | } |
||
50 | // Fall back to namespace with SilverStripe prefix |
||
51 | // TODO Remove once core has namespace capabilities for modules |
||
52 | View Code Duplication | if (class_exists($class = 'SilverStripe\\'.$this->namespaceBase.'\\'.$this->namespaceSuffix.'\\'.$this->contextClass)) { |
|
53 | return $class; |
||
54 | } |
||
55 | } |
||
56 | } |
||
57 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.