OutputService::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
/**
4
 * OutputService.php
5
 *
6
 * @author Dominik Kocuj
7
 * @license https://opensource.org/licenses/MIT The MIT License
8
 * @copyright Copyright (c) 2017-2018 kocuj.pl
9
 */
10
11
namespace Kocuj\Di\Examples\Example1\Lib;
12
13
/**
14
 * Output service
15
 *
16
 * @package Kocuj\Di\Examples\Example1\Lib
17
 */
18
class OutputService implements OutputServiceInterface
19
{
20
    /**
21
     * Constructor
22
     */
23
    public function __construct()
24
    {
25
        // display information
26
        echo 'OutputService created' . PHP_EOL;
27
    }
28
29
    /**
30
     * Display output string
31
     *
32
     * @param string $output String to display
33
     * @see \Kocuj\Di\Examples\Example1\Lib\OutputServiceInterface::displayOutput()
34
     */
35
    public function displayOutput(string $output)
36
    {
37
        // display output
38
        echo 'Test output: ';
39
        echo $output;
40
        echo PHP_EOL;
41
    }
42
}
43