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.

Steps   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 52
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A all() 0 6 1
A get() 0 6 1
A log() 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\Pipelines;
13
14
use Bitbucket\API;
15
use Psr\Http\Message\ResponseInterface;
16
17
/**
18
 * Manage the steps of a pipeline.
19
 *
20
 * @author Marco Veenendaal    <[email protected]>
21
 */
22
class Steps extends API\Api
23
{
24
    /**
25
     * Get a list of all pipeline steps
26
     *
27
     * @access public
28
     * @param  string           $account         The team or individual account owning the repository.
29
     * @param  string           $repo            The repository identifier.
30
     * @param  string           $pipelineUuid    UUID of the pipeline.
31
     * @return ResponseInterface
32
     */
33 1
    public function all($account, $repo, $pipelineUuid)
34
    {
35 1
        return $this->getClient()->setApiVersion('2.0')->get(
36 1
            sprintf('/repositories/%s/%s/pipelines/%s/steps/', $account, $repo, $pipelineUuid)
37
        );
38
    }
39
40
    /**
41
     * Get an individual pipeline step
42
     *
43
     * @access public
44
     * @param  string           $account        The team or individual account owning the repository.
45
     * @param  string           $repo           The repository identifier.
46
     * @param  string           $pipelineUuid   UUID of the pipeline.
47
     * @param  string           $stepUuid       UUID of the step.
48
     * @return ResponseInterface
49
     */
50 1
    public function get($account, $repo, $pipelineUuid, $stepUuid)
51
    {
52 1
        return $this->getClient()->setApiVersion('2.0')->get(
53 1
            sprintf('/repositories/%s/%s/pipelines/%s/steps/%s', $account, $repo, $pipelineUuid, $stepUuid)
54
        );
55
    }
56
57
    /**
58
     * Get the log of an individual pipeline step
59
     *
60
     * @access public
61
     * @param  string           $account        The team or individual account owning the repository.
62
     * @param  string           $repo           The repository identifier.
63
     * @param  string           $pipelineUuid   UUID of the pipeline.
64
     * @param  string           $stepUuid       UUID of the step.
65
     * @return ResponseInterface
66
     */
67 1
    public function log($account, $repo, $pipelineUuid, $stepUuid)
68
    {
69 1
        return $this->getClient()->setApiVersion('2.0')->get(
70 1
            sprintf('/repositories/%s/%s/pipelines/%s/steps/%s/log', $account, $repo, $pipelineUuid, $stepUuid)
71
        );
72
    }
73
}
74