Skip to content

Commit

Permalink
fix: HTTPExcetpion is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Jul 11, 2022
1 parent aa1a5cb commit d8342dd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
5 changes: 3 additions & 2 deletions src/Authentication/AuthenticationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

namespace CodeIgniter\Shield\Authentication;

use CodeIgniter\Shield\Exceptions\HTTPException;
use CodeIgniter\HTTP\Exceptions\HTTPException;
use CodeIgniter\Shield\Exceptions\RuntimeException;

class AuthenticationException extends HTTPException
class AuthenticationException extends RuntimeException
{
protected $code = 403;

Expand Down
2 changes: 1 addition & 1 deletion src/Authentication/Passwords/PwnedValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace CodeIgniter\Shield\Authentication\Passwords;

use CodeIgniter\Config\Services;
use CodeIgniter\HTTP\Exceptions\HTTPException;
use CodeIgniter\Shield\Authentication\AuthenticationException;
use CodeIgniter\Shield\Entities\User;
use CodeIgniter\Shield\Exceptions\HTTPException;
use CodeIgniter\Shield\Result;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Authorization/AuthorizationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace CodeIgniter\Shield\Authorization;

use CodeIgniter\Shield\Exceptions\HTTPException;
use CodeIgniter\Shield\Exceptions\RuntimeException;

class AuthorizationException extends HTTPException
class AuthorizationException extends RuntimeException
{
protected $code = 401;

Expand Down
9 changes: 0 additions & 9 deletions src/Exceptions/HTTPException.php

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Unit/PwnedValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace Tests\Unit;

use CodeIgniter\HTTP\Exceptions\HTTPException;
use CodeIgniter\HTTP\Response;
use CodeIgniter\Shield\Authentication\AuthenticationException;
use CodeIgniter\Shield\Authentication\Passwords\PwnedValidator;
use CodeIgniter\Shield\Config\Auth as AuthConfig;
use CodeIgniter\Shield\Config\Services;
use CodeIgniter\Shield\Exceptions\HTTPException;
use CodeIgniter\Test\CIUnitTestCase;
use Config\App;

Expand Down

0 comments on commit d8342dd

Please sign in to comment.