- Created CHANGELOG.md to maintain version history. - Added README.md with usage instructions for the trigger_deprecation() function. - Initialized composer.json for the Symfony Deprecation Contracts library, specifying dependencies and autoloading.
40 lines
1.0 KiB
PHP
40 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace PShowSsoScoped\Lcobucci\JWT\Signer\Key;
|
|
|
|
use PShowSsoScoped\Lcobucci\JWT\Exception;
|
|
use InvalidArgumentException;
|
|
|
|
if (PHP_MAJOR_VERSION === 7) {
|
|
final class FileCouldNotBeRead extends InvalidArgumentException implements Exception
|
|
{
|
|
/** @return self */
|
|
public static function onPath(string $path, \Throwable $cause = null)
|
|
{
|
|
return new self(
|
|
'The path "' . $path . '" does not contain a valid key file',
|
|
0,
|
|
$cause
|
|
);
|
|
}
|
|
}
|
|
} else {
|
|
final class FileCouldNotBeRead extends InvalidArgumentException implements Exception
|
|
{
|
|
/**
|
|
* @param string $path
|
|
* @param \Exception|null $cause
|
|
*
|
|
* @return self
|
|
*/
|
|
public static function onPath($path, \Exception $cause = null)
|
|
{
|
|
return new self(
|
|
'The path "' . $path . '" does not contain a valid key file',
|
|
0,
|
|
$cause
|
|
);
|
|
}
|
|
}
|
|
}
|