| Total Complexity | 8 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class Http |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @param StrategyInterface|null $strategy |
||
| 17 | */ |
||
| 18 | public function __construct(private null|StrategyInterface $strategy = null) |
||
| 19 | { |
||
| 20 | if (!$this->strategy) { |
||
| 21 | $this->strategy = new GuzzleStrategy(); |
||
| 22 | } |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param StrategyInterface $strategy |
||
| 27 | * @return $this |
||
| 28 | */ |
||
| 29 | public function setStrategy(StrategyInterface $strategy): Http |
||
| 30 | { |
||
| 31 | $this->strategy = $strategy; |
||
| 32 | |||
| 33 | return $this; |
||
| 34 | } |
||
| 35 | |||
| 36 | public function sendRequest(string $url): stdClass |
||
| 37 | { |
||
| 38 | return $this->handlerRequest($url); |
||
| 39 | } |
||
| 40 | |||
| 41 | private function handlerRequest(string $url): stdClass |
||
| 61 | } |
||
| 62 | } |
||
| 63 |
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.