Skip to content

Commit

Permalink
Improve error handling
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Jan 7, 2024
1 parent 03d9f53 commit 8a4bfdf
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 679 deletions.
155 changes: 0 additions & 155 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -100,46 +100,6 @@ parameters:
count: 1
path: src/Auth/CustomerGuard.php

-
message: "#^Access to an undefined property Igniter\\\\User\\\\Auth\\\\Models\\\\User\\:\\:\\$is_activated\\.$#"
count: 1
path: src/Auth/Manager.php

-
message: "#^Access to an undefined property Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\:\\:\\$is_activated\\.$#"
count: 1
path: src/Auth/Manager.php

-
message: "#^Call to an undefined method Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\:\\:afterLogin\\(\\)\\.$#"
count: 1
path: src/Auth/Manager.php

-
message: "#^Call to an undefined method Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\:\\:beforeLogin\\(\\)\\.$#"
count: 1
path: src/Auth/Manager.php

-
message: "#^Call to an undefined method Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\:\\:checkRememberToken\\(\\)\\.$#"
count: 1
path: src/Auth/Manager.php

-
message: "#^Call to an undefined method Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\:\\:fireEvent\\(\\)\\.$#"
count: 1
path: src/Auth/Manager.php

-
message: "#^Call to an undefined method Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\:\\:getKey\\(\\)\\.$#"
count: 1
path: src/Auth/Manager.php

-
message: "#^Call to an undefined method Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\:\\:updateRememberToken\\(\\)\\.$#"
count: 1
path: src/Auth/Manager.php

-
message: "#^Access to an undefined property Igniter\\\\User\\\\Auth\\\\Models\\\\User\\:\\:\\$activated_at\\.$#"
count: 1
Expand Down Expand Up @@ -270,111 +230,6 @@ parameters:
count: 1
path: src/Classes/UserState.php

-
message: "#^Call to an undefined static method Igniter\\\\Cart\\\\Facades\\\\Cart\\:\\:count\\(\\)\\.$#"
count: 1
path: src/Components/Account.php

-
message: "#^Call to an undefined static method Igniter\\\\Cart\\\\Facades\\\\Cart\\:\\:total\\(\\)\\.$#"
count: 1
path: src/Components/Account.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\Auth\\:\\:check\\(\\)\\.$#"
count: 1
path: src/Components/Account.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\Auth\\:\\:getUser\\(\\)\\.$#"
count: 1
path: src/Components/Account.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\Auth\\:\\:login\\(\\)\\.$#"
count: 1
path: src/Components/Account.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\Auth\\:\\:logout\\(\\)\\.$#"
count: 1
path: src/Components/Account.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\Auth\\:\\:validateCredentials\\(\\)\\.$#"
count: 1
path: src/Components/Account.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Models\\\\Customer\\:\\:whereActivationCode\\(\\)\\.$#"
count: 1
path: src/Components/Account.php

-
message: "#^Call to an undefined static method Illuminate\\\\Support\\\\Facades\\\\Mail\\:\\:queueTemplate\\(\\)\\.$#"
count: 3
path: src/Components/Account.php

-
message: "#^Call to an undefined method Igniter\\\\User\\\\Components\\\\AddressBook\\:\\:pageCycle\\(\\)\\.$#"
count: 2
path: src/Components/AddressBook.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\Auth\\:\\:customer\\(\\)\\.$#"
count: 5
path: src/Components/AddressBook.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Models\\\\Address\\:\\:find\\(\\)\\.$#"
count: 3
path: src/Components/AddressBook.php

-
message: "#^Call to an undefined method Igniter\\\\User\\\\Components\\\\ResetPassword\\:\\:currentPageUrl\\(\\)\\.$#"
count: 1
path: src/Components/ResetPassword.php

-
message: "#^Call to an undefined static method Igniter\\\\Main\\\\Template\\\\Page\\:\\:lists\\(\\)\\.$#"
count: 2
path: src/Components/ResetPassword.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Models\\\\Customer\\:\\:whereEmail\\(\\)\\.$#"
count: 1
path: src/Components/ResetPassword.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Models\\\\Customer\\:\\:whereResetCode\\(\\)\\.$#"
count: 1
path: src/Components/ResetPassword.php

-
message: "#^Call to an undefined static method Illuminate\\\\Support\\\\Facades\\\\Mail\\:\\:queueTemplate\\(\\)\\.$#"
count: 1
path: src/Components/ResetPassword.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\Auth\\:\\:check\\(\\)\\.$#"
count: 2
path: src/Components/Session.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\Auth\\:\\:getUser\\(\\)\\.$#"
count: 2
path: src/Components/Session.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\Auth\\:\\:logout\\(\\)\\.$#"
count: 1
path: src/Components/Session.php

-
message: "#^Call to an undefined static method Illuminate\\\\Support\\\\Facades\\\\Event\\:\\:fire\\(\\)\\.$#"
count: 1
path: src/Components/Session.php

-
message: "#^Access to an undefined property Igniter\\\\User\\\\Console\\\\Commands\\\\ClearUserStateCommand\\:\\:\\$defaultStateConfig\\.$#"
count: 1
Expand Down Expand Up @@ -515,11 +370,6 @@ parameters:
count: 1
path: src/Http/Controllers/Customers.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\AdminAuth\\:\\:user\\(\\)\\.$#"
count: 1
path: src/Http/Controllers/Customers.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\Auth\\:\\:impersonate\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -600,11 +450,6 @@ parameters:
count: 1
path: src/Http/Controllers/Users.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\AdminAuth\\:\\:user\\(\\)\\.$#"
count: 1
path: src/Http/Controllers/Users.php

-
message: "#^Call to an undefined static method Igniter\\\\User\\\\Facades\\\\AdminAuth\\:\\:check\\(\\)\\.$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function configureGateCallback()
{
Gate::after(function ($user, $ability) {
if (Igniter::isAdminUser($user)) {
return $user->hasPermission($ability) === true ? true : null;
return $user->hasAnyPermission($ability) === true ? true : null;
}
});
}
Expand Down
Loading

0 comments on commit 8a4bfdf

Please sign in to comment.