Passed
Pull Request — master (#69)
by Dave
02:36
created

InvalidContentTypeException::notJson()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Static Analysis Results Baseliner (sarb).
5
 *
6
 * (c) Dave Liddament
7
 *
8
 * For the full copyright and licence information please view the LICENSE file distributed with this source code.
9
 */
10
11
declare(strict_types=1);
12
13
namespace DaveLiddament\StaticAnalysisResultsBaseliner\Domain\File;
14
15
use DaveLiddament\StaticAnalysisResultsBaseliner\Domain\Common\SarbException;
16
17
/**
18
 * Used for when data supplied is not the correct content type.
19
 *
20
 * E.g. JSON was expected, but representation of data could not be converted to JSON.
21
 */
22
class InvalidContentTypeException extends SarbException
23
{
24
    public static function notJson(): self
25
    {
26
        return new self('Not valid JSON');
27
    }
28
}
29