Skip to content

Commit

Permalink
style: apply automated php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi authored and github-actions[bot] committed Dec 3, 2024
1 parent 22376a0 commit 9c3a1e3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Services/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public static function create($data = null, $transformer = null, $serializer = n
private static function getRequestedFieldsets(): array
{
$requestKey = config('apiato.requests.sparse_fieldsets.request_key');

return request()?->input($requestKey) ?? [];
}

Expand All @@ -63,24 +64,24 @@ public function createData(): Scope
}

if (is_string($this->serializer)) {
$this->serializer = new $this->serializer;
$this->serializer = new $this->serializer();
}

if (! is_null($this->serializer)) {
if (!is_null($this->serializer)) {
$this->manager->setSerializer($this->serializer);
}

$this->manager->setRecursionLimit($this->recursionLimit);

if (! empty($this->includes)) {
if (!empty($this->includes)) {
$this->manager->parseIncludes($this->includes);
}

if (! empty($this->excludes)) {
if (!empty($this->excludes)) {
$this->manager->parseExcludes($this->excludes);
}

if (! empty($this->fieldsets)) {
if (!empty($this->fieldsets)) {
$this->manager->parseFieldsets($this->fieldsets);
}

Expand Down

0 comments on commit 9c3a1e3

Please sign in to comment.