MissingKeywordException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A buildMessage() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the JVal package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace JVal\Exception\Constraint;
11
12
use JVal\Context;
13
use JVal\Exception\ConstraintException;
14
15
class MissingKeywordException extends ConstraintException
16
{
17 2
    public function __construct(Context $context, $keyword)
18
    {
19 2
        parent::__construct($context, $keyword);
20 2
    }
21
22 2
    protected function buildMessage()
23
    {
24 2
        $this->message = sprintf('keyword %s must be present', $this->getTargetNode());
25 2
    }
26
}
27