Skip to content

Commit

Permalink
DocBlock tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentauger committed Feb 22, 2023
1 parent 3ac7463 commit 76f78d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions app/Http/Resources/AuthenticatedUserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Illuminate\Http\Resources\Json\JsonResource;

/**
* @extends JsonResource<\App\Models\User>
*/
class AuthenticatedUserResource extends JsonResource
{
/**
Expand Down
10 changes: 6 additions & 4 deletions app/Http/Resources/AuthorResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
use Auth;
use Illuminate\Http\Resources\Json\JsonResource;

/*
* Resource for Author model
* @extends JsonResource<\App\Models\Author>
*/
class AuthorResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
public function toArray($request): array
{
return [
'data' => [
Expand Down

0 comments on commit 76f78d0

Please sign in to comment.