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 ( #60 )
by
unknown
27:23 queued 12:26
created

Src::raw()   A

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 4
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\Repositories;
13
14
use Bitbucket\API;
15
use Buzz\Message\MessageInterface;
16
17
/**
18
 * Allows you to browse directories and view files.
19
 *
20
 * NOTE: This is read-only!
21
 *
22
 * @author  Alexandru G.    <[email protected]>
23
 */
24
class Src extends API\Api
25
{
26
    /**
27
     * Get a list of repo source
28
     *
29
     * @access public
30
     * @param  string           $account  The team or individual account owning the repository.
31
     * @param  string           $repo     The repository identifier.
32
     * @param  string           $revision A value representing the revision or branch to list.
33
     * @param  string           $path     The path can be a filename or a directory path.
34
     * @return MessageInterface
35
     */
36 2
    public function get($account, $repo, $revision, $path)
37
    {
38 2
        return $this->requestGet(
39 2
            sprintf('repositories/%s/%s/src/%s/%s', $account, $repo, $revision, $path)
40
        );
41
    }
42
43
    /**
44
     * Get raw content of an individual file
45
     *
46
     * @access public
47
     * @param  string           $account  The team or individual account owning the repository.
48
     * @param  string           $repo     The repository identifier.
49
     * @param  string           $revision A value representing the revision or branch to list.
50
     * @param  string           $path     The path can be a filename or a directory path.
51
     * @return MessageInterface
52
     */
53
    public function raw($account, $repo, $revision, $path)
54 3
    {
55
        return $this->requestGet(
56
            sprintf('repositories/%s/%s/raw/%s/%s', $account, $repo, $revision, $path)
57 3
        );
58
    }
59
}
60