SocketException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 12
ccs 0
cts 4
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
/**
4
 * This file is a part of Woketo package.
5
 *
6
 * (c) Nekland <[email protected]>
7
 *
8
 * For the full license, take a look to the LICENSE file
9
 * on the root directory of this project
10
 */
11
12
namespace Nekland\Woketo\Exception;
13
14
class SocketException extends \Exception
15
{
16
    /**
17
     * SocketException constructor.
18
     * @param string   $message Error message
19
     * @param resource $socket  Socket experimenting the error.
20
     */
21
    public function __construct($message, $socket)
22
    {
23
        parent::__construct($message . ' (error: ' . \socket_strerror(\socket_last_error($socket)) . ')');
24
    }
25
}
26