Skip to content

Commit

Permalink
fix phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
jshah4517 committed May 24, 2024
1 parent 9250bdb commit 8399f9a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/Factory/ModelFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ abstract class ModelFactory
*/
public function create(array $data): Model
{
/** @var Model $model */
$model = new ($this->getModel());
$modelClass = $this->getModel();

return $model->fill($data);
return (new $modelClass)->fill($data);
}

/**
* @return class-string<Model>
*/
abstract public function getModel(): string;
}
1 change: 0 additions & 1 deletion src/Model/Ticket/Request/CreateTicket.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,4 @@ class CreateTicket extends Model
protected array|null $attachment;

protected int|null $createdAt;

}
1 change: 1 addition & 0 deletions test/Cache/CacheableApisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use SupportPal\ApiClient\Tests\DataFixtures\User\UserData;

use function call_user_func_array;
use function json_encode;
use function sleep;
use function sys_get_temp_dir;

Expand Down
2 changes: 2 additions & 0 deletions test/Integration/ApiClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
use SupportPal\ApiClient\Tests\ContainerAwareBaseTestCase;

use function call_user_func_array;
use function json_decode;
use function json_encode;

/**
* Class ApiClientTest
Expand Down
1 change: 1 addition & 0 deletions test/Integration/Factory/RequestFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use function array_merge;
use function base64_encode;
use function http_build_query;
use function json_encode;

/**
* Class RequestFactoryTest
Expand Down
1 change: 0 additions & 1 deletion test/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use SupportPal\ApiClient\Helper\StringHelper;
use SupportPal\ApiClient\Model\Collection\Collection;
use SupportPal\ApiClient\Model\Model;
use SupportPal\ApiClient\Model\Shared\Settings;
use SupportPal\ApiClient\Tests\PhpUnit\PhpUnitCompatibilityTrait;

use function count;
Expand Down

0 comments on commit 8399f9a

Please sign in to comment.