laravel-websockets/src/Exceptions/InvalidApp.php

23 lines
568 B
PHP
Raw Normal View History

2018-11-24 00:25:40 +00:00
<?php
namespace BeyondCode\LaravelWebSockets\Exceptions;
use Exception;
2018-12-01 12:58:25 +00:00
class InvalidApp extends Exception
2018-11-24 00:25:40 +00:00
{
public static function notFound(int $appId)
{
return new static("Could not find client for app id `{$appId}`.");
}
public static function appIdIsNotNumeric($appId)
{
return new static("Invalid app id `{$appId}` found. An app id should be numeric.");
}
public static function valueIsRequired($name, int $appId)
{
2018-11-26 07:55:38 +00:00
return new static("{$name} is required but was empty for app id `{$appId}`.");
2018-11-24 00:25:40 +00:00
}
}