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 ( 44a884...bcb253 )
by
unknown
79:30 queued 64:45
created

Permissions   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 42
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A all() 0 6 1
A repositories() 0 6 1
A repository() 0 6 1
1
<?php
2
3
namespace Bitbucket\API\Teams;
4
5
use Bitbucket\API\Api;
6
use Psr\Http\Message\ResponseInterface;
7
8
class Permissions extends Api
9
{
10
    /**
11
     * Get the highest permissions for every member of the team
12
     *
13
     * @param string $team The team's name or uuid.
14
     * @return ResponseInterface
15
     */
16
    public function all($team)
17
    {
18
        return $this->getClient()->setApiVersion('2.0')->get(
19
            sprintf('/teams/%s/permissions', $team)
20
        );
21
    }
22
23
    /**
24
     * Get the permissions of every member for every repository of the team
25
     *
26
     * @param string $team The team's name or uuid.
27
     * @return ResponseInterface
28
     */
29
    public function repositories($team)
30
    {
31
        return $this->getClient()->setApiVersion('2.0')->get(
32
            sprintf('/teams/%s/permissions/repositories', $team)
33
        );
34
    }
35
36
    /**
37
     * Get the permissions of every member for every repository of the team
38
     *
39
     * @param string $team The team's name or uuid.
40
     * @param string $repo The repository identifier.
41
     * @return ResponseInterface
42
     */
43
    public function repository($team, $repo)
44
    {
45
        return $this->getClient()->setApiVersion('2.0')->get(
46
            sprintf('/teams/%s/permissions/repositories/%s', $team, $repo)
47
        );
48
    }
49
}
50