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 ( ae3cb1...02c4f1 )
by Alexandru
12:25
created

Branches   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 33
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A all() 0 6 1
A get() 0 6 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\Repositories\Refs;
13
14
use Bitbucket\API;
15
16
/**
17
 * @author  Kevin Howe    <[email protected]>
18
 */
19
class Branches extends API\Api
20
{
21
    /**
22
     * Get a list of branches
23
     *
24
     * @access public
25
     * @param  string           $account The team or individual account owning the repository.
26
     * @param  string           $repo    The repository identifier.
27
     * @return MessageInterface
28
     */
29
    public function all($account, $repo)
30
    {
31
        return $this->getClient()->setApiVersion('2.0')->get(
32
            sprintf('repositories/%s/%s/refs/branches', $account, $repo)
33
        );
34
    }
35
36
    /**
37
     * Get an individual branch
38
     *
39
     * @access public
40
     * @param  string           $account   The team or individual account owning the repository.
41
     * @param  string           $repo      The repository identifier.
42
     * @param  string           $name      The branch identifier.
43
     * @return MessageInterface
44
     */
45
    public function get($account, $repo, $name)
46
    {
47
        return $this->getClient()->setApiVersion('2.0')->get(
48
            sprintf('repositories/%s/%s/refs/branches/%s', $account, $repo, $name)
49
        );
50
    }
51
}
52