1 | <?php |
||
12 | |||
13 | class Client |
||
14 | { |
||
15 | /** |
||
16 | * This URL is used for testing purposes |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $testServerUrl = 'http://sstest.consignor.com/ship/ShipmentServerModule.dll'; |
||
21 | |||
22 | /** |
||
23 | * This URL is used for production requests |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $productionServerUrl = 'https://www.shipmentserver.com/ship/ShipmentServerModule.dll'; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $actor; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $key; |
||
38 | |||
39 | /** |
||
40 | * Should be either 'dev' or 'production' |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $environment; |
||
45 | |||
46 | /** |
||
47 | * @var HttpClient |
||
48 | */ |
||
49 | protected $httpClient; |
||
50 | |||
51 | /** |
||
52 | * @var RequestFactory |
||
53 | */ |
||
54 | protected $requestFactory; |
||
55 | |||
56 | /** |
||
57 | * This is the last request |
||
58 | * |
||
59 | * @var PsrRequestInterface|null |
||
60 | */ |
||
61 | protected $request; |
||
62 | |||
63 | /** |
||
64 | * This is the last response |
||
65 | * |
||
66 | * @var ResponseInterface|null |
||
67 | */ |
||
68 | protected $response; |
||
69 | |||
70 | public function __construct(string $actor, string $key, HttpClient $httpClient = null, RequestFactory $requestFactory = null, string $environment = 'production') |
||
80 | |||
81 | public function doRequest(RequestInterface $request) : array |
||
82 | { |
||
83 | // resetting last request and response |
||
84 | $this->request = null; |
||
85 | $this->response = null; |
||
86 | |||
87 | // deduce url |
||
88 | $url = $this->environment === 'dev' ? $this->testServerUrl : $this->productionServerUrl; |
||
89 | |||
90 | // convert body to post string and inject auth and command params |
||
122 | } |
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.