Avatars   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 17
ccs 0
cts 4
cp 0
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A find() 0 6 2
1
<?php
2
3
namespace SchoppAx\Sleeper\Api;
4
5
class Avatars
6
{
7
8
    /**
9
     * @param string $avatarId
10
     * @param bool[optional] $thumbnail
11
     *
12
     * @return string image link for each avatar
13
     * @throws ClientException if status code <> 200
14
     * @throws Exception if response body equals null
15
     */
16
    public function find(string $avatarId, bool $thumbnail = false)
17
    {
18
      if ($thumbnail) {
19
        $avatarId = 'thumbs/'. $avatarId;
20
      }
21
      return 'https://sleepercdn.com/avatars/'. $avatarId;
22
    }
23
}
24