Configured::configure()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 3
eloc 3
c 1
b 0
f 1
nc 3
nop 1
dl 0
loc 6
rs 10
1
<?php
2
/**
3
 * Based configure
4
 *
5
 * User: moyo
6
 * Date: 2018/5/24
7
 * Time: 10:24 PM
8
 */
9
10
namespace Carno\Console\Chips\Based;
11
12
use Carno\Console\Configure;
13
14
trait Configured
15
{
16
    /**
17
     * @param Configure $conf
18
     */
19
    final public function configure(Configure $conf) : void
20
    {
21
        // invoking all options[xx]
22
        foreach (get_class_methods($this) as $method) {
23
            if (substr($method, 0, 7) === 'options') {
24
                $this->$method($conf);
25
            }
26
        }
27
    }
28
}
29