-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from mineadmin/2.0-dev
2.0 dev
- Loading branch information
Showing
8 changed files
with
104 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
composer.lock | ||
.idea | ||
vendor | ||
*.cache | ||
*.cache | ||
runtime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file is part of MineAdmin. | ||
* | ||
* @link https://www.mineadmin.com | ||
* @document https://doc.mineadmin.com | ||
* @contact [email protected] | ||
* @license https://github.com/mineadmin/MineAdmin/blob/master/LICENSE | ||
*/ | ||
|
||
namespace Xmo\JWTAuth\Exception; | ||
|
||
class TokenExpireException extends \RuntimeException {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file is part of MineAdmin. | ||
* | ||
* @link https://www.mineadmin.com | ||
* @document https://doc.mineadmin.com | ||
* @contact [email protected] | ||
* @license https://github.com/mineadmin/MineAdmin/blob/master/LICENSE | ||
*/ | ||
|
||
namespace Mine\Tests\Helpers; | ||
|
||
use Mine\Helper\Ip2region; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
/** | ||
* @internal | ||
* @coversNothing | ||
*/ | ||
class Ip2regionTest extends TestCase | ||
{ | ||
public function testMake(): void | ||
{ | ||
$ip2region = new Ip2region(); | ||
$this->assertInstanceOf(Ip2region::class, $ip2region); | ||
} | ||
|
||
public function testSearch() | ||
{ | ||
$ip2region = new Ip2region(); | ||
$result = $ip2region->search('114.114.114.114'); | ||
$this->assertIsString($result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,27 @@ | |
* @contact [email protected] | ||
* @license https://github.com/mineadmin/MineAdmin/blob/master/LICENSE | ||
*/ | ||
ini_set('display_errors', 'on'); | ||
ini_set('display_startup_errors', 'on'); | ||
error_reporting(E_ALL); | ||
date_default_timezone_set('PRC'); | ||
use Hyperf\Config\Listener\RegisterPropertyHandlerListener; | ||
use Hyperf\Di\Aop\AstVisitorRegistry; | ||
use Hyperf\Di\Aop\PropertyHandlerVisitor; | ||
use Hyperf\Di\Aop\ProxyCallVisitor; | ||
use Hyperf\Di\Aop\RegisterInjectPropertyHandler; | ||
|
||
// ini_set('display_errors', 'on'); | ||
// ini_set('display_startup_errors', 'on'); | ||
// | ||
// error_reporting(E_ALL); | ||
|
||
! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__)); | ||
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL); | ||
|
||
require_once BASE_PATH . '/vendor/autoload.php'; | ||
|
||
// Register AST visitors to the collector. | ||
AstVisitorRegistry::insert(PropertyHandlerVisitor::class); | ||
AstVisitorRegistry::insert(ProxyCallVisitor::class); | ||
|
||
// Register Property Handler. | ||
RegisterInjectPropertyHandler::register(); | ||
|
||
(new RegisterPropertyHandlerListener())->process(new stdClass()); |