Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed May 1, 2024
1 parent e5269cb commit b222be9
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extra/html-extra/HtmlExtension.php
Expand Up @@ -108,6 +108,6 @@ public static function htmlClasses(...$args): string
}
}

return implode(' ', array_unique(array_filter($classes, static function($v) { return '' !== $v; })));
return implode(' ', array_unique(array_filter($classes, static function ($v) { return '' !== $v; })));
}
}
2 changes: 1 addition & 1 deletion src/Extension/CoreExtension.php
Expand Up @@ -463,7 +463,7 @@ public static function sprintf($format, ...$values): string
*/
public static function dateConverter(Environment $env, $date, $format = null, $timezone = null): string
{
return $env->getExtension(CoreExtension::class)->formatDate($date, $format, $timezone);
return $env->getExtension(self::class)->formatDate($date, $format, $timezone);
}

/**
Expand Down
44 changes: 44 additions & 0 deletions src/Resources/core.php
Expand Up @@ -14,6 +14,7 @@

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_cycle($values, $position)
Expand All @@ -25,6 +26,7 @@ function twig_cycle($values, $position)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_random(Environment $env, $values = null, $max = null)
Expand All @@ -36,6 +38,7 @@ function twig_random(Environment $env, $values = null, $max = null)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_date_format_filter(Environment $env, $date, $format = null, $timezone = null)
Expand All @@ -47,6 +50,7 @@ function twig_date_format_filter(Environment $env, $date, $format = null, $timez

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_date_modify_filter(Environment $env, $date, $modifier)
Expand All @@ -58,6 +62,7 @@ function twig_date_modify_filter(Environment $env, $date, $modifier)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_sprintf($format, ...$values)
Expand All @@ -69,6 +74,7 @@ function twig_sprintf($format, ...$values)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_date_converter(Environment $env, $date = null, $timezone = null)
Expand All @@ -80,6 +86,7 @@ function twig_date_converter(Environment $env, $date = null, $timezone = null)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_replace_filter($str, $from)
Expand All @@ -91,6 +98,7 @@ function twig_replace_filter($str, $from)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_round($value, $precision = 0, $method = 'common')
Expand All @@ -102,6 +110,7 @@ function twig_round($value, $precision = 0, $method = 'common')

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_number_format_filter(Environment $env, $number, $decimal = null, $decimalPoint = null, $thousandSep = null)
Expand All @@ -113,6 +122,7 @@ function twig_number_format_filter(Environment $env, $number, $decimal = null, $

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_urlencode_filter($url)
Expand All @@ -124,6 +134,7 @@ function twig_urlencode_filter($url)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_array_merge(...$arrays)
Expand All @@ -135,6 +146,7 @@ function twig_array_merge(...$arrays)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_slice(Environment $env, $item, $start, $length = null, $preserveKeys = false)
Expand All @@ -146,6 +158,7 @@ function twig_slice(Environment $env, $item, $start, $length = null, $preserveKe

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_first(Environment $env, $item)
Expand All @@ -157,6 +170,7 @@ function twig_first(Environment $env, $item)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_last(Environment $env, $item)
Expand All @@ -168,6 +182,7 @@ function twig_last(Environment $env, $item)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_join_filter($value, $glue = '', $and = null)
Expand All @@ -179,6 +194,7 @@ function twig_join_filter($value, $glue = '', $and = null)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_split_filter(Environment $env, $value, $delimiter, $limit = null)
Expand All @@ -190,6 +206,7 @@ function twig_split_filter(Environment $env, $value, $delimiter, $limit = null)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_get_array_keys_filter($array)
Expand All @@ -201,6 +218,7 @@ function twig_get_array_keys_filter($array)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_reverse_filter(Environment $env, $item, $preserveKeys = false)
Expand All @@ -212,6 +230,7 @@ function twig_reverse_filter(Environment $env, $item, $preserveKeys = false)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_sort_filter(Environment $env, $array, $arrow = null)
Expand All @@ -223,6 +242,7 @@ function twig_sort_filter(Environment $env, $array, $arrow = null)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_matches(string $regexp, ?string $str)
Expand All @@ -234,6 +254,7 @@ function twig_matches(string $regexp, ?string $str)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_trim_filter($string, $characterMask = null, $side = 'both')
Expand All @@ -245,6 +266,7 @@ function twig_trim_filter($string, $characterMask = null, $side = 'both')

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_nl2br($string)
Expand All @@ -256,6 +278,7 @@ function twig_nl2br($string)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_spaceless($content)
Expand All @@ -267,6 +290,7 @@ function twig_spaceless($content)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_convert_encoding($string, $to, $from)
Expand All @@ -278,6 +302,7 @@ function twig_convert_encoding($string, $to, $from)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_length_filter(Environment $env, $thing)
Expand All @@ -289,6 +314,7 @@ function twig_length_filter(Environment $env, $thing)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_upper_filter(Environment $env, $string)
Expand All @@ -300,6 +326,7 @@ function twig_upper_filter(Environment $env, $string)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_lower_filter(Environment $env, $string)
Expand All @@ -311,6 +338,7 @@ function twig_lower_filter(Environment $env, $string)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_striptags($string, $allowable_tags = null)
Expand All @@ -322,6 +350,7 @@ function twig_striptags($string, $allowable_tags = null)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_title_string_filter(Environment $env, $string)
Expand All @@ -333,6 +362,7 @@ function twig_title_string_filter(Environment $env, $string)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_capitalize_string_filter(Environment $env, $string)
Expand All @@ -344,6 +374,7 @@ function twig_capitalize_string_filter(Environment $env, $string)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_test_empty($value)
Expand All @@ -355,6 +386,7 @@ function twig_test_empty($value)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_test_iterable($value)
Expand All @@ -366,6 +398,7 @@ function twig_test_iterable($value)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_include(Environment $env, $context, $template, $variables = [], $withContext = true, $ignoreMissing = false, $sandboxed = false)
Expand All @@ -377,6 +410,7 @@ function twig_include(Environment $env, $context, $template, $variables = [], $w

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_source(Environment $env, $name, $ignoreMissing = false)
Expand All @@ -388,6 +422,7 @@ function twig_source(Environment $env, $name, $ignoreMissing = false)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_constant($constant, $object = null)
Expand All @@ -399,6 +434,7 @@ function twig_constant($constant, $object = null)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_constant_is_defined($constant, $object = null)
Expand All @@ -410,6 +446,7 @@ function twig_constant_is_defined($constant, $object = null)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_array_batch($items, $size, $fill = null, $preserveKeys = true)
Expand All @@ -421,6 +458,7 @@ function twig_array_batch($items, $size, $fill = null, $preserveKeys = true)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_array_column($array, $name, $index = null): array
Expand All @@ -432,6 +470,7 @@ function twig_array_column($array, $name, $index = null): array

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_array_filter(Environment $env, $array, $arrow)
Expand All @@ -443,6 +482,7 @@ function twig_array_filter(Environment $env, $array, $arrow)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_array_map(Environment $env, $array, $arrow)
Expand All @@ -454,6 +494,7 @@ function twig_array_map(Environment $env, $array, $arrow)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_array_reduce(Environment $env, $array, $arrow, $initial = null)
Expand All @@ -465,6 +506,7 @@ function twig_array_reduce(Environment $env, $array, $arrow, $initial = null)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_array_some(Environment $env, $array, $arrow)
Expand All @@ -476,6 +518,7 @@ function twig_array_some(Environment $env, $array, $arrow)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_array_every(Environment $env, $array, $arrow)
Expand All @@ -487,6 +530,7 @@ function twig_array_every(Environment $env, $array, $arrow)

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_check_arrow_in_sandbox(Environment $env, $arrow, $thing, $type)
Expand Down
1 change: 1 addition & 0 deletions src/Resources/debug.php
Expand Up @@ -14,6 +14,7 @@

/**
* @internal
*
* @deprecated since Twig 3.9
*/
function twig_var_dump(Environment $env, $context, ...$vars)
Expand Down

0 comments on commit b222be9

Please sign in to comment.