File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
contexts/Authorization/Domain/UserIdentity/Exceptions Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -17,19 +17,19 @@ class BizException extends Exception
1717
1818 protected array $ transParams = [];
1919
20- public static function make (string $ message ): self
20+ public static function make (string $ message ): static
2121 {
2222 return new static ($ message );
2323 }
2424
25- public function code (int $ code ): self
25+ public function code (int $ code ): static
2626 {
2727 $ this ->code = $ code ;
2828
2929 return $ this ;
3030 }
3131
32- public function with (array |string $ key , $ value = null ): self
32+ public function with (array |string $ key , $ value = null ): static
3333 {
3434 if (is_array ($ key )) {
3535 $ this ->transParams = [...$ this ->transParams , ...$ key ];
@@ -47,7 +47,7 @@ public function logMessage(string $message)
4747 return $ this ;
4848 }
4949
50- public function logContext (array $ context ): self
50+ public function logContext (array $ context ): static
5151 {
5252 $ this ->logContext = $ context ;
5353
Original file line number Diff line number Diff line change 66
77use App \Exceptions \BizException ;
88
9- class AuthenticationFailureException extends BizException
9+ final class AuthenticationFailureException extends BizException
1010{
11- public static function make (string $ message = '' ): self
11+ public static function make (string $ message = '' ): static
1212 {
1313 $ message = $ message ?: 'Invalid login credentials or account access restricted ' ;
14- return (new static ($ message ))->code (401 );
14+
15+ /** @var static */
16+ return (new self ($ message ))->code (401 );
1517 }
1618}
You can’t perform that action at this time.
0 commit comments