Passed
Pull Request — master (#54)
by
unknown
10:07
created

MissingFieldException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMissingField() 0 3 1
A __construct() 0 9 1
1
<?php
2
3
namespace Swaggest\JsonDiff;
4
5
use Throwable;
6
7
class MissingFieldException extends Exception
8
{
9
    private string $missingField;
10
11
    public function __construct(
12
        string    $invalidOperation,
13
        string    $message = '',
14
        int       $code = 0,
15
        Throwable $previous = null
16
    )
17
    {
18
        parent::__construct($message, $code, $previous);
19
        $this->missingField = $invalidOperation;
20
    }
21
22
    public function getMissingField(): string
23
    {
24
        return $this->missingField;
25
    }
26
}
27