Conditions | 4 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
32 | public function setValue($object, $value = null) |
||
33 | { |
||
34 | if ($value === null && $this->hasType() && ! $this->getType()->allowsNull()) { |
||
35 | $propertyName = $this->getName(); |
||
36 | |||
37 | $unsetter = function () use ($propertyName) { |
||
38 | unset($this->$propertyName); |
||
39 | }; |
||
40 | $unsetter = $unsetter->bindTo($object, $this->getDeclaringClass()->getName()); |
||
41 | $unsetter(); |
||
42 | |||
43 | return; |
||
44 | } |
||
45 | |||
46 | parent::setValue($object, $value); |
||
47 | } |
||
49 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.