Kleine Code-Verbesserungen.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php /** @noinspection PhpMissingFieldTypeInspection */
|
||||
|
||||
namespace TorstenHettstedt\TimekeepingApi\Controller;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
<?php /** @noinspection PhpUndefinedClassInspection */
|
||||
|
||||
|
||||
namespace TorstenHettstedt\TimekeepingApi\Middleware;
|
||||
|
||||
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
@@ -30,7 +31,13 @@ class ErrorHandler
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
protected function buildJsonArray(Throwable $exception): array
|
||||
#[ArrayShape([
|
||||
'timestamp' => "false|string",
|
||||
'status' => "int",
|
||||
"error" => "string",
|
||||
'message' => "string",
|
||||
'path' => "string"
|
||||
])] protected function buildJsonArray(Throwable $exception): array
|
||||
{
|
||||
$payload = [
|
||||
'timestamp' => date('Y-m-d\TH:m:sP'),
|
||||
|
||||
Reference in New Issue
Block a user