Completed
Push — master ( e57500...6b1ea1 )
by Michael
05:04
created

CodebaseClient   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTicketsFromIds() 0 4 1
A updateTicketStatus() 0 4 1
A registerDeployment() 0 4 1
1
<?php
2
3
namespace ParityBit\DeploymentNotifier\Clients;
4
5
use ParityBit\DeploymentNotifier\Deployment;
6
7
class CodebaseClient
8
{
9
    protected $username;
10
	protected $password;
11
	protected $headers = [
12
        'Accept: application/xml',
13
        'Content-type: application/xml',
14
    ];
15
16
	const endpoint = 'http://api3.codebasehq.com/';
17
18
    public function __construct($username, $password)
19
    {
20
        $this->username = $username;
21
        $this->password = $password;
22
    }
23
24
    public function getTicketsFromIds($ticketIds = [])
0 ignored issues
show
Unused Code introduced by
The parameter $ticketIds is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
25
    {
26
27
    }
28
29
    public function updateTicketStatus($project, $ticketId, $newStatus)
0 ignored issues
show
Unused Code introduced by
The parameter $project is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $ticketId is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $newStatus is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
30
    {
31
32
    }
33
34
    public function registerDeployment(Deployment $deployment)
0 ignored issues
show
Unused Code introduced by
The parameter $deployment is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
35
    {
36
37
    }
38
}
39