fix(formating)

This commit is contained in:
Anatoliy Poloz
2026-01-28 03:36:26 +03:00
parent 1723177949
commit b15d29f8e9
313 changed files with 1863 additions and 1533 deletions

View File

@@ -17,6 +17,7 @@ use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;
use Spatie\LaravelData\DataCollection;
// </SECTION>
// <SECTION name="class_definition" intent="Define the request to get all steps for a deal.">
@@ -45,6 +46,14 @@ class GetStepsRequest extends Request
}
// </SECTION>
// <SECTION name="response_caster" intent="Map the JSON array response to a collection of DTOs.">
// <BELIEF_STATE "The API returns a JSON array. Using `StepData::collect` automatically converts this array into a type-safe, iterable `DataCollection` of `StepData` objects.">
public function createDtoFromResponse(Response $response): DataCollection
{
return StepData::collect($response->json(), DataCollection::class);
}
// </SECTION>
// <SECTION name="query_builder" intent="Construct the query string for pagination.">
// <BELIEF_STATE "The `defaultQuery` method properly assigns the pagination parameters to the query string.">
protected function defaultQuery(): array
@@ -55,12 +64,4 @@ class GetStepsRequest extends Request
];
}
// </SECTION>
// <SECTION name="response_caster" intent="Map the JSON array response to a collection of DTOs.">
// <BELIEF_STATE "The API returns a JSON array. Using `StepData::collect` automatically converts this array into a type-safe, iterable `DataCollection` of `StepData` objects.">
public function createDtoFromResponse(Response $response): DataCollection
{
return StepData::collect($response->json(), DataCollection::class);
}
// </SECTION>
}