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.
Passed
Pull Request — master (#1061)
by Maxim
04:23 queued 01:35
created

ClusterFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 60%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 5 1
A __construct() 0 3 1
1
<?php
2
/* (c) Anton Medvedev <[email protected]>
3
 *
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Deployer\Cluster;
9
10
use Deployer\Deployer;
11
12
/**
13
 * Cluster Factory
14
 * Creates and return an instance of \Deployer\Cluster\Cluster
15
 *
16
 * @author Irfan Durmus (http://github.com/irfan) <[email protected]>
17
 */
18
class ClusterFactory
19
{
20
    /**
21
     * This class should not be initialized,
22
     * so set the __construct as private
23
     */
24
    private function __construct()
25
    {
26
    }
27
28
    /**
29
     * @param \Deployer\Deployer $deployer
30
     * @param string $name
31
     * @param array $nodes
32
     * @param int $port
33
     *
34
     * @return \Deployer\Cluster\Cluster
35
     */
36 3
    public static function create(Deployer $deployer, $name, $nodes, $port = 22)
37
    {
38 3
        $cluster = new Cluster($deployer, $name, $nodes, $port);
39 3
        return $cluster;
40
    }
41
}
42