Passed
Pull Request — master (#55)
by
unknown
08:16
created

MissingFieldException::getOperationObject()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Swaggest\JsonDiff;
4
5
use Throwable;
6
7
class MissingFieldException extends Exception
8
{
9
    private string $missingField;
10
    private object $operationObject;
11
12
    public function __construct(
13
        string    $missingField,
14
        object    $operationObject,
15
        string    $message = '',
16
        int       $code = 0,
17
        Throwable $previous = null
18
    )
19
    {
20
        parent::__construct($message, $code, $previous);
21
        $this->missingField = $missingField;
22
        $this->operationObject = $operationObject;
23
    }
24
25
    public function getMissingField(): string
26
    {
27
        return $this->missingField;
28
    }
29
30
    public function getOperationObject(): object
31
    {
32
        return $this->operationObject;
33
    }
34
}
35