TournamentLeaderboardService   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 8 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: mschmidt
5
 * Date: 8/4/2016
6
 * Time: 1:35 PM
7
 */
8
9
namespace GolfLeague\Tournament;
10
11
use \Tournament as Tournament;
12
use GolfLeague\Tournament\TournamentFactory as TournamentFactory;
13
14
class TournamentLeaderboardService
15
{
16
17
    public function get($id)
18
    {
19
        $tournament = Tournament::find($id)->toArray();
20
        $tournamentFactory= new TournamentFactory;
21
        $tournamentType = $tournamentFactory->create($tournament);
22
        return $tournamentType->getLeaderboard();
23
24
    }
25
}