@@ -510,6 +510,11 @@ |
||
| 510 | 510 | $this->assertFalse($val->validate('2000-01-02'), 'max +1 day is invalid'); |
| 511 | 511 | } |
| 512 | 512 | |
| 513 | + /** |
|
| 514 | + * @param Date $validator |
|
| 515 | + * @param string $date |
|
| 516 | + * @param boolean $expected |
|
| 517 | + */ |
|
| 513 | 518 | private function validateModelAttribute($validator, $date, $expected, $message = '') |
| 514 | 519 | { |
| 515 | 520 | $model = new FakedValidationModel(); |
@@ -78,6 +78,9 @@ discard block |
||
| 78 | 78 | $this->assertSame(abs($size - 2), $val->getSizeLimit()); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | + /** |
|
| 82 | + * @param string $sizeStr |
|
| 83 | + */ |
|
| 81 | 84 | protected function sizeToBytes($sizeStr) |
| 82 | 85 | { |
| 83 | 86 | switch (substr($sizeStr, -1)) { |
@@ -359,7 +362,7 @@ discard block |
||
| 359 | 362 | } |
| 360 | 363 | |
| 361 | 364 | /** |
| 362 | - * @param $fileName |
|
| 365 | + * @param string $fileName |
|
| 363 | 366 | * @return UploadedFile |
| 364 | 367 | */ |
| 365 | 368 | protected function getRealTestFile($fileName) |
@@ -350,6 +350,9 @@ |
||
| 350 | 350 | { |
| 351 | 351 | public $foo; |
| 352 | 352 | |
| 353 | + /** |
|
| 354 | + * @param string $foo |
|
| 355 | + */ |
|
| 353 | 356 | public function __construct($foo) |
| 354 | 357 | { |
| 355 | 358 | $this->foo = $foo; |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * Creates validator object based on the validation rule specified in [[rule]]. |
| 103 | - * @param DataSetInterface|null $data model in which context validator should be created. |
|
| 103 | + * @param DataSetInterface $data model in which context validator should be created. |
|
| 104 | 104 | * @return Rule validator instance |
| 105 | 105 | *@throws \yii\exceptions\InvalidConfigException |
| 106 | 106 | */ |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | */ |
| 7 | 7 | namespace Yiisoft\Validator\Rule; |
| 8 | 8 | |
| 9 | -use Yiisoft\Validator\DataSetInterface; |
|
| 10 | 9 | use Yiisoft\Validator\Result; |
| 11 | 10 | use Yiisoft\Validator\Rule; |
| 12 | 11 | |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace Yiisoft\Validator\Rule; |
| 3 | 3 | |
| 4 | 4 | use Yiisoft\Arrays\ArrayHelper; |
| 5 | -use Yiisoft\Validator\DataSetInterface; |
|
| 6 | 5 | use Yiisoft\Validator\Result; |
| 7 | 6 | use Yiisoft\Validator\Rule; |
| 8 | 7 | |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace Yiisoft\Validator\Rule; |
| 4 | 4 | |
| 5 | 5 | use yii\helpers\IpHelper; |
| 6 | -use Yiisoft\Validator\DataSetInterface; |
|
| 7 | 6 | use Yiisoft\Validator\Result; |
| 8 | 7 | use Yiisoft\Validator\Rule; |
| 9 | 8 | |