Untransformable::noTransformerFound()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Spatie\BladeJavaScript\Exceptions;
4
5
use Exception;
6
7
class Untransformable extends Exception
8
{
9
    /**
10
     * @param mixed $value
11
     *
12
     * @return static
13
     */
14
    public static function noTransformerFound($value)
15
    {
16
        return new static("There is no transformer to transform {$value} to JavaScript.");
17
    }
18
19
    /**
20
     * @param mixed $object
21
     *
22
     * @return static
23
     */
24
    public static function cannotTransformObject($object)
25
    {
26
        $objectString = print_r($object, true);
27
28
        return new static("Cannot transform object {$objectString} to JavaScript.");
29
    }
30
}
31