GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — develop ( 8a8614...a2e4fd )
by Samuel
12:30 queued 02:11
created

ServiceFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 87.5%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getService() 0 5 1
1
<?php
2
namespace LinusShops\CanadaPost;
3
/**
4
 *
5
 *
6
 * @author Sam Schmidt <[email protected]>
7
 * @since 2015-12-09
8
 * @company Linus Shops
9
 */
10
11
class ServiceFactory
12
{
13
    private $baseUrl;
14
    private $userid;
15
    private $password;
16
17 4
    public function __construct($baseUrl, $userid, $password)
18
    {
19 4
        $this->baseUrl = $baseUrl;
20 4
        $this->userid = $userid;
21 4
        $this->password = $password;
22 4
    }
23
24 4
    public function getService($name)
25
    {
26 4
        $classname = "\\LinusShops\\CanadaPost\\Services\\{$name}";
27
        return new $classname($this->baseUrl, $this->userid, $this->password);
28
    }
29
}
30