StandingsTransformer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A transform() 0 13 1
1
<?php
2
3
namespace App\Transformers;
4
5
use League\Fractal\TransformerAbstract;
6
7
/**
8
 * Class StandingsTransformer
9
 * @package App\Transformers
10
 */
11
class StandingsTransformer extends TransformerAbstract
12
{
13
    /**
14
     * @var array
15
     */
16
    protected $defaultIncludes = [];
17
18
    /**
19
     * @param $pair
20
     * @return array
21
     */
22
    public function transform($pair)
23
    {
24
        return [
25
            'id' => $pair['id'],
26
            'tournament' => $pair['tournamentId'],
27
            'round' => $pair['round'],
28
            'homeTeam' => $pair['homeTeamId'],
29
            'homeTeamName' => $pair['homeTeamName'],
30
            'awayTeam' => $pair['awayTeamId'],
31
            'awayTeamName' => $pair['awayTeamName'],
32
            'matches' => $pair['matches']
33
        ];
34
    }
35
}
36