@@ 152-156 (lines=5) @@ | ||
149 | return false; |
|
150 | } |
|
151 | ||
152 | if ($value === null && $method->getNumberOfParameters() !== 0 && !$method->getParameters()[0]->allowsNull()) { |
|
153 | debug(self::DEBUG_LABEL)->output('[Error] First parameter of method %s is not allowed to be null', $method->getName()); |
|
154 | ||
155 | return false; |
|
156 | } |
|
157 | ||
158 | if ($method->getNumberOfParameters() === 0) { |
|
159 | debug(self::DEBUG_LABEL)->output('[Warning] Method %s does not accept any parameters', $method->getName()); |
|
@@ 192-196 (lines=5) @@ | ||
189 | } |
|
190 | ||
191 | $value = $method->invoke($this->object); |
|
192 | if ($value === null && $method->hasReturnType() && !$method->getReturnType()->allowsNull()) { |
|
193 | debug(self::DEBUG_LABEL)->output('[Error] Method %s return value is not allowed to be null', $method->getName()); |
|
194 | ||
195 | return false; |
|
196 | } |
|
197 | ||
198 | return true; |
|
199 | } |