Skip to content

Commit

Permalink
Format code by the latest cs-fixer. (#6617)
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Mar 23, 2024
1 parent 94a16a3 commit 8689307
Show file tree
Hide file tree
Showing 232 changed files with 719 additions and 484 deletions.
19 changes: 13 additions & 6 deletions ide/ModelIDE.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Model;

use BadMethodCallException;
use Closure;
use DateTimeInterface;
use Generator;
use Hyperf\Contract\Arrayable;
use Hyperf\Contract\LengthAwarePaginatorInterface;
use Hyperf\Contract\PaginatorInterface;
use Hyperf\Database\Model\Relations\Relation;
use Hyperf\Database\Query\Expression;
use Hyperf\Database\Query\Grammars\Grammar;
use Hyperf\Database\Query\Processors\Processor;
use InvalidArgumentException;
use ReflectionException;
use RuntimeException;
Expand Down Expand Up @@ -359,7 +366,7 @@ public static function pluck($column, $key = null)
* @param array $columns
* @param string $pageName
* @param null|int $page
* @return \Hyperf\Contract\LengthAwarePaginatorInterface
* @return LengthAwarePaginatorInterface
* @throws InvalidArgumentException
*/
public static function paginate($perPage = null, $columns = [], $pageName = 'page', $page = null)
Expand All @@ -374,7 +381,7 @@ public static function paginate($perPage = null, $columns = [], $pageName = 'pag
* @param array $columns
* @param string $pageName
* @param null|int $page
* @return \Hyperf\Contract\PaginatorInterface
* @return PaginatorInterface
*/
public static function simplePaginate($perPage = null, $columns = [], $pageName = 'page', $page = null)
{
Expand Down Expand Up @@ -651,7 +658,7 @@ public static function unless($value, $callback, $default = null)
/**
* Add a relationship count / exists condition to the query.
*
* @param \Hyperf\Database\Model\Relations\Relation|string $relation
* @param Relation|string $relation
* @param string $operator
* @param int $count
* @param string $boolean
Expand Down Expand Up @@ -2180,7 +2187,7 @@ public static function truncate()
* Create a raw database expression.
*
* @param mixed $value
* @return \Hyperf\Database\Query\Expression
* @return Expression
*/
public static function raw($value)
{
Expand Down Expand Up @@ -2247,7 +2254,7 @@ public static function mergeBindings($query)
/**
* Get the database query processor instance.
*
* @return \Hyperf\Database\Query\Processors\Processor
* @return Processor
*/
public static function getProcessor()
{
Expand All @@ -2257,7 +2264,7 @@ public static function getProcessor()
/**
* Get the query grammar instance.
*
* @return \Hyperf\Database\Query\Grammars\Grammar
* @return Grammar
*/
public static function getGrammar()
{
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Annotations/RewriteReturnType.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Annotations;

use Attribute;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Ast/AbstractVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Ast;

use Hyperf\Database\Commands\ModelData;
Expand Down
5 changes: 3 additions & 2 deletions src/Commands/Ast/GenerateModelIDEVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Ast;

use Hyperf\CodeParser\PhpParser;
Expand Down Expand Up @@ -61,7 +62,7 @@ public function enterNode(Node $node)
if ($node instanceof Node\Stmt\Class_) {
$this->originClassName = $node->name->toString();
$this->class = new Node\Stmt\Class_(
new Node\Identifier(self::toIDEClass($this->nsp . '\\' . $this->originClassName))
new Identifier(self::toIDEClass($this->nsp . '\\' . $this->originClassName))
);
}

Expand Down Expand Up @@ -89,7 +90,7 @@ public function afterTraverse(array $nodes)
new Node\Name('static'),
new Node\VarLikeIdentifier('builder')
),
new Node\Identifier('dynamicWhere'),
new Identifier('dynamicWhere'),
[
new Node\Arg(new Node\Scalar\String_($name)),
new Node\Arg(new Node\Expr\Variable('value')),
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Ast/ModelRewriteConnectionVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Ast;

use PhpParser\Node;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Ast/ModelRewriteGetterSetterVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Ast;

use Hyperf\CodeParser\PhpParser;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Ast/ModelRewriteInheritanceVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Ast;

use Hyperf\Database\Commands\ModelData;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Ast/ModelRewriteKeyInfoVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Ast;

use Hyperf\Collection\Arr;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Ast/ModelRewriteSoftDeletesVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Ast;

use Hyperf\Collection\Collection;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Ast/ModelRewriteTimestampsVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Ast;

use Hyperf\Collection\Collection;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Ast/ModelUpdateVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Ast;

use Hyperf\CodeParser\PhpDocReader;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/CommandCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands;

use Hyperf\Database\Commands\Migrations\FreshCommand;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Migrations/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Migrations;

use Hyperf\Command\Command;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Migrations/FreshCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Migrations;

use Hyperf\Command\Command;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Migrations/GenMigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Migrations;

use Hyperf\Database\Migrations\MigrationCreator;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Migrations/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Migrations;

use Hyperf\Database\Migrations\MigrationRepositoryInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Migrations/MigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Migrations;

use Hyperf\Command\Concerns\Confirmable as ConfirmableTrait;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Migrations/RefreshCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Migrations;

use Hyperf\Command\Command;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Migrations/ResetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Migrations;

use Hyperf\Command\Concerns\Confirmable as ConfirmableTrait;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Migrations/RollbackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Migrations;

use Hyperf\Command\Concerns\Confirmable as ConfirmableTrait;
Expand Down
3 changes: 2 additions & 1 deletion src/Commands/Migrations/StatusCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Migrations;

use Hyperf\Collection\Collection;
Expand Down Expand Up @@ -51,7 +52,7 @@ public function handle()
/**
* Get the status for the given ran migrations.
*
* @return \Hyperf\Collection\Collection
* @return Collection
*/
protected function getStatusFor(array $ran, array $batches)
{
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Migrations/TableGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Migrations;

class TableGuesser
Expand Down
1 change: 1 addition & 0 deletions src/Commands/ModelCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands;

use Hyperf\CodeParser\Project;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/ModelData.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands;

class ModelData
Expand Down
1 change: 1 addition & 0 deletions src/Commands/ModelOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands;

class ModelOption
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Seeders/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Seeders;

use Hyperf\Command\Command;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Seeders/GenSeederCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Seeders;

use Hyperf\Database\Seeders\SeederCreator;
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Seeders/SeedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Commands\Seeders;

use Hyperf\Command\Concerns\Confirmable as ConfirmableTrait;
Expand Down
1 change: 1 addition & 0 deletions src/Concerns/BuildsQueries.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Concerns;

use Closure;
Expand Down
1 change: 1 addition & 0 deletions src/Concerns/ManagesTransactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/

namespace Hyperf\Database\Concerns;

use Closure;
Expand Down

0 comments on commit 8689307

Please sign in to comment.