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

TooBigFrameException::getMaxLength()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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