for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Northwoods\Config\Loader;
class LoaderException extends \RuntimeException
{
const INVALID_LOADER = 1;
const UNSUPPORTED_LOADER = 2;
const BACKUP_FAIL = 3;
const NOT_SUPPORTED_METHOD = 4;
public static function invalidLoader(string $class): LoaderException
return new static("Loader does not implement LoaderIterface: $class", self::INVALID_LOADER);
}
public static function unsupportedLoader(string $class): LoaderException
return new static("Loader is missing dependencies: $class", self::UNSUPPORTED_LOADER);
public static function backupFail(string $class): LoaderException
return new static("Loader unload is unable to save a backup, please check your permissions: $class", self::BACKUP_FAIL);
public static function notSupportedMethod(string $method, string $class): LoaderException
return new static("The $method is not yet supported for the following loader : $class", self::NOT_SUPPORTED_METHOD);