UsersRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A me() 0 3 1
A getAll() 0 3 1
1
<?php
2
3
namespace Guapa\TimeChimp;
4
5
class UsersRequest extends AbstractRequest
6
{
7
    /**
8
     * Get all users.
9
     *
10
     * @see https://timechimp.docs.apiary.io/#reference/users/v1users/get-all-users
11
     *
12
     * @return \Psr\Http\Message\ResponseInterface
13
     * @throws \Guapa\TimeChimp\Exceptions\ClientException
14
     * @throws \Guapa\TimeChimp\Exceptions\NotFoundException
15
     * @throws \Guapa\TimeChimp\Exceptions\UnauthorizedException
16
     * @throws \GuzzleHttp\Exception\GuzzleException
17
     */
18
    public function getAll(): \Psr\Http\Message\ResponseInterface
19
    {
20
        return $this->execute('get', 'users');
21
    }
22
23
    /**
24
     * Get the current user.
25
     *
26
     * @see https://timechimp.docs.apiary.io/#reference/users/v1usersme/get-current-user
27
     *
28
     * @return \Psr\Http\Message\ResponseInterface
29
     * @throws \Guapa\TimeChimp\Exceptions\ClientException
30
     * @throws \Guapa\TimeChimp\Exceptions\NotFoundException
31
     * @throws \Guapa\TimeChimp\Exceptions\UnauthorizedException
32
     * @throws \GuzzleHttp\Exception\GuzzleException
33
     */
34
    public function me(): \Psr\Http\Message\ResponseInterface
35
    {
36
        return $this->execute('get', 'users/me');
37
    }
38
}
39