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
Pull Request — master (#16)
by Navarr
16:40 queued 14:40
created

SocketException   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 86.67%

Importance

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

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
    /**
10
     * SocketException constructor.
11
     *
12
     * @param string|resource|null $message Provide a resource instead of a message to use the socket_last_error as the
13
     *                                      message
14
     */
15 2
    public function __construct($message = null)
16
    {
17 2
        if (!$message) {
18 1
            $errno = socket_last_error();
19 2
        } elseif (is_resource($message)) {
20 1
            $errno = socket_last_error($message);
21 1
        } else {
22
            parent::__construct((string) $message);
23
24
            return;
25
        }
26
27 2
        $error = socket_strerror($errno);
28
29 2
        parent::__construct($error, $errno);
30
31 2
        if (!$message) {
32 1
            socket_clear_error();
33 1
        } else {
34 1
            socket_clear_error($message);
35
        }
36 2
    }
37
}
38