InputService   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getInput() 0 4 1
1
<?php
2
3
/**
4
 * InputService.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
 * Input service
15
 *
16
 * @package Kocuj\Di\Examples\Example1\Lib
17
 */
18
class InputService implements InputServiceInterface
19
{
20
    /**
21
     * Constructor
22
     */
23
    public function __construct()
24
    {
25
        // display information
26
        echo 'InputService created' . PHP_EOL;
27
    }
28
29
    /**
30
     * Get input
31
     *
32
     * @return string Input string
33
     * @see \Kocuj\Di\Examples\Example1\Lib\InputServiceInterface::getInput()
34
     */
35
    public function getInput(): string
36
    {
37
        // exit
38
        return 'This is test of input in example class.';
39
    }
40
}
41