FilterException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A syntaxError() 0 4 1
A filterError() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the tmilos/scim-filter-parser package.
5
 *
6
 * (c) Milos Tomic <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Tmilos\ScimFilterParser\Error;
13
14
class FilterException extends \RuntimeException
15
{
16
    /**
17
     * @param string     $message
18
     * @param \Exception $previous
19
     *
20
     * @return FilterException
21
     */
22
    public static function syntaxError($message, $previous = null)
23
    {
24
        return new static('[Syntax Error] '.$message, 0, $previous);
25
    }
26
27
    /**
28
     * @param string $message
29
     *
30
     * @return FilterException
31
     */
32
    public static function filterError($message)
33
    {
34
        return new static($message);
35
    }
36
}
37