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

InvalidReferenceValue   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 9
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
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
}