Completed
Push — master ( 104e68...b4839f )
by Maxime
12s
created

TooBigFrameException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 25
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getMaxLength() 0 4 1
1
<?php
2
/**
3
 * This file is a part of Woketo package.
4
 *
5
 * (c) Nekland <[email protected]>
6
 *
7
 * For the full license, take a look to the LICENSE file
8
 * on the root directory of this project
9
 */
10
11
namespace Nekland\Woketo\Exception\Frame;
12
13
use Exception;
14
use Nekland\Woketo\Exception\LimitationException;
15
16
class TooBigFrameException extends LimitationException
17
{
18
    /**
19
     * @var int
20
     */
21
    private $maxLength;
22
23
    /**
24
     * @param int $maxLength
25
     * @param string $message
26
     */
27 13
    public function __construct(int $maxLength, string $message = 'The frame is too big to be processed.')
28
    {
29 13
        parent::__construct($message, null, null);
30 13
        $this->maxLength = $maxLength;
31 13
    }
32
33
    /**
34
     * @return int
35
     */
36 10
    public function getMaxLength()
37
    {
38 10
        return $this->maxLength;
39
    }
40
}
41