Skip to content

Commit 1ddb546

Browse files
authored
Format code by the latest cs-fixer. (#6617)
1 parent d487339 commit 1ddb546

File tree

70 files changed

+103
-30
lines changed

Some content is hidden

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

70 files changed

+103
-30
lines changed

src/Annotation/Scene.php

Lines changed: 1 addition & 0 deletions
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\Validation\Annotation;
1314

1415
use Attribute;

src/ClosureValidationRule.php

Lines changed: 1 addition & 0 deletions
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\Validation;
1314

1415
use Closure;

src/Concerns/FormatsMessages.php

Lines changed: 2 additions & 1 deletion
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\Validation\Concerns;
1314

1415
use Closure;
@@ -334,7 +335,7 @@ protected function callReplacer(string $message, string $attribute, string $rule
334335
/**
335336
* Call a class based validator message replacer.
336337
*
337-
* @param \Hyperf\Validation\Validator $validator
338+
* @param Validator $validator
338339
*/
339340
protected function callClassBasedReplacer(string $callback, string $message, string $attribute, string $rule, array $parameters, $validator): string
340341
{

src/Concerns/ReplacesAttributes.php

Lines changed: 1 addition & 0 deletions
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\Validation\Concerns;
1314

1415
use Hyperf\Collection\Arr;

src/Concerns/ValidatesAttributes.php

Lines changed: 1 addition & 0 deletions
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\Validation\Concerns;
1314

1415
use Brick\Math\BigDecimal;

src/ConfigProvider.php

Lines changed: 1 addition & 0 deletions
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\Validation;
1314

1415
use Hyperf\Validation\Contract\PresenceVerifierInterface;

src/Contract/DataAwareRule.php

Lines changed: 1 addition & 0 deletions
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\Validation\Contract;
1314

1415
interface DataAwareRule

src/Contract/ImplicitRule.php

Lines changed: 1 addition & 0 deletions
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\Validation\Contract;
1314

1415
interface ImplicitRule extends Rule

src/Contract/PresenceVerifierInterface.php

Lines changed: 1 addition & 0 deletions
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\Validation\Contract;
1314

1415
interface PresenceVerifierInterface

src/Contract/Rule.php

Lines changed: 1 addition & 0 deletions
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\Validation\Contract;
1314

1415
interface Rule

src/Contract/ValidatesWhenResolved.php

Lines changed: 1 addition & 0 deletions
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\Validation\Contract;
1314

1415
/**

src/Contract/ValidatorAwareRule.php

Lines changed: 1 addition & 0 deletions
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\Validation\Contract;
1314

1415
use Hyperf\Validation\Validator;

src/Contract/ValidatorFactoryInterface.php

Lines changed: 1 addition & 0 deletions
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\Validation\Contract;
1314

1415
use Closure;

src/DatabasePresenceVerifier.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
* @contact group@hyperf.io
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12+
1213
namespace Hyperf\Validation;
1314

1415
use Closure;
1516
use Hyperf\Database\ConnectionResolverInterface;
17+
use Hyperf\Database\Query\Builder;
1618
use Hyperf\Stringable\Str;
1719
use Hyperf\Validation\Contract\PresenceVerifierInterface;
1820

@@ -65,7 +67,7 @@ public function getMultiCount(string $collection, string $column, array $values,
6567
/**
6668
* Get a query builder for the given table.
6769
*
68-
* @return \Hyperf\Database\Query\Builder
70+
* @return Builder
6971
*/
7072
public function table(string $table)
7173
{
@@ -83,8 +85,8 @@ public function setConnection(?string $connection)
8385
/**
8486
* Add the given conditions to the query.
8587
*
86-
* @param \Hyperf\Database\Query\Builder $query
87-
* @return \Hyperf\Database\Query\Builder
88+
* @param Builder $query
89+
* @return Builder
8890
*/
8991
protected function addConditions($query, array $conditions)
9092
{
@@ -104,7 +106,7 @@ protected function addConditions($query, array $conditions)
104106
/**
105107
* Add a "where" clause to the given query.
106108
*
107-
* @param \Hyperf\Database\Query\Builder $query
109+
* @param Builder $query
108110
* @param string $extraValue
109111
*/
110112
protected function addWhere($query, string $key, $extraValue)

src/DatabasePresenceVerifierFactory.php

Lines changed: 1 addition & 0 deletions
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\Validation;
1314

1415
use Hyperf\Database\ConnectionResolverInterface;

src/Event/ValidatorFactoryResolved.php

Lines changed: 1 addition & 0 deletions
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\Validation\Event;
1314

1415
use Hyperf\Validation\Contract\ValidatorFactoryInterface;

src/Middleware/ValidationMiddleware.php

Lines changed: 1 addition & 0 deletions
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\Validation\Middleware;
1314

1415
use Closure;

src/Request/FormRequest.php

Lines changed: 1 addition & 0 deletions
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\Validation\Request;
1314

1415
use Hyperf\Collection\Arr;

src/Rule.php

Lines changed: 1 addition & 0 deletions
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\Validation;
1314

1415
use Hyperf\Contract\Arrayable;

src/Rules/DatabaseRule.php

Lines changed: 1 addition & 0 deletions
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\Validation\Rules;
1314

1415
use Closure;

src/Rules/Dimensions.php

Lines changed: 1 addition & 0 deletions
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\Validation\Rules;
1314

1415
use Stringable;

src/Rules/ExcludeIf.php

Lines changed: 2 additions & 1 deletion
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\Validation\Rules;
1314

1415
use Closure;
@@ -17,7 +18,7 @@
1718

1819
class ExcludeIf implements Stringable
1920
{
20-
public Closure|bool $condition;
21+
public bool|Closure $condition;
2122

2223
/**
2324
* Create a new exclude validation rule based on a condition.

src/Rules/Exists.php

Lines changed: 1 addition & 0 deletions
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\Validation\Rules;
1314

1415
use Stringable;

src/Rules/File.php

Lines changed: 2 additions & 1 deletion
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\Validation\Rules;
1314

1415
use Hyperf\Collection\Arr;
@@ -80,7 +81,7 @@ class File implements Rule, DataAwareRule, ValidatorAwareRule
8081
* @param null|callable|static $callback
8182
* @return null|static
8283
*/
83-
public static function defaults(File|callable $callback = null)
84+
public static function defaults(null|callable|File $callback = null)
8485
{
8586
if (is_null($callback)) {
8687
return static::default();

src/Rules/ImageFile.php

Lines changed: 1 addition & 0 deletions
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\Validation\Rules;
1314

1415
class ImageFile extends File

src/Rules/In.php

Lines changed: 1 addition & 0 deletions
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\Validation\Rules;
1314

1415
use Stringable;

src/Rules/NotIn.php

Lines changed: 1 addition & 0 deletions
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\Validation\Rules;
1314

1415
use Stringable;

src/Rules/ProhibitedIf.php

Lines changed: 2 additions & 1 deletion
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\Validation\Rules;
1314

1415
use Closure;
@@ -17,7 +18,7 @@
1718

1819
class ProhibitedIf implements Stringable
1920
{
20-
public Closure|bool $condition;
21+
public bool|Closure $condition;
2122

2223
/**
2324
* Create a new prohibited validation rule based on a condition.

src/Rules/RequiredIf.php

Lines changed: 1 addition & 0 deletions
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\Validation\Rules;
1314

1415
use Stringable;

src/Rules/Unique.php

Lines changed: 2 additions & 1 deletion
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\Validation\Rules;
1314

1415
use Hyperf\Database\Model\Model;
@@ -68,7 +69,7 @@ public function ignore($id, ?string $idColumn = null)
6869
/**
6970
* Ignore the given model during the unique check.
7071
*
71-
* @param \Hyperf\Database\Model\Model $model
72+
* @param Model $model
7273
* @return $this
7374
*/
7475
public function ignoreModel($model, ?string $idColumn = null)

src/UnauthorizedException.php

Lines changed: 1 addition & 0 deletions
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\Validation;
1314

1415
use RuntimeException;

src/ValidatesWhenResolvedTrait.php

Lines changed: 3 additions & 2 deletions
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\Validation;
1314

1415
use Hyperf\Contract\ValidatorInterface;
@@ -55,7 +56,7 @@ protected function getValidatorInstance(): ValidatorInterface
5556
/**
5657
* Handle a failed validation attempt.
5758
*
58-
* @throws \Hyperf\Validation\ValidationException
59+
* @throws ValidationException
5960
*/
6061
protected function failedValidation(ValidatorInterface $validator)
6162
{
@@ -77,7 +78,7 @@ protected function passesAuthorization(): bool
7778
/**
7879
* Handle a failed authorization attempt.
7980
*
80-
* @throws \Hyperf\Validation\UnauthorizedException
81+
* @throws UnauthorizedException
8182
*/
8283
protected function failedAuthorization()
8384
{

src/ValidationData.php

Lines changed: 1 addition & 0 deletions
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\Validation;
1314

1415
use Hyperf\Collection\Arr;

src/ValidationException.php

Lines changed: 1 addition & 0 deletions
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\Validation;
1314

1415
use Hyperf\Collection\Arr;

src/ValidationExceptionHandler.php

Lines changed: 2 additions & 1 deletion
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\Validation;
1314

1415
use Hyperf\ExceptionHandler\ExceptionHandler;
@@ -21,7 +22,7 @@ class ValidationExceptionHandler extends ExceptionHandler
2122
public function handle(Throwable $throwable, ResponsePlusInterface $response)
2223
{
2324
$this->stopPropagation();
24-
/** @var \Hyperf\Validation\ValidationException $throwable */
25+
/** @var ValidationException $throwable */
2526
$body = $throwable->validator->errors()->first();
2627
if (! $response->hasHeader('content-type')) {
2728
$response = $response->addHeader('content-type', 'text/plain; charset=utf-8');

src/ValidationRuleParser.php

Lines changed: 1 addition & 0 deletions
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\Validation;
1314

1415
use Closure;

0 commit comments

Comments
 (0)