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 ( 70f706...2c67db )
by Navarr
02:34
created

SocketException   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 86.67%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 27
ccs 13
cts 15
cp 0.8667
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 22 4
1
<?php
2
3
namespace Navarr\Socket\Exception;
4
5
class SocketException extends \Exception
6
{
7
    protected $message = 'Socket Exception';
8
9 2
    public function __construct($message = null)
10
    {
11 2
        if (!$message) {
12 1
            $errno = socket_last_error();
13 2
        } elseif (is_resource($message)) {
14 1
            $errno = socket_last_error($message);
15 1
        } else {
16
            parent::__construct((string) $message);
17
18
            return;
19
        }
20
21 2
        $error = socket_strerror($errno);
22
23 2
        parent::__construct($error, $errno);
24
25 2
        if (!$message) {
26 1
            socket_clear_error();
27 1
        } else {
28 1
            socket_clear_error($message);
29
        }
30 2
    }
31
}
32