Notification Setup Error

We have detected an error in your notification set-up (Event-ID dab39dc24f564ec7bd4628d1305fd03c). Currently, we cannot inform you about inspection progress. Please check that the user 557058:bca11929-8c2d-43f2-8a82-c5416880d395 still has access to your repository or update the API account.

Completed
Push — develop ( 87d9d9...44a884 )
by
unknown
57:42 queued 42:42
created

User   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 37
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 4 1
A emails() 0 4 1
A permissions() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the bitbucket-api package.
5
 *
6
 * (c) Alexandru G. <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Bitbucket\API;
13
14
use Psr\Http\Message\ResponseInterface;
15
16
/**
17
 * Manages the currently authenticated account profile.
18
 *
19
 * @author  Alexandru G.    <[email protected]>
20
 */
21
class User extends Api
22
{
23
    /**
24
     * Get user profile
25
     *
26
     * @access public
27
     * @return ResponseInterface
28
     *
29
     * @throws \InvalidArgumentException
30
     */
31 1
    public function get()
32
    {
33 1
        return $this->getClient()->setApiVersion('2.0')->get('/user/');
34
    }
35
36
    /**
37
     * Retrieves the email for an authenticated user.
38
     *
39
     * @access public
40
     * @return ResponseInterface
41
     *
42
     * @throws \InvalidArgumentException
43
     */
44
    public function emails()
45 1
    {
46
        return $this->getClient()->setApiVersion('2.0')->get('/user/emails');
47 1
    }
48
49
    /**
50
     * @return User\Permissions
51
     * @throws \InvalidArgumentException
52
     */
53
    public function permissions()
54
    {
55
        return $this->api(User\Permissions::class);
56 1
    }
57
}
58