Completed
Pull Request — master (#243)
by Дмитрий
05:05
created

Boolean   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A humanToPlain() 0 4 1
1
<?php
2
namespace PHPDaemon\Config\Entry;
3
4
use PHPDaemon\Config\Entry\Generic;
5
6
/**
7
 * Boolean config entry
8
 *
9
 * @package    Core
10
 * @subpackage Config
11
 *
12
 * @author     Vasily Zorin <[email protected]>
13
 */
14
class Boolean extends Generic
15
{
16
    /**
17
     * Converts human-readable value to plain
18
     * @param $value
19
     * @return bool
20
     */
21
    public static function humanToPlain($value)
22
    {
23
        return (boolean)$value;
24
    }
25
}
26