Check for departure airport restrictions #221

This commit is contained in:
Nabeel Shahzad
2018-03-30 11:08:53 -05:00
parent 35fb6f0e52
commit bd30b1f900
12 changed files with 189 additions and 29 deletions

View File

@@ -2,24 +2,12 @@
namespace App\Exceptions;
use Symfony\Component\HttpKernel\Exception\HttpException;
/**
* Class AircraftPermissionDenied
* @package App\Exceptions
*/
class AircraftPermissionDenied extends HttpException
class AircraftPermissionDenied extends InternalError
{
public function __construct(
string $message = null,
\Exception $previous = null,
int $code = 0,
array $headers = []
) {
parent::__construct(
400,
'User is not allowed to fly this aircraft',
$previous, $headers, $code
);
}
public const FIELD = 'aircraft_id';
public const MESSAGE = 'User is not allowed to fly this aircraft';
}