Passed
Push — main ( ef112d...d39948 )
by Pieter
03:42
created

InvalidReferenceValue::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
4
namespace Apie\OpenapiSchema\Exceptions;
5
6
7
use Apie\Core\Exceptions\ApieException;
8
9
class InvalidReferenceValue extends ApieException
10
{
11
    public function __construct(string $ref)
12
    {
13
        parent::__construct(
14
            500,
15
            sprintf(
16
                'A reference used in an OpenAPI spec should only reference items in #/components, "%s" is not valid',
17
                $ref
18
            )
19
        );
20
    }
21
}