Total Complexity | 8 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
12 | class Priorities extends AbstractApi |
||
13 | { |
||
14 | private $cache = null; |
||
15 | public function all() |
||
16 | { |
||
17 | if ($this->cache === null) { |
||
18 | $this->cache = $this->connector->send_get('get_priorities'); |
||
19 | } |
||
20 | return $this->cache; |
||
21 | } |
||
22 | |||
23 | public function findByName(string $name) |
||
24 | { |
||
25 | $priorities = $this->all(); |
||
26 | foreach ($priorities as $priority) { |
||
27 | if ($priority['name'] === $name) { |
||
28 | return $priority; |
||
29 | } |
||
30 | } |
||
31 | return []; |
||
32 | } |
||
33 | |||
34 | public function getDefaultPriority() { |
||
42 | } |
||
43 | } |