EndpointBuildingException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 20
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fromBuilder() 0 7 1
A getBuilder() 0 4 1
1
<?php
2
3
namespace hiapi\endpoints\Exception;
4
5
use hiapi\endpoints\EndpointBuilderInterface;
6
use hiapi\exceptions\ConfigurationException;
7
8
class EndpointBuildingException extends ConfigurationException
9
{
10
    /**
11
     * @var EndpointBuilderInterface|null
12
     */
13
    protected $builder;
14
15
    public static function fromBuilder(string $message, EndpointBuilderInterface $builder)
16
    {
17
        $self = new static($message);
18
        $self->builder = $builder;
19
20
        return $self;
21
    }
22
23
    public function getBuilder(): ?EndpointBuilderInterface
24
    {
25
        return $this->builder;
26
    }
27
}
28