| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 53 | private function query() |
||
| 54 | { |
||
| 55 | $parameters = str_replace(' ', '%20', $this->url); |
||
| 56 | |||
| 57 | $url = $this->kernel->getCollection() . $parameters; |
||
| 58 | $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
||
| 59 | |||
| 60 | $this->headers()->getCookie()->body()->httpErrorsFalse()->get(); |
||
|
|
|||
| 61 | $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
||
| 62 | $this->headers()->getCookie()->body()->httpErrorsFalse()->get() |
||
| 63 | ); |
||
| 64 | $body = $response->getBody(); |
||
| 65 | $this->kernel->getHandler()->parse($body->getContents()); |
||
| 66 | } |
||
| 67 | } |
PHP Analyzer performs a side-effects analysis of your code. A side-effect is basically anything that might be visible after the scope of the method is left.
Let’s take a look at an example:
If we look at the
getEmail()method, we can see that it has no side-effect. Whether you call this method or not, no future calls to other methods are affected by this. As such code as the following is useless:On the hand, if we look at the
setEmail(), this method _has_ side-effects. In the following case, we could not remove the method call: