package and depencies
This commit is contained in:
@@ -25,14 +25,8 @@ class MethodNotAllowedException extends \RuntimeException implements ExceptionIn
|
||||
/**
|
||||
* @param string[] $allowedMethods
|
||||
*/
|
||||
public function __construct(array $allowedMethods, ?string $message = '', int $code = 0, \Throwable $previous = null)
|
||||
public function __construct(array $allowedMethods, string $message = '', int $code = 0, \Throwable $previous = null)
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/routing', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
$this->allowedMethods = array_map('strtoupper', $allowedMethods);
|
||||
|
||||
parent::__construct($message, $code, $previous);
|
||||
@@ -43,7 +37,7 @@ class MethodNotAllowedException extends \RuntimeException implements ExceptionIn
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAllowedMethods()
|
||||
public function getAllowedMethods(): array
|
||||
{
|
||||
return $this->allowedMethods;
|
||||
}
|
||||
|
Reference in New Issue
Block a user