Passed
Push — master ( a4cc6f...c5607b )
by Paul
04:25
created

Url   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 10
dl 0
loc 19
c 1
b 0
f 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 11 1
1
<?php
2
3
namespace Devpri\Tinre\Http\Resources\Api\V1;
4
5
use Illuminate\Http\Resources\Json\JsonResource;
6
7
class Url extends JsonResource
8
{
9
    /**
10
     * Transform the resource into an array.
11
     *
12
     * @param  \Illuminate\Http\Request  $request
13
     * @return array
14
     */
15
    public function toArray($request)
16
    {
17
        return [
18
            'id' => $this->id,
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on Devpri\Tinre\Http\Resources\Api\V1\Url. Since you implemented __get, consider adding a @property annotation.
Loading history...
19
            'active' => $this->active,
0 ignored issues
show
Bug Best Practice introduced by
The property active does not exist on Devpri\Tinre\Http\Resources\Api\V1\Url. Since you implemented __get, consider adding a @property annotation.
Loading history...
20
            'long_url' => $this->long_url,
0 ignored issues
show
Bug Best Practice introduced by
The property long_url does not exist on Devpri\Tinre\Http\Resources\Api\V1\Url. Since you implemented __get, consider adding a @property annotation.
Loading history...
21
            'path' => $this->path,
0 ignored issues
show
Bug Best Practice introduced by
The property path does not exist on Devpri\Tinre\Http\Resources\Api\V1\Url. Since you implemented __get, consider adding a @property annotation.
Loading history...
22
            'total_clicks' => $this->total_clicks,
0 ignored issues
show
Bug Best Practice introduced by
The property total_clicks does not exist on Devpri\Tinre\Http\Resources\Api\V1\Url. Since you implemented __get, consider adding a @property annotation.
Loading history...
23
            'user_id' => $this->user_id,
0 ignored issues
show
Bug Best Practice introduced by
The property user_id does not exist on Devpri\Tinre\Http\Resources\Api\V1\Url. Since you implemented __get, consider adding a @property annotation.
Loading history...
24
            'created_at' => $this->created_at,
0 ignored issues
show
Bug Best Practice introduced by
The property created_at does not exist on Devpri\Tinre\Http\Resources\Api\V1\Url. Since you implemented __get, consider adding a @property annotation.
Loading history...
25
            'updated_at' => $this->updated_at,
0 ignored issues
show
Bug Best Practice introduced by
The property updated_at does not exist on Devpri\Tinre\Http\Resources\Api\V1\Url. Since you implemented __get, consider adding a @property annotation.
Loading history...
26
        ];
27
    }
28
}
29