mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
PHP8 phpstan fix (#13843)
This commit is contained in:
@@ -29,11 +29,12 @@ use Throwable;
|
||||
|
||||
class FileWriteFailedException extends \Exception
|
||||
{
|
||||
protected $file;
|
||||
/** @var string */
|
||||
protected $file_path;
|
||||
|
||||
public function __construct($file, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->file = $file;
|
||||
$this->file_path = $file;
|
||||
parent::__construct("Failed to write file: $file", $code, $previous);
|
||||
}
|
||||
|
||||
@@ -45,7 +46,7 @@ class FileWriteFailedException extends \Exception
|
||||
public function render(\Illuminate\Http\Request $request)
|
||||
{
|
||||
$title = trans('exceptions.file_write_failed.title');
|
||||
$message = trans('exceptions.file_write_failed.message', ['file' => $this->file]);
|
||||
$message = trans('exceptions.file_write_failed.message', ['file' => $this->file_path]);
|
||||
|
||||
return $request->wantsJson() ? response()->json([
|
||||
'status' => 'error',
|
||||
|
||||
@@ -2670,11 +2670,6 @@ parameters:
|
||||
count: 1
|
||||
path: LibreNMS/Exceptions/FileWriteFailedException.php
|
||||
|
||||
-
|
||||
message: "#^Property LibreNMS\\\\Exceptions\\\\FileWriteFailedException\\:\\:\\$file has no type specified\\.$#"
|
||||
count: 1
|
||||
path: LibreNMS/Exceptions/FileWriteFailedException.php
|
||||
|
||||
-
|
||||
message: "#^Method LibreNMS\\\\Exceptions\\\\HostUnreachableException\\:\\:addReason\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
|
||||
Reference in New Issue
Block a user