diff --git a/src/ApiManager.php b/src/ApiManager.php index dc2db2e..4ba8781 100644 --- a/src/ApiManager.php +++ b/src/ApiManager.php @@ -349,6 +349,7 @@ private function invokeActionMethod( $httpCode = 200; try { $methodResponse = (new \ReflectionMethod($endpoint, $methodName))->invokeArgs($endpoint, $args); + /** @phpstan-ignore-next-line */ } catch (ThrowStatusResponse $statusResponse) { $methodResponse = $statusResponse->getResponse(); $httpCode = $methodResponse->getHttpCode(); diff --git a/src/Response/Status/SuccessResponse.php b/src/Response/Status/SuccessResponse.php index 56cc1b1..80cdb8c 100644 --- a/src/Response/Status/SuccessResponse.php +++ b/src/Response/Status/SuccessResponse.php @@ -8,7 +8,7 @@ use Baraja\StructuredApi\Response; use Baraja\StructuredApi\ThrowStatusResponse; -final class SuccessResponse extends StatusResponse +class SuccessResponse extends StatusResponse { /** * @param array|Response|StatusResponse $data @@ -36,7 +36,7 @@ public static function invoke( ?int $code = null, array|Response|StatusResponse $data = [], ): void { - ThrowStatusResponse::invoke(new self($state, $message, $code, $data)); + ThrowStatusResponse::invoke(new static($state, $message, $code, $data)); }