| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 2 | public function indexAction() : Response |
|
| 32 | { |
||
| 33 | 2 | $request = $this->getRequest(); |
|
| 34 | 2 | $this->httpClient->setMethod(Request::METHOD_POST); |
|
| 35 | 2 | $this->httpClient->setParameterPost(['dsl_text' => $request->getPost('dsl_text')]); |
|
| 36 | 2 | $response = $this->httpClient->send(); |
|
| 37 | |||
| 38 | 2 | if (! $response->isSuccess()) { |
|
| 39 | 1 | throw new UnexpectedValueException('HTTP Request failed'); |
|
| 40 | } |
||
| 41 | |||
| 42 | 1 | $redirect = $this->plugin('redirect'); |
|
| 43 | |||
| 44 | 1 | return $redirect->toUrl('https://yuml.me/' . $response->getBody()); |
|
|
|
|||
| 45 | } |
||
| 46 | } |
||
| 47 |
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.