Untransformable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A noTransformerFound() 0 4 1
A cannotTransformObject() 0 6 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