InvalidSettingsRule   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A ruleNotFound() 0 5 1
1
<?php
2
3
namespace LaravelPropertyBag\Exceptions;
4
5
use Exception;
6
7
class InvalidSettingsRule extends Exception
8
{
9
    /**
10
     * Setting rule method can not be found.
11
     *
12
     * @param string $rule
13
     * @param string $method
14
     *
15
     * @return static
16
     */
17
    public static function ruleNotFound($rule, $method)
18
    {
19
        return new static(
20
            "Method {$method} for rule {$rule} not found. ".
21
            "Check rule spelling or create method {$method} in Rules.php."
22
        );
23
    }
24
}
25