Total Complexity | 4 |
Total Lines | 74 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
19 | class NullDebugger implements |
||
20 | DebuggerInterface, |
||
21 | DebuggerBarInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var object |
||
25 | */ |
||
26 | private $dummy; |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | public function dump($subject) |
||
32 | { |
||
33 | $this->dummy or $this->initDummy(); |
||
34 | return $this->dummy; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | public function timer($name = null) |
||
41 | { |
||
42 | $this->dummy or $this->initDummy(); |
||
43 | return $this->dummy; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function setBarPanel(PanelInterface $panel = null, $id = null) |
||
50 | { |
||
51 | return; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function setBarInfo(string $label, $value) |
||
58 | { |
||
59 | return; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * Initialize dummy object |
||
64 | */ |
||
65 | private function initDummy() |
||
66 | { |
||
67 | $this->dummy = new class { |
||
68 | public function __call($name, $arguments) |
||
72 | }; |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | * @deprecated use dump() instead, now it returns stringable object |
||
78 | */ |
||
79 | public function dumpStr($subject) |
||
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | * @deprecated use dump() instead, now it returns object |
||
87 | */ |
||
88 | public function barDump($subject, $title = null, array $options = null) |
||
92 | } |
||
93 |