Completed
Push — master ( 69ed36...4b8ba8 )
by BruceScrutinizer
02:06
created

ErrorResult   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getType() 0 3 1
A get() 0 3 1
1
<?php
2
3
namespace NamespaceProtector\Result;
4
5
final class ErrorResult implements ResultInterface
6
{
7
    /** @var string  */
8
    private $value;
0 ignored issues
show
introduced by
The private property $value is not used, and could be removed.
Loading history...
9
10
    /** @var int  */
11
    private $type;
12
13
    /** @var int */
14
    private $line;
15
16
    /** @var string */
17
    private $use; 
18
19
20
    public function __construct(int $line, string $use,int $type)
21
    {
22
        $this->line =  $line;
23
        $this->use = $use;
24
        $this->type = $type;
25
    }
26
27
    public function get(): String
28
    {
29
        return \Safe\sprintf("\t > ERROR Line: %d of use %s ",$this->line,$this->use);
30
    }
31
32
    public function getType(): int
33
    {
34
        return $this->type;
35
    }
36
}
37