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 — master ( bf4402...8854eb )
by François
07:55
created

PoolConfig::getProcessCount()   C

Complexity

Conditions 10
Paths 10

Size

Total Lines 23
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 5.6534
c 0
b 0
f 0
cc 10
eloc 18
nc 10
nop 0

How to fix   Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
/**
3
 *  Copyright (C) 2016 SURFnet.
4
 *
5
 *  This program is free software: you can redistribute it and/or modify
6
 *  it under the terms of the GNU Affero General Public License as
7
 *  published by the Free Software Foundation, either version 3 of the
8
 *  License, or (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Affero General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Affero General Public License
16
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 */
18
namespace SURFnet\VPN\Server;
19
20
use SURFnet\VPN\Common\Config;
21
22
class PoolConfig extends Config
23
{
24
    public static function defaultConfig()
25
    {
26
        return [
27
            'defaultGateway' => false,
28
            'routes' => [],
29
            'dns' => [],
30
            'useNat' => false,
31
            'twoFactor' => false,
32
            'clientToClient' => false,
33
            'listen' => '0.0.0.0',
34
            'enableLog' => false,
35
            'enableAcl' => false,
36
            'aclGroupList' => [],
37
            'blockSmb' => false,
38
            'forward6' => true,
39
        ];
40
    }
41
42
    public function toArray()
43
    {
44
        return $this->configData;
0 ignored issues
show
Bug introduced by
The property configData cannot be accessed from this context as it is declared private in class SURFnet\VPN\Common\Config.

This check looks for access to properties that are not accessible from the current context.

If you need to make a property accessible to another context you can either raise its visibility level or provide an accessible getter in the defining class.

Loading history...
45
    }
46
}
47