Update Twig to v2.15.4

This commit is contained in:
slawkens
2023-02-02 10:37:45 +01:00
parent e552bcfe82
commit 130f7ba405
309 changed files with 3802 additions and 4005 deletions

View File

@@ -31,7 +31,7 @@ abstract class BaseDumper
abstract protected function formatTime(Profile $profile, $percent);
private function dumpProfile(Profile $profile, $prefix = '', $sibling = false)
private function dumpProfile(Profile $profile, $prefix = '', $sibling = false): string
{
if ($profile->isRoot()) {
$this->root = $profile->getDuration();

View File

@@ -15,10 +15,8 @@ use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class BlackfireDumper
final class BlackfireDumper
{
public function dump(Profile $profile)
{
@@ -42,7 +40,7 @@ EOF;
return $str;
}
private function dumpChildren($parent, Profile $profile, &$data)
private function dumpChildren(string $parent, Profile $profile, &$data)
{
foreach ($profile as $p) {
if ($p->isTemplate()) {
@@ -55,7 +53,7 @@ EOF;
}
}
private function dumpProfile($edge, Profile $profile, &$data)
private function dumpProfile(string $edge, Profile $profile, &$data)
{
if (isset($data[$edge])) {
++$data[$edge]['ct'];

View File

@@ -15,10 +15,8 @@ use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class HtmlDumper extends BaseDumper
final class HtmlDumper extends BaseDumper
{
private static $colors = [
'block' => '#dfd',

View File

@@ -15,10 +15,8 @@ use Twig\Profiler\Profile;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class TextDumper extends BaseDumper
final class TextDumper extends BaseDumper
{
protected function formatTemplate(Profile $profile, $prefix)
{