InvalidModificationArgument::targetNotAllowed()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace LaravelLangBundler\Exceptions;
4
5
use Exception;
6
7
class InvalidModificationArgument extends Exception
8
{
9
    /**
10
     * Invalid target passed.
11
     *
12
     * @param string $target
13
     *
14
     * @return static
15
     */
16
    public static function targetNotAllowed($target)
17
    {
18
        return new static(
19
            "Target {$target} is not allowed. ".
20
            "Allowed targets are 'key', 'value', and 'both'."
21
        );
22
    }
23
24
    /**
25
     * Invalid classname passed.
26
     *
27
     * @param string $className
28
     *
29
     * @return static
30
     */
31
    public static function modifcationClassNotFound($className)
32
    {
33
        return new static("Class {$className} can not be found.");
34
    }
35
}
36