This commit is contained in:
李铭昕 2019-01-03 19:17:34 +08:00
parent 99b69da390
commit 9a02977c72
21 changed files with 58 additions and 41 deletions

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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
{

View File

@ -46,5 +46,4 @@ abstract class AbstractAnnotation implements AnnotationInterface
AnnotationCollector::collectProperty($className, $target, static::class, $this->value);
}
}
}

View File

@ -27,5 +27,4 @@ interface AnnotationInterface
* Collect the annotation metadata to a container that you wants.
*/
public function collectProperty(string $className, ?string $target): void;
}

View File

@ -20,7 +20,6 @@ use Hyperf\Di\Aop\ArroundInterface;
*/
class Aspect extends AbstractAnnotation
{
/**
* {@inheritDoc}
*/

View File

@ -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
{
}

View File

@ -13,7 +13,6 @@ namespace Hyperf\Di\Aop;
interface ArroundInterface
{
/**
* @return mixed
* Return the value from process method of ProceedingJoinPoint,

View File

@ -108,5 +108,4 @@ trait ProxyTrait
// @TODO
return $matchAspect;
}
}

View File

@ -46,7 +46,6 @@ use function trim;
class DefinitionSource implements DefinitionSourceInterface
{
private $enableCache = false;
/**

View File

@ -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
]);
}
}
}

View File

@ -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
{

View File

@ -17,7 +17,6 @@ use Psr\EventDispatcher\StoppableEventInterface;
class EventDispatcher implements EventDispatcherInterface
{
/**
* @var ListenerProviderInterface
*/

View File

@ -11,7 +11,6 @@ declare(strict_types=1);
namespace Hyperf\Event;
use Psr\EventDispatcher\EventInterface;
use Psr\EventDispatcher\ListenerProviderInterface;
use SplPriorityQueue;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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
{
/**