Total Complexity | 8 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class DebugDataProvider { |
||
13 | /** |
||
14 | * Container. |
||
15 | * |
||
16 | * @var Container |
||
17 | */ |
||
18 | protected $container = null; |
||
19 | |||
20 | /** |
||
21 | * Constructor. |
||
22 | * |
||
23 | * @param Container $container |
||
24 | */ |
||
25 | public function __construct( $container ) { |
||
26 | $this->container = $container; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Convert a value to a scalar representation. |
||
31 | * |
||
32 | * @param mixed $value |
||
33 | * @return mixed |
||
34 | */ |
||
35 | public function toScalar( $value ) { |
||
36 | $type = gettype( $value ); |
||
37 | |||
38 | if ( ! is_scalar( $value ) ) { |
||
39 | $value = '(' . $type . ')' . ( $type === 'object' ? ' ' . get_class( $value ) : '' ); |
||
40 | } |
||
41 | |||
42 | return $value; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Return pritable data about the current route. |
||
47 | * |
||
48 | * @param \Whoops\Exception\Inspector $inspector |
||
49 | * @return array<string, mixed> |
||
50 | */ |
||
51 | public function route( $inspector ) { |
||
73 | } |
||
74 | } |
||
75 |