IntegrationResource   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 8 1
1
<?php
2
3
namespace Integrations\Resources;
4
5
use Illuminate\Http\Resources\Json\JsonResource;
6
7
class IntegrationResource extends JsonResource
8
{
9
    public $with = [
10
        'success' => true
11
    ];
12
13
    /**
14
     * Transform the resource into an array.
15
     *
16
     * @param  \Illuminate\Http\Request $request
17
     * @return array
18
     */
19
    public function toArray($request)
20
    {
21
        return [
22
            'token' => $this->token,
23
            'created_at' => (string) $this->created_at,
24
            'updated_at' => (string) $this->updated_at
25
        ];
26
    }
27
}
28