Completed
Push — master ( e22f7e...4537c6 )
by Evgenij
06:03
created

RecvDataException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 8 8 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
/**
3
 * Async sockets
4
 *
5
 * @copyright Copyright (c) 2015-2017, Efimov Evgenij <[email protected]>
6
 *
7
 * This source file is subject to the MIT license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
namespace AsyncSockets\Exception;
11
12
use AsyncSockets\Socket\SocketInterface;
13
14
/**
15
 * Class RecvDataException. Thrown any time there is error during data receiving process
16
 */
17 View Code Duplication
class RecvDataException extends TransferException
18
{
19
    /**
20
     * @inheritDoc
21
     */
22 1
    public function __construct(
23
        SocketInterface $socket,
24
        $message = '',
25
        $code = 0,
26
        \Exception $previous = null
27
    ) {
28 1
        parent::__construct($socket, self::DIRECTION_RECV, $message, $code, $previous);
29 1
    }
30
}
31