OutputService   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 23
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A displayOutput() 0 6 1
A __construct() 0 4 1
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