mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-09 14:23:19 +01:00
Fix Scramble API docs warnings
Remove redundant @var annotations from API resources and defer the user access in the email unique rule of UserUpdateRequest, so rules() can be evaluated by Scramble without route model binding. Add a test that fails on any Scramble diagnostic and tests for the email unique rule.
This commit is contained in:
committed by
Constantin Graf
parent
4a2f78931a
commit
f01a4111b6
@@ -30,25 +30,25 @@ class ProjectResource extends BaseResource
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
/** @var string $id ID of project */
|
||||
/** ID of project */
|
||||
'id' => $this->resource->id,
|
||||
/** @var string $name Name of project */
|
||||
/** Name of project */
|
||||
'name' => $this->resource->name,
|
||||
/** @var string $color Color of project */
|
||||
/** Color of project */
|
||||
'color' => $this->resource->color,
|
||||
/** @var string|null $client_id ID of client */
|
||||
'client_id' => $this->resource->client_id,
|
||||
/** @var bool $is_archived Whether the client is archived */
|
||||
/** Whether the client is archived */
|
||||
'is_archived' => $this->resource->is_archived,
|
||||
/** @var int|null $billable_rate Billable rate in cents per hour */
|
||||
/** Billable rate in cents per hour */
|
||||
'billable_rate' => $this->showBillableRate ? $this->resource->billable_rate : null,
|
||||
/** @var bool $is_billable Project time entries billable default */
|
||||
/** Project time entries billable default */
|
||||
'is_billable' => $this->resource->is_billable,
|
||||
/** @var int|null $estimated_time Estimated time in seconds */
|
||||
/** Estimated time in seconds */
|
||||
'estimated_time' => $this->resource->estimated_time,
|
||||
/** @var int $spent_time Spent time on this project in seconds (sum of the duration of all associated time entries, excl. still running time entries) */
|
||||
/** Spent time on this project in seconds (sum of the duration of all associated time entries, excl. still running time entries) */
|
||||
'spent_time' => $this->resource->spent_time,
|
||||
/** @var bool $is_public Whether the project is public */
|
||||
/** Whether the project is public */
|
||||
'is_public' => $this->resource->is_public,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user