GamesApi   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 1
b 0
f 0
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A byTeamId() 0 7 1
A byClubId() 0 7 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Eekes\VblApi\Api;
5
6
use Eekes\VblApi\Entity\GameCollection;
7
8
class GamesApi extends AbstractApi
9
{
10
    public static function byTeamId(string $id): GameCollection
11
    {
12
        $api = new self();
13
14
        $response = $api->call("TeamMatchesByGuid?teamguid=" .  $id);
15
16
        return GameCollection::createFromArrayResponse($response);
17
    }
18
19
    public static function byClubId(string $id): GameCollection
20
    {
21
        $api = new self();
22
23
        $response = $api->call("OrgMatchesByGuid?issguid=" .  $id);
24
25
        return GameCollection::createFromArrayResponse($response);
26
    }
27
}
28
29
30