CreditCardResource   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 15 1
1
<?php
2
3
namespace Finder\Http\Resources\Consumo;
4
5
use Illuminate\Http\Resources\Json\JsonResource;
6
7
class CreditCardResource 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
            'id' => $this->id,
23
            'card_id' => $this->id,
24
            'brand_id' => $this->brand_id,
25
            'card_number' => $this->card_number,
26
            'exp_year' => $this->exp_year,
27
            'exp_month' => $this->exp_month,
28
            'card_name' => $this->card_name,
29
            'is_active' => $this->is_active,
30
            'created_at' => (string) $this->created_at,
31
            'updated_at' => (string) $this->updated_at,
32
        ];
33
    }
34
}
35