Closed Vahagn-99 closed 2 years ago
if (app()->environment('local')) { $this->cdek = new \CdekSDK2\Client(new ClientInterface, env('cdek_TEST_ACCOUNT'), env('cdek_TEST_SECURE_PASSWORD')); $this->cdek->setTest(true); } else { $this->cdek = new \CdekSDK2\Client(new ClientInterface, env('cdek_ACCOUNT'), env('cdek_TEST_SECURE_PASSWORD')); } return $this->cdek;
when i 'm trying to pass interface as parameter i get the above error
That is correct. Interfaces are by nature not instantiable.
if (app()->environment('local')) { $this->cdek = new \CdekSDK2\Client(new ClientInterface, env('cdek_TEST_ACCOUNT'), env('cdek_TEST_SECURE_PASSWORD')); $this->cdek->setTest(true); } else { $this->cdek = new \CdekSDK2\Client(new ClientInterface, env('cdek_ACCOUNT'), env('cdek_TEST_SECURE_PASSWORD')); } return $this->cdek;
when i 'm trying to pass interface as parameter i get the above error