CoreFiles by mySites.guru
ConstStub.php33 lines, 735 bytes, from Joomla_5.0.1-Stable-Full_Package.zip
Raw History Compare with 5.0.0
md5
558e83d453fb45db4d0e6cb78d048909
sha1
0bf95f3f1248e42c646a0b729b21694ec397017c
sha256
080355748082ed4c91c1e46c6c0aea729abfcc4f9da68005a6a03c3fde34f689
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\VarDumper\Caster;

use Symfony\Component\VarDumper\Cloner\Stub;

/**
 * Represents a PHP constant and its value.
 *
 * @author Nicolas Grekas <[email protected]>
 */
class ConstStub extends Stub
{
    public function __construct(string $name, string|int|float $value = null)
    {
        $this->class = $name;
        $this->value = 1 < \func_num_args() ? $value : $name;
    }

    public function __toString(): string
    {
        return (string) $this->value;
    }
}

The same content is in 22 releases, Joomla 5.0.0-alpha1 to 5.1.0-alpha4. See them all, or every version of this file.