SplashMissingParameterException::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace Mouf\Mvc\Splash\Exception;
4
5
/**
6
 * Exception thrown when a parameter should have been present in the query but is not available.
7
 *
8
 * @author David Negrier
9
 */
10
class SplashMissingParameterException extends BadRequestException
11
{
12
    public $key;
13
14
    public static function create($key)
15
    {
16
        $exception = new self('Missing parameter: '.$key, 400);
17
        $exception->key = $key;
18
19
        return $exception;
20
    }
21
}
22