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 ( 004669...d25c83 )
by Samuel
05:45
created

ServiceFactory::getService()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4286
cc 1
eloc 3
nc 1
nop 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 $endpointUrl;
14
15
    public function __construct($endpointUrl)
16
    {
17
        $this->endpointUrl = $endpointUrl;
18
    }
19
20
    public function getService($name)
21
    {
22
        $classname = "\\LinusShops\\CanadaPost\\Services\{$name}";
23
        return new $classname();
24
    }
25
}
26