Completed
Push — master ( a856af...f9d8c6 )
by Freek
02:03
created

Untransformable::noTransformerFound()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
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