Completed
Push — develop ( 0b7f73...d8ea06 )
by Abdelrahman
01:31
created

TestimonialTransformer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A transform() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Testimonials\Transformers\Managerarea;
6
7
use League\Fractal\TransformerAbstract;
8
use Cortex\Testimonials\Models\Testimonial;
9
10
class TestimonialTransformer extends TransformerAbstract
11
{
12
    /**
13
     * @return array
14
     */
15
    public function transform(Testimonial $testimonial): array
16
    {
17
        return [
18
            'id' => (string) $testimonial->getRouteKey(),
19
            'created_at' => (string) $testimonial->created_at,
20
            'updated_at' => (string) $testimonial->updated_at,
21
        ];
22
    }
23
}
24