mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 10:56:38 +00:00
Merge branch '3.x' into 4.x
* 3.x: Fix BC break on escaper extension Fix constant return type
This commit is contained in:
@@ -1357,9 +1357,12 @@ final class CoreExtension extends AbstractExtension
|
||||
* @param string $constant The name of the constant
|
||||
* @param object|null $object The object to get the constant from
|
||||
*
|
||||
* @return mixed Class constants can return many types like scalars, arrays, and
|
||||
* objects depending on the PHP version (\BackedEnum, \UnitEnum, etc.)
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public static function constant($constant, $object = null): string
|
||||
public static function constant($constant, $object = null)
|
||||
{
|
||||
if (null !== $object) {
|
||||
if ('class' === $constant) {
|
||||
|
||||
Reference in New Issue
Block a user