mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-06 20:48:40 +00:00
fix phpstan
This commit is contained in:
parent
e71ef4789d
commit
0d48b17866
|
|
@ -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 array<array{x:int|float, y:int|float}> $points Points to create the interpolation with
|
||||||
* @param float $leftCurvature Left point curvature
|
* @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 $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
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -186,22 +186,6 @@ final class ConsoleRequest extends RequestAbstract
|
||||||
return '127.0.0.1';
|
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}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
@ -209,23 +193,4 @@ final class ConsoleRequest extends RequestAbstract
|
||||||
{
|
{
|
||||||
return '';
|
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user