CoreFiles by mySites.guru
RegisteredClaimGiven.php20 lines, 563 bytes, from Joomla_5.2.2-Stable-Full_Package.zip
Raw History Compare with 5.2.1
md5
72715b27a12d21409c6bf057039a9632
sha1
3caa724c4d0661c4274755e3f72d72fa082c79e5
sha256
637668f5d3ffcdc382ea59258cc4e9b55db7faa1ff2cbb4e22af72eca4f57825
<?php
declare(strict_types=1);

namespace Lcobucci\JWT\Token;

use InvalidArgumentException;
use Lcobucci\JWT\Exception;

use function sprintf;

final class RegisteredClaimGiven extends InvalidArgumentException implements Exception
{
    private const DEFAULT_MESSAGE = 'Builder#withClaim() is meant to be used for non-registered claims, '
                                  . 'check the documentation on how to set claim "%s"';

    public static function forClaim(string $name): self
    {
        return new self(sprintf(self::DEFAULT_MESSAGE, $name));
    }
}

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