TournamentLeaderboardService::get()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 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
}