From 0d48b17866e7ebb225ee2bddf7801a997e178cab Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 15 Feb 2020 21:40:33 +0100 Subject: [PATCH] fix phpstan --- .../CubicSplineInterpolation.php | 4 +-- Message/Console/ConsoleRequest.php | 35 ------------------- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/Math/Numerics/Interpolation/CubicSplineInterpolation.php b/Math/Numerics/Interpolation/CubicSplineInterpolation.php index a219b9c92..4063096ee 100644 --- a/Math/Numerics/Interpolation/CubicSplineInterpolation.php +++ b/Math/Numerics/Interpolation/CubicSplineInterpolation.php @@ -64,9 +64,9 @@ final class CubicSplineInterpolation implements InterpolationInterface * * @param array $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 */ diff --git a/Message/Console/ConsoleRequest.php b/Message/Console/ConsoleRequest.php index 53f869cb2..ec160548e 100644 --- a/Message/Console/ConsoleRequest.php +++ b/Message/Console/ConsoleRequest.php @@ -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(); - } - } }