改名
This commit is contained in:
@@ -16,7 +16,7 @@ use HttpServer\Http\Request;
|
||||
use HttpServer\Http\Response;
|
||||
use HttpServer\Route\Router;
|
||||
use HttpServer\Server;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
use Kafka\Producer;
|
||||
use Annotation\Annotation as SAnnotation;
|
||||
use Snowflake\Cache\Redis;
|
||||
@@ -139,7 +139,7 @@ abstract class BaseApplication extends Service
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
#[Pure] protected function looksLikeSetter(string $line): bool
|
||||
protected function looksLikeSetter(string $line): bool
|
||||
{
|
||||
return str_contains($line, '=');
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ declare(strict_types=1);
|
||||
namespace Snowflake\Abstracts;
|
||||
|
||||
use Exception;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
use Snowflake\Error\Logger;
|
||||
use Snowflake\Snowflake;
|
||||
|
||||
@@ -45,7 +45,7 @@ class BaseObject implements Configure
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
#[Pure] public static function className(): string
|
||||
public static function className(): string
|
||||
{
|
||||
return get_called_class();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Snowflake\Abstracts;
|
||||
|
||||
|
||||
use Exception;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
use Snowflake\Snowflake;
|
||||
|
||||
/**
|
||||
@@ -50,7 +50,7 @@ class Component extends BaseObject
|
||||
* @param null $callback
|
||||
* @return bool
|
||||
*/
|
||||
#[Pure] public function hasEvent($name, $callback = null): bool
|
||||
public function hasEvent($name, $callback = null): bool
|
||||
{
|
||||
if (!isset($this->_events[$name])) {
|
||||
return false;
|
||||
|
||||
@@ -9,7 +9,7 @@ declare(strict_types=1);
|
||||
namespace Snowflake\Abstracts;
|
||||
|
||||
use Exception;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
use Snowflake\Exception\ConfigException;
|
||||
use Snowflake\Abstracts\Component;
|
||||
use Snowflake\Snowflake;
|
||||
@@ -94,7 +94,7 @@ class Config extends Component
|
||||
* @param bool $must_not_null
|
||||
* @return bool
|
||||
*/
|
||||
#[Pure] public static function has($key, $must_not_null = false): bool
|
||||
public static function has($key, $must_not_null = false): bool
|
||||
{
|
||||
$config = Snowflake::app()->config;
|
||||
if (!isset($config->data[$key])) {
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Snowflake\Abstracts;
|
||||
|
||||
|
||||
use Exception;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
use Swoole\Coroutine;
|
||||
use Swoole\Coroutine\Channel;
|
||||
|
||||
@@ -57,7 +57,7 @@ abstract class Pool extends Component
|
||||
* @param false $isMaster
|
||||
* @return string
|
||||
*/
|
||||
#[Pure] public function name($cds, $isMaster = false): string
|
||||
public function name($cds, $isMaster = false): string
|
||||
{
|
||||
if ($isMaster === true) {
|
||||
return hash('sha256', $cds . 'master');
|
||||
|
||||
Reference in New Issue
Block a user