@@ -3,8 +3,8 @@ |
||
| 3 | 3 | namespace Proengsoft\JsValidation\Javascript; |
| 4 | 4 | |
| 5 | 5 | use Proengsoft\JsValidation\Support\DelegatedValidator; |
| 6 | -use Symfony\Component\HttpFoundation\File\UploadedFile; |
|
| 7 | 6 | use Proengsoft\JsValidation\Support\UseDelegatedValidatorTrait; |
| 7 | +use Symfony\Component\HttpFoundation\File\UploadedFile; |
|
| 8 | 8 | |
| 9 | 9 | class MessageParser |
| 10 | 10 | { |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @param string $attribute |
| 28 | 28 | * @param string $rule |
| 29 | 29 | * @param array $parameters |
| 30 | - * @return mixed |
|
| 30 | + * @return string |
|
| 31 | 31 | */ |
| 32 | 32 | public function getMessage($attribute, $rule, $parameters) |
| 33 | 33 | { |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | * Generate fake data to get RequiredIf message. |
| 65 | 65 | * |
| 66 | 66 | * @param $data |
| 67 | - * @param $rule |
|
| 67 | + * @param string $rule |
|
| 68 | 68 | * @param $parameters |
| 69 | 69 | * @return void |
| 70 | 70 | */ |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * Generate fake data to get file type messages. |
| 84 | 84 | * |
| 85 | 85 | * @param $data |
| 86 | - * @param $attribute |
|
| 86 | + * @param string $attribute |
|
| 87 | 87 | * @return void |
| 88 | 88 | */ |
| 89 | 89 | private function fakeFileData($data, $attribute) |
@@ -128,6 +128,9 @@ |
||
| 128 | 128 | return $this->validator($validator, $selector); |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | + /** |
|
| 132 | + * @param string $class |
|
| 133 | + */ |
|
| 131 | 134 | protected function parseFormRequestName($class) |
| 132 | 135 | { |
| 133 | 136 | $params = []; |
@@ -2,16 +2,16 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Proengsoft\JsValidation; |
| 4 | 4 | |
| 5 | +use Illuminate\Contracts\Validation\Factory as ValidationFactory; |
|
| 6 | +use Illuminate\Foundation\Http\FormRequest; |
|
| 5 | 7 | use Illuminate\Support\Arr; |
| 6 | 8 | use Illuminate\Validation\Validator; |
| 7 | -use Illuminate\Foundation\Http\FormRequest; |
|
| 8 | -use Proengsoft\JsValidation\Javascript\RuleParser; |
|
| 9 | +use Proengsoft\JsValidation\Javascript\JavascriptValidator; |
|
| 9 | 10 | use Proengsoft\JsValidation\Javascript\MessageParser; |
| 10 | -use Proengsoft\JsValidation\Support\DelegatedValidator; |
|
| 11 | +use Proengsoft\JsValidation\Javascript\RuleParser; |
|
| 11 | 12 | use Proengsoft\JsValidation\Javascript\ValidatorHandler; |
| 12 | -use Proengsoft\JsValidation\Javascript\JavascriptValidator; |
|
| 13 | +use Proengsoft\JsValidation\Support\DelegatedValidator; |
|
| 13 | 14 | use Proengsoft\JsValidation\Support\ValidationRuleParserProxy; |
| 14 | -use Illuminate\Contracts\Validation\Factory as ValidationFactory; |
|
| 15 | 15 | |
| 16 | 16 | class JsValidatorFactory |
| 17 | 17 | { |
@@ -2,13 +2,13 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Proengsoft\JsValidation\Remote; |
| 4 | 4 | |
| 5 | +use Illuminate\Http\Exceptions\HttpResponseException; |
|
| 5 | 6 | use Illuminate\Http\JsonResponse; |
| 6 | 7 | use Illuminate\Validation\ValidationException; |
| 7 | 8 | use Illuminate\Validation\ValidationRuleParser; |
| 8 | -use Proengsoft\JsValidation\Support\RuleListTrait; |
|
| 9 | -use Illuminate\Http\Exceptions\HttpResponseException; |
|
| 10 | 9 | use Illuminate\Validation\Validator as BaseValidator; |
| 11 | 10 | use Proengsoft\JsValidation\Support\AccessProtectedTrait; |
| 11 | +use Proengsoft\JsValidation\Support\RuleListTrait; |
|
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Class RemoteValidator. |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | namespace Proengsoft\JsValidation\Javascript; |
| 4 | 4 | |
| 5 | 5 | use Exception; |
| 6 | -use Illuminate\Support\Facades\View; |
|
| 7 | 6 | use Illuminate\Contracts\Support\Arrayable; |
| 7 | +use Illuminate\Support\Facades\View; |
|
| 8 | 8 | use Proengsoft\JsValidation\Exceptions\PropertyNotFoundException; |
| 9 | 9 | |
| 10 | 10 | class JavascriptValidator implements Arrayable |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | /** |
| 87 | 87 | * Add conditional rules. |
| 88 | 88 | * |
| 89 | - * @param $attribute |
|
| 89 | + * @param string $attribute |
|
| 90 | 90 | * @param array $rules |
| 91 | 91 | * @return void |
| 92 | 92 | */ |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | /** |
| 103 | 103 | * Determine if rule is passed with sometimes. |
| 104 | 104 | * |
| 105 | - * @param $attribute |
|
| 105 | + * @param string $attribute |
|
| 106 | 106 | * @param $rule |
| 107 | 107 | * @return bool |
| 108 | 108 | */ |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * Returns Javascript parameters for remote validated rules. |
| 117 | 117 | * |
| 118 | 118 | * @param string $attribute |
| 119 | - * @param $rule |
|
| 119 | + * @param string $rule |
|
| 120 | 120 | * @param $parameters |
| 121 | 121 | * @return array |
| 122 | 122 | */ |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Proengsoft\JsValidation\Javascript; |
| 4 | 4 | |
| 5 | -use Proengsoft\JsValidation\Support\RuleListTrait; |
|
| 6 | 5 | use Proengsoft\JsValidation\Support\DelegatedValidator; |
| 6 | +use Proengsoft\JsValidation\Support\RuleListTrait; |
|
| 7 | 7 | use Proengsoft\JsValidation\Support\UseDelegatedValidatorTrait; |
| 8 | 8 | |
| 9 | 9 | class RuleParser |
@@ -3,10 +3,10 @@ |
||
| 3 | 3 | namespace Proengsoft\JsValidation\Remote; |
| 4 | 4 | |
| 5 | 5 | use Closure; |
| 6 | +use Illuminate\Contracts\Validation\Factory as ValidationFactory; |
|
| 6 | 7 | use Illuminate\Support\Arr; |
| 7 | 8 | use Illuminate\Validation\Validator as BaseValidator; |
| 8 | 9 | use Proengsoft\JsValidation\Support\AccessProtectedTrait; |
| 9 | -use Illuminate\Contracts\Validation\Factory as ValidationFactory; |
|
| 10 | 10 | |
| 11 | 11 | class Resolver |
| 12 | 12 | { |
@@ -3,11 +3,11 @@ |
||
| 3 | 3 | namespace Proengsoft\JsValidation; |
| 4 | 4 | |
| 5 | 5 | use Closure; |
| 6 | +use Illuminate\Contracts\Config\Repository as Config; |
|
| 7 | +use Illuminate\Contracts\Validation\Factory as ValidationFactory; |
|
| 6 | 8 | use Illuminate\Http\Request; |
| 7 | 9 | use Proengsoft\JsValidation\Remote\Resolver; |
| 8 | -use Illuminate\Contracts\Config\Repository as Config; |
|
| 9 | 10 | use Proengsoft\JsValidation\Remote\Validator as RemoteValidator; |
| 10 | -use Illuminate\Contracts\Validation\Factory as ValidationFactory; |
|
| 11 | 11 | |
| 12 | 12 | class RemoteValidationMiddleware |
| 13 | 13 | { |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | * |
| 36 | 36 | * @param \Illuminate\Validation\Validator $validator |
| 37 | 37 | * @param \Proengsoft\JsValidation\Support\ValidationRuleParserProxy $ruleParser |
| 38 | - * @return void |
|
| 38 | + * @return DelegatedValidator |
|
| 39 | 39 | */ |
| 40 | 40 | public function __construct(BaseValidator $validator, ValidationRuleParserProxy $ruleParser) |
| 41 | 41 | { |