Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/Controllers/RestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\App;
use Throwable;

/**
* Class RestResponse.
Expand Down Expand Up @@ -581,7 +582,12 @@ public function getErrors()
return $this->errors instanceof Arrayable ? $this->errors->toArray() : $this->errors;
}

public function dump(\Exception $exception, $condition)
/**
* @param Throwable $exception
* @param $condition
* @return $this
*/
public function dump(Throwable $exception, $condition)
{
if ($condition) {
$this->debug = true;
Expand All @@ -599,10 +605,10 @@ public function dump(\Exception $exception, $condition)
/**
* Debug the log if the environment is local.
*
* @param \Exception $exception
* @param Throwable $exception
* @return $this
*/
public function dumpLocal(\Exception $exception)
public function dumpLocal(Throwable $exception)
{
return $this->dump($exception, App::environment('production') === false);
}
Expand Down