Skip to content

Commit 8689307

Browse files
authored
Format code by the latest cs-fixer. (#6617)
1 parent 94a16a3 commit 8689307

File tree

232 files changed

+719
-484
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+719
-484
lines changed

ide/ModelIDE.php

+13-6
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Model;
1314

1415
use BadMethodCallException;
1516
use Closure;
1617
use DateTimeInterface;
1718
use Generator;
1819
use Hyperf\Contract\Arrayable;
20+
use Hyperf\Contract\LengthAwarePaginatorInterface;
21+
use Hyperf\Contract\PaginatorInterface;
22+
use Hyperf\Database\Model\Relations\Relation;
23+
use Hyperf\Database\Query\Expression;
24+
use Hyperf\Database\Query\Grammars\Grammar;
25+
use Hyperf\Database\Query\Processors\Processor;
1926
use InvalidArgumentException;
2027
use ReflectionException;
2128
use RuntimeException;
@@ -359,7 +366,7 @@ public static function pluck($column, $key = null)
359366
* @param array $columns
360367
* @param string $pageName
361368
* @param null|int $page
362-
* @return \Hyperf\Contract\LengthAwarePaginatorInterface
369+
* @return LengthAwarePaginatorInterface
363370
* @throws InvalidArgumentException
364371
*/
365372
public static function paginate($perPage = null, $columns = [], $pageName = 'page', $page = null)
@@ -374,7 +381,7 @@ public static function paginate($perPage = null, $columns = [], $pageName = 'pag
374381
* @param array $columns
375382
* @param string $pageName
376383
* @param null|int $page
377-
* @return \Hyperf\Contract\PaginatorInterface
384+
* @return PaginatorInterface
378385
*/
379386
public static function simplePaginate($perPage = null, $columns = [], $pageName = 'page', $page = null)
380387
{
@@ -651,7 +658,7 @@ public static function unless($value, $callback, $default = null)
651658
/**
652659
* Add a relationship count / exists condition to the query.
653660
*
654-
* @param \Hyperf\Database\Model\Relations\Relation|string $relation
661+
* @param Relation|string $relation
655662
* @param string $operator
656663
* @param int $count
657664
* @param string $boolean
@@ -2180,7 +2187,7 @@ public static function truncate()
21802187
* Create a raw database expression.
21812188
*
21822189
* @param mixed $value
2183-
* @return \Hyperf\Database\Query\Expression
2190+
* @return Expression
21842191
*/
21852192
public static function raw($value)
21862193
{
@@ -2247,7 +2254,7 @@ public static function mergeBindings($query)
22472254
/**
22482255
* Get the database query processor instance.
22492256
*
2250-
* @return \Hyperf\Database\Query\Processors\Processor
2257+
* @return Processor
22512258
*/
22522259
public static function getProcessor()
22532260
{
@@ -2257,7 +2264,7 @@ public static function getProcessor()
22572264
/**
22582265
* Get the query grammar instance.
22592266
*
2260-
* @return \Hyperf\Database\Query\Grammars\Grammar
2267+
* @return Grammar
22612268
*/
22622269
public static function getGrammar()
22632270
{

src/Commands/Annotations/RewriteReturnType.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Annotations;
1314

1415
use Attribute;

src/Commands/Ast/AbstractVisitor.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Ast;
1314

1415
use Hyperf\Database\Commands\ModelData;

src/Commands/Ast/GenerateModelIDEVisitor.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Ast;
1314

1415
use Hyperf\CodeParser\PhpParser;
@@ -61,7 +62,7 @@ public function enterNode(Node $node)
6162
if ($node instanceof Node\Stmt\Class_) {
6263
$this->originClassName = $node->name->toString();
6364
$this->class = new Node\Stmt\Class_(
64-
new Node\Identifier(self::toIDEClass($this->nsp . '\\' . $this->originClassName))
65+
new Identifier(self::toIDEClass($this->nsp . '\\' . $this->originClassName))
6566
);
6667
}
6768

@@ -89,7 +90,7 @@ public function afterTraverse(array $nodes)
8990
new Node\Name('static'),
9091
new Node\VarLikeIdentifier('builder')
9192
),
92-
new Node\Identifier('dynamicWhere'),
93+
new Identifier('dynamicWhere'),
9394
[
9495
new Node\Arg(new Node\Scalar\String_($name)),
9596
new Node\Arg(new Node\Expr\Variable('value')),

src/Commands/Ast/ModelRewriteConnectionVisitor.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Ast;
1314

1415
use PhpParser\Node;

src/Commands/Ast/ModelRewriteGetterSetterVisitor.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Ast;
1314

1415
use Hyperf\CodeParser\PhpParser;

src/Commands/Ast/ModelRewriteInheritanceVisitor.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Ast;
1314

1415
use Hyperf\Database\Commands\ModelData;

src/Commands/Ast/ModelRewriteKeyInfoVisitor.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Ast;
1314

1415
use Hyperf\Collection\Arr;

src/Commands/Ast/ModelRewriteSoftDeletesVisitor.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Ast;
1314

1415
use Hyperf\Collection\Collection;

src/Commands/Ast/ModelRewriteTimestampsVisitor.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Ast;
1314

1415
use Hyperf\Collection\Collection;

src/Commands/Ast/ModelUpdateVisitor.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Ast;
1314

1415
use Hyperf\CodeParser\PhpDocReader;

src/Commands/CommandCollector.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands;
1314

1415
use Hyperf\Database\Commands\Migrations\FreshCommand;

src/Commands/Migrations/BaseCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Migrations;
1314

1415
use Hyperf\Command\Command;

src/Commands/Migrations/FreshCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Migrations;
1314

1415
use Hyperf\Command\Command;

src/Commands/Migrations/GenMigrateCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Migrations;
1314

1415
use Hyperf\Database\Migrations\MigrationCreator;

src/Commands/Migrations/InstallCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Migrations;
1314

1415
use Hyperf\Database\Migrations\MigrationRepositoryInterface;

src/Commands/Migrations/MigrateCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Migrations;
1314

1415
use Hyperf\Command\Concerns\Confirmable as ConfirmableTrait;

src/Commands/Migrations/RefreshCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Migrations;
1314

1415
use Hyperf\Command\Command;

src/Commands/Migrations/ResetCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Migrations;
1314

1415
use Hyperf\Command\Concerns\Confirmable as ConfirmableTrait;

src/Commands/Migrations/RollbackCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Migrations;
1314

1415
use Hyperf\Command\Concerns\Confirmable as ConfirmableTrait;

src/Commands/Migrations/StatusCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Migrations;
1314

1415
use Hyperf\Collection\Collection;
@@ -51,7 +52,7 @@ public function handle()
5152
/**
5253
* Get the status for the given ran migrations.
5354
*
54-
* @return \Hyperf\Collection\Collection
55+
* @return Collection
5556
*/
5657
protected function getStatusFor(array $ran, array $batches)
5758
{

src/Commands/Migrations/TableGuesser.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Migrations;
1314

1415
class TableGuesser

src/Commands/ModelCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands;
1314

1415
use Hyperf\CodeParser\Project;

src/Commands/ModelData.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands;
1314

1415
class ModelData

src/Commands/ModelOption.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands;
1314

1415
class ModelOption

src/Commands/Seeders/BaseCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Seeders;
1314

1415
use Hyperf\Command\Command;

src/Commands/Seeders/GenSeederCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Seeders;
1314

1415
use Hyperf\Database\Seeders\SeederCreator;

src/Commands/Seeders/SeedCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Commands\Seeders;
1314

1415
use Hyperf\Command\Concerns\Confirmable as ConfirmableTrait;

src/Concerns/BuildsQueries.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Concerns;
1314

1415
use Closure;

src/Concerns/ManagesTransactions.php

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Database\Concerns;
1314

1415
use Closure;

0 commit comments

Comments
 (0)