CoreFiles by mySites.guru
BlackHoleMetadataFactory.php37 lines, 1,001 bytes, from Joomla_5.2.2-Stable-Full_Package.zip
Raw History Compare with 5.2.1
md5
35539b1bdf11b7894a7d8fb8e8600a59
sha1
cd30a1ccc169dbac96036a663b7515ef0fc244bd
sha256
d238b4c5644649f7b2aa3f6565783b35c8ab7fb07b3befd1b545aa0c7af894ea
<?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\Validator\Mapping\Factory;

use Symfony\Component\Validator\Exception\LogicException;
use Symfony\Component\Validator\Mapping\MetadataInterface;

/**
 * Metadata factory that does not store metadata.
 *
 * This implementation is useful if you want to validate values against
 * constraints only and you don't need to add constraints to classes and
 * properties.
 *
 * @author Fabien Potencier <[email protected]>
 */
class BlackHoleMetadataFactory implements MetadataFactoryInterface
{
    public function getMetadataFor(mixed $value): MetadataInterface
    {
        throw new LogicException('This class does not support metadata.');
    }

    public function hasMetadataFor(mixed $value): bool
    {
        return false;
    }
}

The same content is in 133 releases, Joomla 5.1.0-beta1 to 6.2.1-rc1. See them all, or every version of this file.