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.

User::permissions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 1
cts 1
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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