Completed
Push — feature/fix-somescrutinizer-is... ( 03fa6a...7ccc0d )
by Narcotic
09:35
created

RqlOperatorNotAllowedException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * RqlOperatorNotAllowedException class file
4
 */
5
6
namespace Graviton\ExceptionBundle\Exception;
7
8
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
9
10
/**
11
 * RqlOperatorNotAllowed exception
12
 *
13
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
14
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
15
 * @link     http://swisscom.ch
16
 */
17
final class RqlOperatorNotAllowedException extends BadRequestHttpException implements RestExceptionInterface
18
{
19
    use RestExceptionTrait;
20
21
    /**
22
     * Constructor
23
     *
24
     * @param string $operator RQL operator
25
     */
26
    public function __construct($operator)
27
    {
28
        parent::__construct(sprintf('RQL operator "%s" is not allowed for this request', $operator));
29
    }
30
}
31