Completed
Push — develop ( 996869...2e4ada )
by Abdelrahman
13:50
created

PathTransformer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A transform() 0 11 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Statistics\Transformers\Adminarea;
6
7
use Rinvex\Statistics\Models\Path;
8
use League\Fractal\TransformerAbstract;
9
10
class PathTransformer extends TransformerAbstract
11
{
12
    /**
13
     * @return array
14
     */
15
    public function transform(Path $path): array
16
    {
17
        return [
18
            'host' => (string) $path->host,
19
            'locale' => (string) $path->locale,
20
            'accessarea' => (string) $path->accessarea,
21
            'path' => (string) $path->path,
22
            'parameters' => (string) $path->parameters,
23
            'count' => (int) $path->count,
24
        ];
25
    }
26
}
27