Skip to content

Commit 8e07b42

Browse files
committed
move and rename some class
1 parent f73c20c commit 8e07b42

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/ValidationTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Inhere\Validate\Filter\DataFilteringTrait;
1313
use Inhere\Validate\Traits\ErrorMessageTrait;
1414
use Inhere\Validate\Utils\Helper;
15-
use Inhere\Validate\Utils\UserAndContextValidatorsTrait;
15+
use Inhere\Validate\Validator\ScopedValidatorsTrait;
1616
use Inhere\Validate\Validator\UserValidators;
1717

1818
/**
@@ -22,7 +22,7 @@
2222
*/
2323
trait ValidationTrait
2424
{
25-
use DataFilteringTrait, ErrorMessageTrait, UserAndContextValidatorsTrait;
25+
use DataFilteringTrait, ErrorMessageTrait, ScopedValidatorsTrait;
2626

2727
/** @var array The rules is by setRules() */
2828
private $_rules = [];

src/Utils/Rule.php renamed to src/Validator/Rule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* Time: 21:47
77
*/
88

9-
namespace Inhere\Validate\Utils;
9+
namespace Inhere\Validate\Validator;
1010

1111
/**
1212
* Class Rule
13-
* @package Inhere\Validate\Utils
13+
* @package Inhere\Validate\Validator
1414
* @TODO
1515
*/
1616
final class Rule

src/Utils/UserAndContextValidatorsTrait.php renamed to src/Validator/ScopedValidatorsTrait.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
* Time: 11:26
77
*/
88

9-
namespace Inhere\Validate\Utils;
9+
namespace Inhere\Validate\Validator;
1010

1111
use Inhere\Validate\Filter\Filters;
1212
use Inhere\Validate\Validators;
1313

1414
/**
15-
* trait UserAndContextValidatorsTrait
15+
* trait ScopedValidatorsTrait - deps the current validation instance.
1616
* - user custom validators
1717
* - some validators of require context data.
18-
* @package Inhere\Validate\Utils
18+
* @package Inhere\Validate\Validator
1919
*/
20-
trait UserAndContextValidatorsTrait
20+
trait ScopedValidatorsTrait
2121
{
2222
/** @var array user custom add's validators(current scope) */
2323
protected $_validators = [];
@@ -87,7 +87,7 @@ public function getValidator(string $name)
8787

8888
/**
8989
* @param array $validators
90-
* @return UserAndContextValidatorsTrait
90+
* @return ScopedValidatorsTrait
9191
*/
9292
public function addValidators(array $validators)
9393
{

0 commit comments

Comments
 (0)