DynamicRouter   A
last analyzed

Coupling/Cohesion

Components 1
Dependencies 3

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 26
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A execute() 0 6 1
A pathPrefix() 0 4 1
1
<?php
2
3
namespace League\CLImate\TerminalObject\Router;
4
5
use League\CLImate\Util\OutputImporter;
6
7
class DynamicRouter extends BaseRouter
8
{
9
    use OutputImporter;
10
11
    /**
12
     * @return string
13
     */
14 236
    public function pathPrefix()
15
    {
16 236
        return 'Dynamic';
17
    }
18
19
    /**
20
     * Execute a dynamic terminal object using given arguments
21
     *
22
     * @param \League\CLImate\TerminalObject\Dynamic\DynamicTerminalObject $obj
23
     *
24
     * @return \League\CLImate\TerminalObject\Dynamic\DynamicTerminalObject
25
     */
26 224
    public function execute($obj)
27
    {
28 224
        $obj->output($this->output);
29
30 224
        return $obj;
31
    }
32
}
33