mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-10 01:16:52 +00:00
Fix constant return type
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# 3.10.1 (2024-XX-XX)
|
||||
|
||||
* n/a
|
||||
* Fix constant return type
|
||||
|
||||
# 3.10.0 (2024-05-11)
|
||||
|
||||
|
||||
@@ -1365,9 +1365,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