Failed Conditions
Pull Request — 0.3 (#20)
by jean
12:27
created

StopwatchHtmlDumper::dump()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: darkilliant
5
 * Date: 6/23/18
6
 * Time: 6:10 PM
7
 */
8
9
namespace Darkilliant\ProcessBundle\StopwatchDumper;
10
11
12
use Symfony\Component\Stopwatch\Stopwatch;
13
14
class StopwatchHtmlDumper
15
{
16
    public function dump(Stopwatch $stopwatch, string $filepath)
17
    {
18
        ob_start();
19
        require_once __DIR__.'/../Resources/views/profiling.html.php';
20
        $html = ob_get_clean();
21
22
        file_put_contents($filepath, $html);
23
    }
24
}