BooleanNode   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 12
wmc 2
lcom 0
cbo 2
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A validateType() 0 6 2
1
<?php
2
/*
3
 * This file is part of the Borobudur-Config package.
4
 *
5
 * (c) Hexacodelabs <http://hexacodelabs.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Borobudur\Config\Definition;
12
13
use Borobudur\Config\Exception\InvalidTypeException;
14
15
/**
16
 * @author      Iqbal Maulana <[email protected]>
17
 * @created     8/10/15
18
 */
19
class BooleanNode extends ScalarNode
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    protected function validateType($value)
25
    {
26
        if (!is_bool($value)) {
27
            throw InvalidTypeException::invalidExpectedType($this->getPath(), 'boolean', $value);
28
        }
29
    }
30
}
31