Files
drmaterac.pl/modules/pshowsso/deps/lcobucci/jwt/src/Signer/Key/FileCouldNotBeRead.php
Jacek Pyziak 778ee26fe4 Add Symfony Deprecation Contracts package
- 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.
2025-12-15 08:43:18 +01:00

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
);
}
}
}