Skip to content

Commit

Permalink
PHPStan- Fix access to undefined property in AdminUserController
Browse files Browse the repository at this point in the history
  • Loading branch information
ssethupathy committed Jul 18, 2023
1 parent 383936e commit 3317f3f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function store(Request $request): RedirectResponse
*/
public function destroy(int $id): RedirectResponse
{
if ((int)$id === (int)Auth::user()->id) {
if ((int)$id === (int)Auth::id()) {
request()->session()->flash('message', "You can not delete yourself!");
} else {
$user = Administrator::findOrFail($id);
Expand Down
5 changes: 0 additions & 5 deletions sourcecode/apis/contentauthor/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ parameters:
count: 1
path: app/Http/Controllers/Admin/AdminH5PDetailsController.php

-
message: "#^Access to an undefined property Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\:\\:\\$id\\.$#"
count: 1
path: app/Http/Controllers/Admin/AdminUserController.php

-
message: "#^Expression on left side of \\?\\? is not nullable\\.$#"
count: 1
Expand Down

0 comments on commit 3317f3f

Please sign in to comment.