Completed
Push — master ( 479b8e...e72ae9 )
by Richard
02:38
created

HTMLFormatter::debug()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
namespace Transphporm\Formatter;
3
class HTMLFormatter {
4
    private $templateFunction;
5
6
    public function __construct(\Transphporm\TSSFunction\Template $templateFunction) {
7
        $this->templateFunction = $templateFunction;
8
    }
9
10
    public function html($val) {
11
		return $this->templateFunction->run([$val]);
12
	}
13
14
	public function debug($val) {
15
		ob_start();
16
		var_dump($val);
17
		return $this->html('<pre>' . ob_get_clean() . '</pre>');
18
	}
19
}
20