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

StopwatchHtmlDumper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A dump() 0 7 1
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
}