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

RqlOperatorNotAllowedException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
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