fix phpstan

This commit is contained in:
Dennis Eichhorn 2020-02-15 21:40:33 +01:00
parent e71ef4789d
commit 0d48b17866
2 changed files with 2 additions and 37 deletions

View File

@ -64,9 +64,9 @@ final class CubicSplineInterpolation implements InterpolationInterface
*
* @param array<array{x:int|float, y:int|float}> $points Points to create the interpolation with
* @param float $leftCurvature Left point curvature
* @param float $leftDerivativeType Derivative type for the left point
* @param int $leftDerivativeType Derivative type for the left point
* @param float $rightCurvature Right point curvature
* @param float $rightDerivativeType Derivative type for the right point
* @param int $rightDerivativeType Derivative type for the right point
*
* @since 1.0.0
*/

View File

@ -186,22 +186,6 @@ final class ConsoleRequest extends RequestAbstract
return '127.0.0.1';
}
/**
* {@inheritdoc}
*/
public function getMethod() : string
{
if (!isset($this->method)) {
$temp = $this->uri->__toString();
$found = \stripos($temp, ':');
$method = $found !== false && $found > 3 && $found < 8 ? \substr($temp, 0, $found) : RequestMethod::GET;
$this->method = $method === false ? RequestMethod::GET : $method;
}
return $this->method;
}
/**
* {@inheritdoc}
*/
@ -209,23 +193,4 @@ final class ConsoleRequest extends RequestAbstract
{
return '';
}
/**
* {@inheritdoc}
*/
public function getRouteVerb() : int
{
switch ($this->getMethod()) {
case RequestMethod::GET:
return RouteVerb::GET;
case RequestMethod::PUT:
return RouteVerb::PUT;
case RequestMethod::POST:
return RouteVerb::SET;
case RequestMethod::DELETE:
return RouteVerb::DELETE;
default:
throw new \Exception();
}
}
}