]> BookStack Code Mirror - bookstack/blobdiff - app/Exceptions/JsonDebugException.php
Added additional testing for editor switching permissions
[bookstack] / app / Exceptions / JsonDebugException.php
index 6314533ce11d2fdf0afab4c11131ea4f5af2e68a..e8d61305e1232eb748b007d8c506e85ae39a0385 100644 (file)
@@ -1,25 +1,28 @@
-<?php namespace BookStack\Exceptions;
+<?php
+
+namespace BookStack\Exceptions;
 
 use Exception;
+use Illuminate\Http\JsonResponse;
 
 class JsonDebugException extends Exception
 {
-
-    protected $data;
+    protected array $data;
 
     /**
      * JsonDebugException constructor.
      */
-    public function __construct($data)
+    public function __construct(array $data)
     {
         $this->data = $data;
+        parent::__construct();
     }
 
     /**
      * Covert this exception into a response.
      */
-    public function render()
+    public function render(): JsonResponse
     {
         return response()->json($this->data);
     }
-}
\ No newline at end of file
+}