Result   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A isValid() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Phypes\Result;
4
5
use Phypes\Error\Error;
6
7
abstract class Result
8
{
9
    private $valid;
10
    protected $errors = [];
11
12
    public function __construct(bool $valid, Error... $errors)
13
    {
14
        $this->valid = $valid;
15
        $this->errors = $errors;
16
    }
17
18
    public function isValid() : bool
19
    {
20
        return $this->valid;
21
    }
22
}