GuildsResource   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 6 1
1
<?php
2
3
namespace Igorsgm\TibiaDataApi\Resources;
4
5
use Igorsgm\TibiaDataApi\Response\GuildsResponse;
6
7
/**
8
 * @see https://tibiadata.com/doc-api-v2/characters/
9
 */
10
class GuildsResource extends AbstractResource
11
{
12
    /**
13
     * @param  string  $server
14
     * @return GuildsResponse
15
     * @throws \GuzzleHttp\Exception\GuzzleException
16
     * @throws \Igorsgm\TibiaDataApi\Exceptions\NotFoundException
17
     * @throws \Igorsgm\TibiaDataApi\Exceptions\ImmutableException
18
     */
19
    public function get(string $server): GuildsResponse
20
    {
21
        $response = $this->sendRequest('GET', "guilds/{$server}.json");
22
23
        return new GuildsResponse($response);
24
    }
25
}
26