mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-02 11:48:08 +08:00
Format
This commit is contained in:
parent
99b69da390
commit
9a02977c72
@ -15,6 +15,7 @@ use Closure;
|
||||
use DateTimeInterface;
|
||||
use Doctrine\DBAL\Connection as DoctrineConnection;
|
||||
use Exception;
|
||||
use Hyperf\Contracts\Events\Dispatcher;
|
||||
use Hyperf\Database\Events\QueryExecuted;
|
||||
use Hyperf\Database\Query\Builder;
|
||||
use Hyperf\Database\Query\Builder as QueryBuilder;
|
||||
@ -23,7 +24,6 @@ use Hyperf\Database\Query\Grammars\Grammar as QueryGrammar;
|
||||
use Hyperf\Database\Query\Processors\Processor;
|
||||
use Hyperf\Database\Schema\Builder as SchemaBuilder;
|
||||
use Hyperf\Utils\Arr;
|
||||
use Hyperf\Contracts\Events\Dispatcher;
|
||||
use LogicException;
|
||||
use PDO;
|
||||
use PDOStatement;
|
||||
|
@ -16,10 +16,10 @@ use Closure;
|
||||
use Hyperf\Database\Concerns\BuildsQueries;
|
||||
use Hyperf\Database\Model\Relations\Relation;
|
||||
use Hyperf\Database\Query\Builder as QueryBuilder;
|
||||
use Hyperf\Pagination\Paginator;
|
||||
use Hyperf\Utils\Arr;
|
||||
use Hyperf\Utils\Contracts\Arrayable;
|
||||
use Hyperf\Utils\Str;
|
||||
use Hyperf\Pagination\Paginator;
|
||||
|
||||
/**
|
||||
* @mixin \Hyperf\Database\Query\Builder
|
||||
|
@ -13,9 +13,9 @@ namespace Hyperf\Database\Model\Concerns;
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
use DateTimeInterface;
|
||||
use Hyperf\Contracts\Support\Arrayable;
|
||||
use Hyperf\Database\Model\JsonEncodingException;
|
||||
use Hyperf\Database\Model\Relations\Relation;
|
||||
use Hyperf\Contracts\Support\Arrayable;
|
||||
use Hyperf\Support\Arr;
|
||||
use Hyperf\Support\Carbon;
|
||||
use Hyperf\Support\Collection as BaseCollection;
|
||||
|
@ -13,6 +13,7 @@ namespace Hyperf\Database\Model;
|
||||
|
||||
use ArrayAccess;
|
||||
use Exception;
|
||||
use Hyperf\Contracts\Queue\QueueableCollection;
|
||||
use Hyperf\Database\ConnectionInterface;
|
||||
use Hyperf\Database\Model\Relations\Pivot;
|
||||
use Hyperf\Database\Query\Builder as QueryBuilder;
|
||||
@ -21,7 +22,6 @@ use Hyperf\Utils\Collection as BaseCollection;
|
||||
use Hyperf\Utils\Contracts\Arrayable;
|
||||
use Hyperf\Utils\Contracts\Jsonable;
|
||||
use Hyperf\Utils\Str;
|
||||
use Hyperf\Contracts\Queue\QueueableCollection;
|
||||
use JsonSerializable;
|
||||
|
||||
abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializable
|
||||
|
@ -15,9 +15,9 @@ use BadMethodCallException;
|
||||
use Closure;
|
||||
use Hyperf\Database\Connection;
|
||||
use Hyperf\Database\Schema\Grammars\Grammar;
|
||||
use Hyperf\Database\SQLiteConnection;
|
||||
use Hyperf\Utils\Fluent;
|
||||
use Hyperf\Utils\Traits\Macroable;
|
||||
use Hyperf\Database\SQLiteConnection;
|
||||
|
||||
class Blueprint
|
||||
{
|
||||
|
@ -46,5 +46,4 @@ abstract class AbstractAnnotation implements AnnotationInterface
|
||||
AnnotationCollector::collectProperty($className, $target, static::class, $this->value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,5 +27,4 @@ interface AnnotationInterface
|
||||
* Collect the annotation metadata to a container that you wants.
|
||||
*/
|
||||
public function collectProperty(string $className, ?string $target): void;
|
||||
|
||||
}
|
||||
|
@ -20,7 +20,6 @@ use Hyperf\Di\Aop\ArroundInterface;
|
||||
*/
|
||||
class Aspect extends AbstractAnnotation
|
||||
{
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
@ -1,4 +1,13 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* This file is part of Hyperf.
|
||||
*
|
||||
* @link https://hyperf.org
|
||||
* @document https://wiki.hyperf.org
|
||||
* @contact group@hyperf.org
|
||||
* @license https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
namespace Hyperf\Di\Annotation;
|
||||
|
||||
@ -8,5 +17,4 @@ namespace Hyperf\Di\Annotation;
|
||||
*/
|
||||
class Debug extends AbstractAnnotation
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ namespace Hyperf\Di\Aop;
|
||||
|
||||
interface ArroundInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
* Return the value from process method of ProceedingJoinPoint,
|
||||
|
@ -108,5 +108,4 @@ trait ProxyTrait
|
||||
// @TODO
|
||||
return $matchAspect;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -46,7 +46,6 @@ use function trim;
|
||||
|
||||
class DefinitionSource implements DefinitionSourceInterface
|
||||
{
|
||||
|
||||
private $enableCache = false;
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,13 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* This file is part of Hyperf.
|
||||
*
|
||||
* @link https://hyperf.org
|
||||
* @document https://wiki.hyperf.org
|
||||
* @contact group@hyperf.org
|
||||
* @license https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
namespace Hyperf\Event\Annotation;
|
||||
|
||||
@ -11,7 +20,6 @@ use Hyperf\Di\Annotation\AnnotationCollector;
|
||||
*/
|
||||
class Listener extends AbstractAnnotation
|
||||
{
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
@ -36,5 +44,4 @@ class Listener extends AbstractAnnotation
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,6 @@ declare(strict_types=1);
|
||||
namespace Hyperf\Event;
|
||||
|
||||
use Psr\EventDispatcher\ListenerProviderInterface;
|
||||
use Psr\EventDispatcher\MessageNotifierInterface;
|
||||
use Psr\EventDispatcher\TaskProcessorInterface;
|
||||
|
||||
class ConfigProvider
|
||||
{
|
||||
|
@ -17,7 +17,6 @@ use Psr\EventDispatcher\StoppableEventInterface;
|
||||
|
||||
class EventDispatcher implements EventDispatcherInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @var ListenerProviderInterface
|
||||
*/
|
||||
|
@ -11,7 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Hyperf\Event;
|
||||
|
||||
use Psr\EventDispatcher\EventInterface;
|
||||
use Psr\EventDispatcher\ListenerProviderInterface;
|
||||
use SplPriorityQueue;
|
||||
|
||||
|
@ -13,7 +13,6 @@ namespace Hyperf\Event;
|
||||
|
||||
use Hyperf\Contract\ConfigInterface;
|
||||
use Hyperf\Di\Annotation\AnnotationCollector;
|
||||
use Hyperf\Event\Annotation\MessageListener;
|
||||
use Hyperf\Event\Annotation\Listener;
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
|
@ -11,12 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Hyperf\Redis;
|
||||
|
||||
use Hyperf\Database\Connectors\ConnectionFactory;
|
||||
use Hyperf\Database\Connectors\MySqlConnector;
|
||||
use Hyperf\Database\Connectors\PostgresConnector;
|
||||
use Hyperf\Database\Connectors\SQLiteConnector;
|
||||
use Hyperf\Database\Connectors\SqlServerConnector;
|
||||
use Hyperf\Redis\RedisConnection;
|
||||
use Hyperf\Redis\Pool\PoolFactory;
|
||||
|
||||
class ConfigProvider
|
||||
|
@ -1,14 +1,16 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: limx
|
||||
* Date: 2019/1/3
|
||||
* Time: 5:59 PM
|
||||
* This file is part of Hyperf.
|
||||
*
|
||||
* @link https://hyperf.org
|
||||
* @document https://wiki.hyperf.org
|
||||
* @contact group@hyperf.org
|
||||
* @license https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
namespace Hyperf\Redis;
|
||||
|
||||
|
||||
use Hyperf\Redis\Pool\PoolFactory;
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
@ -30,7 +32,7 @@ class Redis
|
||||
{
|
||||
$factory = $this->container->get(PoolFactory::class);
|
||||
$pool = $factory->getRedisPool($this->name);
|
||||
|
||||
|
||||
$connection = $pool->get()->getConnection();
|
||||
// TODO: Handle multi ...
|
||||
$res = $connection->$name(...$arguments);
|
||||
@ -38,4 +40,4 @@ class Redis
|
||||
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,13 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* This file is part of Hyperf.
|
||||
*
|
||||
* @link https://hyperf.org
|
||||
* @document https://wiki.hyperf.org
|
||||
* @contact group@hyperf.org
|
||||
* @license https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
namespace Hyperf\Redis;
|
||||
|
||||
@ -28,6 +37,11 @@ class RedisConnection extends BaseConnection implements ConnectionInterface
|
||||
$this->reconnect();
|
||||
}
|
||||
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
return $this->connection->$name(...$arguments);
|
||||
}
|
||||
|
||||
public function getConnection()
|
||||
{
|
||||
if ($this->check()) {
|
||||
@ -65,11 +79,6 @@ class RedisConnection extends BaseConnection implements ConnectionInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
return $this->connection->$name(...$arguments);
|
||||
}
|
||||
|
||||
public function check(): bool
|
||||
{
|
||||
return true;
|
||||
@ -79,4 +88,4 @@ class RedisConnection extends BaseConnection implements ConnectionInterface
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,13 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* This file is part of Hyperf.
|
||||
*
|
||||
* @link https://hyperf.org
|
||||
* @document https://wiki.hyperf.org
|
||||
* @contact group@hyperf.org
|
||||
* @license https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
namespace Hyperf\Utils\Traits;
|
||||
|
||||
@ -6,7 +15,6 @@ use BadMethodCallException;
|
||||
use Error;
|
||||
use function get_class;
|
||||
|
||||
|
||||
trait ForwardsCalls
|
||||
{
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user