Skip to content

Commit 3c74f75

Browse files
authored
Use Hyperf\Collection\Collection instead of Hyperf\Utils\Collection. (#5593)
* Format code * Use `Hyperf\Collection\Collection` instead of `Hyperf\Utils\Collection`. * Use `Hyperf\Collection\collect` instead of `collect`.
1 parent 082ad0f commit 3c74f75

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

src/Rules/DatabaseRule.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
use Closure;
1515

16+
use function Hyperf\Collection\collect;
17+
1618
trait DatabaseRule
1719
{
1820
/**

src/Validator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
use RuntimeException;
2929
use Stringable;
3030

31+
use function Hyperf\Collection\collect;
32+
3133
class Validator implements ValidatorContract
3234
{
3335
use Concerns\FormatsMessages;

tests/Cases/ValidationInRuleTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
use HyperfTest\Validation\Cases\fixtures\Values;
1717
use PHPUnit\Framework\TestCase;
1818

19+
use function Hyperf\Collection\collect;
20+
1921
/**
2022
* @internal
2123
* @coversNothing

tests/Cases/ValidationNotInRuleTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
use Hyperf\Validation\Rules\NotIn;
1616
use PHPUnit\Framework\TestCase;
1717

18+
use function Hyperf\Collection\collect;
19+
1820
/**
1921
* @internal
2022
* @coversNothing

0 commit comments

Comments
 (0)