GuildsResource::get()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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