Completed
Push — fetcher_factories ( ec83ea...40fc6e )
by David
08:11
created

SplashMissingParameterException::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
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