InvalidContentException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 3
crap 1
1
<?php
2
3
/*
4
 * This file is part of the kickbox-bundle Project.
5
 *
6
 * (c) Abdoul Ndiaye <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Andi\KickBoxBundle\Exception;
13
14
use Exception;
15
16
/**
17
 * Class InvalidContentException
18
 *
19
 * @author Abdoul Ndiaye <[email protected]>
20
 */
21
class InvalidContentException extends \InvalidArgumentException
22
{
23
    const MESSAGE = 'The expected parameters are missing. Parameters : ';
24
25
    /**
26
     * {@inheritdoc}
27
     */
28 2
    public function __construct(array $expectedParameters, $code = 0, Exception $previous = null)
29
    {
30 2
        $message = self::MESSAGE . implode(', ', $expectedParameters);
31
32 2
        parent::__construct($message, $code, $previous);
33 2
    }
34
}
35