This commit is contained in:
JaguarJack 2020-11-29 09:29:14 +08:00
parent 97efb82971
commit 94c430f491
60 changed files with 140 additions and 22 deletions

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher;
use think\helper\Arr;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher;
use catcher\event\LoadModuleRoutes;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher;
use catchAdmin\permissions\model\Users;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**
* @filename CacheKeys.php
* @createdAt 2020/1/17

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------
@ -12,6 +14,7 @@ namespace catcher;
use catcher\library\Composer;
use catcher\facade\FileSystem;
use Symfony\Component\Finder\SplFileInfo;
use think\App;
use think\console\Command;
@ -40,12 +43,12 @@ class CatchConsole
$commands = [];
/* \Symfony\Component\Finder\SplFileInfo $command */
/* \Symfony\Component\Finder\SplFileInfo $command */
foreach ($commandFiles as $command) {
if ($command->getExtension() === 'php') {
$lastPath = str_replace($this->parseNamespace(), '',pathinfo($command, PATHINFO_DIRNAME));
$lastPath = str_replace($this->parseNamespace(), '', pathinfo($command->getPathname(), PATHINFO_DIRNAME));
$namespace = $this->namespace . str_replace(DIRECTORY_SEPARATOR, '\\', $lastPath) . '\\';
$commandClass = $namespace . pathinfo($command, PATHINFO_FILENAME);
$commandClass = $namespace . pathinfo($command->getPathname(), PATHINFO_FILENAME);
$commands[] = $commandClass;
}
}

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher;
use app\ExceptionHandle;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher;
use catcher\library\excel\Excel;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher;
use catcher\base\CatchModel;

View File

@ -1,9 +1,9 @@
<?php
declare(strict_types=1);
namespace catcher;
use think\Paginator;
use think\Response;
use think\response\Json;
class CatchResponse
@ -19,11 +19,11 @@ class CatchResponse
*/
public static function success($data = [], $msg = 'success', $code = Code::SUCCESS): Json
{
return json([
'code' => $code,
'message' => $msg,
'data' => $data,
]);
return json([
'code' => $code,
'message' => $msg,
'data' => $data,
]);
}
/**
@ -35,14 +35,14 @@ class CatchResponse
*/
public static function paginate(Paginator $list)
{
return json([
'code' => Code::SUCCESS,
'message' => 'success',
'count' => $list->total(),
'current' => $list->currentPage(),
'limit' => $list->listRows(),
'data' => $list->getCollection(),
]);
return json([
'code' => Code::SUCCESS,
'message' => 'success',
'count' => $list->total(),
'current' => $list->currentPage(),
'limit' => $list->listRows(),
'data' => $list->getCollection(),
]);
}
/**
@ -55,9 +55,9 @@ class CatchResponse
*/
public static function fail($msg = '', $code = Code::FAILED): Json
{
return json([
'code' => $code,
'message' => $msg,
]);
return json([
'code' => $code,
'message' => $msg,
]);
}
}

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher;
use catchAdmin\system\model\Attachments;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher;
class Code

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher;
class Tree

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher;
use catchAdmin\system\model\Config;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\base;
abstract class CatchController

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\base;
use catcher\CatchQuery;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**
* @filename CatchRepository.php
* @createdAt 2020/6/21

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\base;
use app\Request;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\base;
use think\Validate;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\exceptions;
use Exception;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\exceptions;
use catcher\Code;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\exceptions;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\exceptions;
use catcher\Code;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\exceptions;
use catcher\Code;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\exceptions;
use catcher\Code;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**
* @filename WechatResponseException.php
* @createdAt 2020/6/21

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\facade;
use think\Facade;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\facade;
use think\Facade;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\library;
use catcher\CatchAdmin;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**
* @filename Errors.php
* @createdAt 2020/6/21

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,6 +1,8 @@
<?php
namespace catcher\library;
declare(strict_types=1);
namespace catcher\library;
use think\exception\ClassNotFoundException;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**
* @filename ProgressBar.php
* @createdAt 2020/6/20

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\library;
use catcher\CatchCacheKeys;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**
* @filename WeChat.php
* @date 2020/6/7

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\library\client;
use catcher\exceptions\FailedException;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\library\client;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\library\excel;
use catcher\CatchUpload;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\library\excel;
interface ExcelContract

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\library\excel;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\library\excel;
trait MacroExcel

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\library\excel;
interface ShouldTaskContract

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace catcher\traits\db;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/**
* @filename ScopeTrait.php
* @createdAt 2020/6/21

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\traits\db;
use think\facade\Db;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\validates;
use catcher\library\Trie;

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\validates;
class Sometimes implements ValidateInterface

View File

@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace catcher\validates;
interface ValidateInterface