@@ -39,12 +39,10 @@ abstract class Constraint extends BaseConstraint implements ConstraintInterface
3939 *
4040 * @param JsonPointer|null $path Current path
4141 * @param mixed $i What to append to the path
42- *
43- * @return JsonPointer
4442 */
45- protected function incrementPath (?JsonPointer $ path , $ i )
43+ protected function incrementPath (?JsonPointer $ path , $ i ): JsonPointer
4644 {
47- $ path = $ path ?: new JsonPointer ('' );
45+ $ path = $ path ?? new JsonPointer ('' );
4846
4947 if ($ i === null || $ i === '' ) {
5048 return $ path ;
@@ -65,12 +63,9 @@ protected function incrementPath(?JsonPointer $path, $i)
6563 *
6664 * @param mixed $value
6765 * @param mixed $schema
68- * @param JsonPointer|null $path
6966 * @param mixed $i
70- *
71- * @return void
7267 */
73- protected function checkArray (&$ value , $ schema = null , ?JsonPointer $ path = null , $ i = null )
68+ protected function checkArray (&$ value , $ schema = null , ?JsonPointer $ path = null , $ i = null ): void
7469 {
7570 $ validator = $ this ->factory ->createInstanceFor ('collection ' );
7671 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -83,15 +78,12 @@ protected function checkArray(&$value, $schema = null, ?JsonPointer $path = null
8378 *
8479 * @param mixed $value
8580 * @param mixed $schema
86- * @param JsonPointer|null $path
8781 * @param mixed $properties
8882 * @param mixed $additionalProperties
8983 * @param mixed $patternProperties
90- *
91- * @return void
9284 */
9385 protected function checkObject (&$ value , $ schema = null , ?JsonPointer $ path = null , $ properties = null ,
94- $ additionalProperties = null , $ patternProperties = null , $ appliedDefaults = [])
86+ $ additionalProperties = null , $ patternProperties = null , $ appliedDefaults = []): void
9587 {
9688 /** @var ObjectConstraint $validator */
9789 $ validator = $ this ->factory ->createInstanceFor ('object ' );
@@ -105,12 +97,9 @@ protected function checkObject(&$value, $schema = null, ?JsonPointer $path = nul
10597 *
10698 * @param mixed $value
10799 * @param mixed $schema
108- * @param JsonPointer|null $path
109100 * @param mixed $i
110- *
111- * @return void
112101 */
113- protected function checkType (&$ value , $ schema = null , ?JsonPointer $ path = null , $ i = null )
102+ protected function checkType (&$ value , $ schema = null , ?JsonPointer $ path = null , $ i = null ): void
114103 {
115104 $ validator = $ this ->factory ->createInstanceFor ('type ' );
116105 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -123,12 +112,9 @@ protected function checkType(&$value, $schema = null, ?JsonPointer $path = null,
123112 *
124113 * @param mixed $value
125114 * @param mixed $schema
126- * @param JsonPointer|null $path
127115 * @param mixed $i
128- *
129- * @return void
130116 */
131- protected function checkUndefined (&$ value , $ schema = null , ?JsonPointer $ path = null , $ i = null , $ fromDefault = false )
117+ protected function checkUndefined (&$ value , $ schema = null , ?JsonPointer $ path = null , $ i = null , $ fromDefault = false ): void
132118 {
133119 /** @var UndefinedConstraint $validator */
134120 $ validator = $ this ->factory ->createInstanceFor ('undefined ' );
@@ -143,12 +129,9 @@ protected function checkUndefined(&$value, $schema = null, ?JsonPointer $path =
143129 *
144130 * @param mixed $value
145131 * @param mixed $schema
146- * @param JsonPointer|null $path
147132 * @param mixed $i
148- *
149- * @return void
150133 */
151- protected function checkString ($ value , $ schema = null , ?JsonPointer $ path = null , $ i = null )
134+ protected function checkString ($ value , $ schema = null , ?JsonPointer $ path = null , $ i = null ): void
152135 {
153136 $ validator = $ this ->factory ->createInstanceFor ('string ' );
154137 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -161,12 +144,9 @@ protected function checkString($value, $schema = null, ?JsonPointer $path = null
161144 *
162145 * @param mixed $value
163146 * @param mixed $schema
164- * @param JsonPointer|null $path
165147 * @param mixed $i
166- *
167- * @return void
168148 */
169- protected function checkNumber ($ value , $ schema = null , ?JsonPointer $ path = null , $ i = null )
149+ protected function checkNumber ($ value , $ schema = null , ?JsonPointer $ path = null , $ i = null ): void
170150 {
171151 $ validator = $ this ->factory ->createInstanceFor ('number ' );
172152 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -179,12 +159,9 @@ protected function checkNumber($value, $schema = null, ?JsonPointer $path = null
179159 *
180160 * @param mixed $value
181161 * @param mixed $schema
182- * @param JsonPointer|null $path
183162 * @param mixed $i
184- *
185- * @return void
186163 */
187- protected function checkEnum ($ value , $ schema = null , ?JsonPointer $ path = null , $ i = null )
164+ protected function checkEnum ($ value , $ schema = null , ?JsonPointer $ path = null , $ i = null ): void
188165 {
189166 $ validator = $ this ->factory ->createInstanceFor ('enum ' );
190167 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -197,12 +174,9 @@ protected function checkEnum($value, $schema = null, ?JsonPointer $path = null,
197174 *
198175 * @param mixed $value
199176 * @param mixed $schema
200- * @param JsonPointer|null $path
201177 * @param mixed $i
202- *
203- * @return void
204178 */
205- protected function checkConst ($ value , $ schema = null , ?JsonPointer $ path = null , $ i = null )
179+ protected function checkConst ($ value , $ schema = null , ?JsonPointer $ path = null , $ i = null ): void
206180 {
207181 $ validator = $ this ->factory ->createInstanceFor ('const ' );
208182 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -215,12 +189,9 @@ protected function checkConst($value, $schema = null, ?JsonPointer $path = null,
215189 *
216190 * @param mixed $value
217191 * @param mixed $schema
218- * @param JsonPointer|null $path
219192 * @param mixed $i
220- *
221- * @return void
222193 */
223- protected function checkFormat ($ value , $ schema = null , ?JsonPointer $ path = null , $ i = null )
194+ protected function checkFormat ($ value , $ schema = null , ?JsonPointer $ path = null , $ i = null ): void
224195 {
225196 $ validator = $ this ->factory ->createInstanceFor ('format ' );
226197 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -230,10 +201,8 @@ protected function checkFormat($value, $schema = null, ?JsonPointer $path = null
230201
231202 /**
232203 * Get the type check based on the set check mode.
233- *
234- * @return TypeCheck\TypeCheckInterface
235204 */
236- protected function getTypeCheck ()
205+ protected function getTypeCheck (): TypeCheck \ TypeCheckInterface
237206 {
238207 return $ this ->factory ->getTypeCheck ();
239208 }
0 commit comments