Completed
Push — master ( 0a5a8d...9acf59 )
by Vasily
06:59 queued 02:58
created

ExtFunc   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
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 13
rs 10
wmc 2
lcom 0
cbo 1

1 Method

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