22
33namespace Watson \Validating ;
44
5- use Illuminate \Support \MessageBag ;
6- use Illuminate \Support \Facades \Input ;
5+ use Illuminate \Database \Eloquent \Model ;
76use Illuminate \Support \Facades \Validator ;
7+ use Illuminate \Support \MessageBag ;
88use Illuminate \Validation \Factory ;
99
1010interface ValidatingInterface
@@ -17,10 +17,10 @@ interface ValidatingInterface
1717 */
1818 public function getValidating ();
1919
20- /**
20+ /**
2121 * Set whether the model should attempt validation on saving.
2222 *
23- * @param bool $value
23+ * @param bool $value
2424 * @return void
2525 */
2626 public function setValidating ($ value );
@@ -37,8 +37,9 @@ public function getThrowValidationExceptions();
3737 * Set whether the model should raise an exception or
3838 * return a boolean on a failed validation.
3939 *
40- * @param bool $value
40+ * @param bool $value
4141 * @return void
42+ *
4243 * @throws InvalidArgumentException
4344 */
4445 public function setThrowValidationExceptions ($ value );
@@ -55,16 +56,17 @@ public function getInjectUniqueIdentifier();
5556 * Set the model to add unique identifier to rules when performing
5657 * validation.
5758 *
58- * @param bool $value
59+ * @param bool $value
5960 * @return void
61+ *
6062 * @throws InvalidArgumentException
6163 */
6264 public function setInjectUniqueIdentifier ($ value );
6365
6466 /**
6567 * Get the model.
6668 *
67- * @return \Illuminate\Database\Eloquent\ Model
69+ * @return Model
6870 */
6971 public function getModel ();
7072
@@ -85,22 +87,20 @@ public function getRules();
8587 /**
8688 * Set the global validation rules.
8789 *
88- * @param array $rules
8990 * @return void
9091 */
9192 public function setRules (?array $ rules = null );
9293
9394 /**
9495 * Get the validation error messages from the model.
9596 *
96- * @return \Illuminate\Support\ MessageBag
97+ * @return MessageBag
9798 */
9899 public function getErrors ();
99100
100101 /**
101102 * Set the error messages.
102103 *
103- * @param \Illuminate\Support\MessageBag $validationErrors
104104 * @return void
105105 */
106106 public function setErrors (MessageBag $ validationErrors );
@@ -116,7 +116,8 @@ public function isValid();
116116 * Returns if the model is valid, otherwise throws an exception.
117117 *
118118 * @return bool
119- * @throws \Watson\Validating\ValidationException
119+ *
120+ * @throws ValidationException
120121 */
121122 public function isValidOrFail ();
122123
@@ -139,7 +140,8 @@ public function forceSave();
139140 * instead of returning a boolean (which is the default behaviour).
140141 *
141142 * @return void
142- * @throws \Watson\Validating\ValidatingException
143+ *
144+ * @throws ValidatingException
143145 */
144146 public function saveOrFail ();
145147
@@ -154,22 +156,20 @@ public function saveOrReturn();
154156 /**
155157 * Get the Validator instance
156158 *
157- * @return \Illuminate\Validation\ Factory
159+ * @return Factory
158160 */
159161 public function getValidator ();
160162
161163 /**
162164 * Set the Validator instance
163- *
164- * @param \Illuminate\Validation\Factory $validator
165165 */
166166 public function setValidator (Factory $ validator );
167167
168168 /**
169169 * Throw a validation exception.
170170 *
171- * @throws \Watson\Validating\ ValidationException
172- */
171+ * @throws ValidationException
172+ */
173173 public function throwValidationException ();
174174
175175 /**
0 commit comments