Output   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A displayData() 0 4 1
1
<?php
2
/*
3
 * This file is part of the phpflo/phpflo package.
4
 *
5
 * (c) Henri Bergius <[email protected]>
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 PhpFlo\Component;
12
13
use PhpFlo\Component;
14
15
/**
16
 * Class Output
17
 *
18
 * @package PhpFlo\Component
19
 * @author Henri Bergius <[email protected]>
20
 */
21
class Output extends Component
22
{
23
    public function __construct()
24
    {
25
        $this->inPorts()->add('in', ['datatype' => 'all', 'addressable' => true]);
26
        $this->inPorts()->in->on('data', [$this, 'displayData']);
27
    }
28
29
    /**
30
     * @param mixed $data
31
     */
32
    public function displayData($data)
33
    {
34
        echo "{$data}\n";
35
    }
36
}
37