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.

Members::delete()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
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\Groups;
13
14
use Bitbucket\API;
15
use Psr\Http\Message\ResponseInterface;
16
17
/**
18
 * Manage group members.
19
 *
20
 * @author  Alexandru G.    <[email protected]>
21
 * @see https://confluence.atlassian.com/bitbucket/groups-endpoint-296093143.html
22
 */
23
class Members extends API\Api
24
{
25
    /**
26
     * Get the group members
27
     *
28
     * @access public
29
     * @param  string           $account The team or individual account owning the repository.
30
     * @param  string           $repo    The repository identifier.
31
     * @return ResponseInterface
32 1
     */
33
    public function all($account, $repo)
34 1
    {
35 1
        return $this->getClient()->setApiVersion('1.0')->get(
36
            sprintf('/groups/%s/%s/members', $account, $repo)
37
        );
38
    }
39
40
    /**
41
     * Add new member into a group.
42
     *
43
     * @access public
44
     * @param  string           $account    The team or individual account owning the repository.
45
     * @param  string           $groupSlug  The slug of the group.
46
     * @param  string           $memberUuid An individual account.
47
     * @return ResponseInterface
48 1
     */
49
    public function add($account, $groupSlug, $memberUuid)
50 1
    {
51 1
        return $this->getClient()->setApiVersion('1.0')->put(
52
            sprintf('/groups/%s/%s/members/%s', $account, $groupSlug, $memberUuid)
53
        );
54
    }
55
56
    /**
57
     * Delete a member from group.
58
     *
59
     * @access public
60
     * @param  string           $account    The team or individual account owning the repository.
61
     * @param  string           $groupSlug  The slug of the group.
62
     * @param  string           $memberUuid An individual account.
63
     * @return ResponseInterface
64 1
     */
65
    public function delete($account, $groupSlug, $memberUuid)
66 1
    {
67 1
        return $this->getClient()->setApiVersion('1.0')->delete(
68
            sprintf('/groups/%s/%s/members/%s', $account, $groupSlug, $memberUuid)
69
        );
70
    }
71
}
72