| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function __construct(ErrorBag $errors = null) |
||
| 32 | { |
||
| 33 | $body = $this->getDefaultError(); |
||
| 34 | |||
| 35 | if (null !== $errors) { |
||
| 36 | $errors->setHttpCode($this->httpCode); |
||
| 37 | $body = json_encode($errors, JSON_UNESCAPED_SLASHES); |
||
| 38 | } |
||
| 39 | |||
| 40 | $this->response = parent::instance($body, $this->httpCode, $this->headers); |
||
|
|
|||
| 41 | } |
||
| 42 | |||
| 51 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()method in theSoncalls the wrong method in the parent class.