TablescoresSerializer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
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 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A collection() 0 6 1
1
<?php
2
3
namespace App\Serializers\Tournament;
4
5
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
6
use Illuminate\Support\Collection;
7
8
/**
9
 * Class TablescoresSerializer
10
 * @package App\Serializers\Tournament
11
 */
12
class TablescoresSerializer
13
{
14
    /**
15
     * @name collection
16
     * @param EloquentCollection $collection
17
     * @return mixed
18
     */
19
    public function collection(EloquentCollection $collection)
20
    {
21
        $tournament = $collection->first()->tournament;
22
23
        return $tournament->getScore($collection);
24
    }
25
}
26