Security update for Core, with self-updated composer
[yaffs-website] / vendor / twig / twig / lib / Twig / Profiler / Dumper / Text.php
1 <?php
2
3 /*
4  * This file is part of Twig.
5  *
6  * (c) Fabien Potencier
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 /**
13  * @author Fabien Potencier <fabien@symfony.com>
14  *
15  * @final
16  */
17 class Twig_Profiler_Dumper_Text extends Twig_Profiler_Dumper_Base
18 {
19     protected function formatTemplate(Twig_Profiler_Profile $profile, $prefix)
20     {
21         return sprintf('%s└ %s', $prefix, $profile->getTemplate());
22     }
23
24     protected function formatNonTemplate(Twig_Profiler_Profile $profile, $prefix)
25     {
26         return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), $profile->getName());
27     }
28
29     protected function formatTime(Twig_Profiler_Profile $profile, $percent)
30     {
31         return sprintf('%.2fms/%.0f%%', $profile->getDuration() * 1000, $percent);
32     }
33 }
34
35 class_alias('Twig_Profiler_Dumper_Text', 'Twig\Profiler\Dumper\TextDumper', false);