phpstan 5 errors fixed
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Modules\SberPaymentOrder\Nova\Resources\Concerns;
|
||||
|
||||
use App\Modules\SberPaymentOrder\Models\SberPaymentOrder;
|
||||
use Illuminate\Auth\Access\AuthorizationException;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -16,7 +17,9 @@ trait NovaSberPaymentOrderAuth
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->resource->user_id == auth()->id()) {
|
||||
/** @var SberPaymentOrder $resource */
|
||||
$resource = $this->resource;
|
||||
if ($resource->user_id == auth()->id()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -44,7 +47,9 @@ trait NovaSberPaymentOrderAuth
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->resource->user_id == auth()->id()) {
|
||||
/** @var SberPaymentOrder $resource */
|
||||
$resource = $this->resource;
|
||||
if ($resource->user_id == auth()->id()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -78,6 +83,6 @@ trait NovaSberPaymentOrderAuth
|
||||
/** Force delete */
|
||||
public function authorizedToForceDelete(Request $request)
|
||||
{
|
||||
throw_unless(auth()->user()->isMe(), AuthorizationException::class);
|
||||
return auth()->user()->isMe();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user