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
Pull Request — develop ( #57 )
by
unknown
15:10
created

User   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
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 42
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 4 1
A repositories() 0 4 1
A emails() 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 Buzz\Message\MessageInterface;
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 MessageInterface
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
     * Get repositories
38
     *
39
     * @access public
40
     * @return User\Repositories
41
     *
42
     * @throws \InvalidArgumentException
43
     * @codeCoverageIgnore
44
     */
45 1
    public function repositories()
46
    {
47 1
        return $this->api('User\\Repositories');
48
    }
49
50
    /**
51
     * Retrieves the email for an authenticated user.
52
     *
53
     * @access public
54
     * @return MessageInterface
55
     *
56 1
     * @throws \InvalidArgumentException
57
     */
58 1
    public function emails()
59
    {
60
        return $this->getClient()->setApiVersion('2.0')->get('user/emails');
61
    }
62
}
63