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 — master ( 39a550...af7430 )
by Alexandru
08:39 queued 10s
created

Branches   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 39
ccs 8
cts 8
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A all() 0 7 1
A get() 0 6 1
1
<?php
2
/**
3
 * This file is part of the bitbucket-api package.
4
 *
5
 * (c) Alexandru Guzinschi <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace Bitbucket\API\Repositories\Refs;
11
12
use Bitbucket\API;
13
use Buzz\Message\MessageInterface;
14
15
/**
16
 * @author  Kevin Howe    <[email protected]>
17
 */
18
class Branches extends API\Api
19
{
20
    /**
21
     * Get a list of branches
22
     *
23
     * @access public
24
     * @param  string           $account The team or individual account owning the repository.
25
     * @param  string           $repo    The repository identifier.
26
     * @param  string|array     $params  GET parameters
27
     * @return MessageInterface
28
     *
29
     * @throws \InvalidArgumentException
30
     */
31 2
    public function all($account, $repo, $params = array())
32
    {
33 2
        return $this->getClient()->setApiVersion('2.0')->get(
34 2
            sprintf('repositories/%s/%s/refs/branches', $account, $repo),
35
            $params
36 2
        );
37
    }
38
39
    /**
40
     * Get an individual branch
41
     *
42
     * @access public
43
     * @param  string           $account The team or individual account owning the repository.
44
     * @param  string           $repo    The repository identifier.
45
     * @param  string           $name    The branch identifier.
46
     * @return MessageInterface
47
     *
48
     * @throws \InvalidArgumentException
49
     */
50 1
    public function get($account, $repo, $name)
51
    {
52 1
        return $this->getClient()->setApiVersion('2.0')->get(
53 1
            sprintf('repositories/%s/%s/refs/branches/%s', $account, $repo, $name)
54 1
        );
55
    }
56
}
57