diff --git a/src/Api/UserApi.php b/src/Api/UserApi.php index 178541a7..d2376cab 100644 --- a/src/Api/UserApi.php +++ b/src/Api/UserApi.php @@ -3,15 +3,15 @@ namespace SupportPal\ApiClient\Api; use SupportPal\ApiClient\Api\User\CustomFields; -use SupportPal\ApiClient\Api\User\Users; use SupportPal\ApiClient\Api\User\UserGroups; +use SupportPal\ApiClient\Api\User\Users; use SupportPal\ApiClient\Http\UserClient; class UserApi extends Api { use CustomFields; - use Users; use UserGroups; + use Users; public function __construct(protected readonly UserClient $apiClient) { diff --git a/test/Unit/ApiTest.php b/test/Unit/ApiTest.php index a6de77f7..9c4615a9 100644 --- a/test/Unit/ApiTest.php +++ b/test/Unit/ApiTest.php @@ -49,8 +49,10 @@ protected function makeCommonExpectations(array $responseData, string $model): a if (is_array(current($responseData['data']))) { $models = []; foreach ($responseData['data'] as $value) { - /** @var Model[] $models */ - $models[] = new $model($value); + /** @var Model $model */ + $model = new $model($value); + + $models[] = $model; } $collection = $this->api->createCollection($responseData['count'], $models);