CoreFiles by mySites.guru
ConstStub.php33 lines, 740 bytes, from Joomla_5.2.3-Stable-Full_Package.zip
Raw History Compare with 5.2.2
md5
ecb6b7b7ac22e8908f97a7e4c8cb783a
sha1
d77a4fde71a4bcbc9bc9d595ccd9dc572da44e45
sha256
89badb74ca68866f658b33010efc310c85ca753c673bf4a18ef8d72d995509fa
<?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|null $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 87 releases, Joomla 5.1.0-beta1 to 6.0.0-alpha3. See them all, or every version of this file.