@@ -40,7 +40,7 @@ abstract class Constraint extends BaseConstraint implements ConstraintInterface
4040 *
4141 * @return JsonPointer;
4242 */
43- protected function incrementPath (JsonPointer $ path = null , $ i )
43+ protected function incrementPath (? JsonPointer $ path = null , $ i )
4444 {
4545 $ path = $ path ?: new JsonPointer ('' );
4646
@@ -66,7 +66,7 @@ protected function incrementPath(JsonPointer $path = null, $i)
6666 * @param JsonPointer|null $path
6767 * @param mixed $i
6868 */
69- protected function checkArray (&$ value , $ schema = null , JsonPointer $ path = null , $ i = null )
69+ protected function checkArray (&$ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
7070 {
7171 $ validator = $ this ->factory ->createInstanceFor ('collection ' );
7272 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -84,7 +84,7 @@ protected function checkArray(&$value, $schema = null, JsonPointer $path = null,
8484 * @param mixed $additionalProperties
8585 * @param mixed $patternProperties
8686 */
87- protected function checkObject (&$ value , $ schema = null , JsonPointer $ path = null , $ properties = null ,
87+ protected function checkObject (&$ value , $ schema = null , ? JsonPointer $ path = null , $ properties = null ,
8888 $ additionalProperties = null , $ patternProperties = null , $ appliedDefaults = array ())
8989 {
9090 /** @var ObjectConstraint $validator */
@@ -102,7 +102,7 @@ protected function checkObject(&$value, $schema = null, JsonPointer $path = null
102102 * @param JsonPointer|null $path
103103 * @param mixed $i
104104 */
105- protected function checkType (&$ value , $ schema = null , JsonPointer $ path = null , $ i = null )
105+ protected function checkType (&$ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
106106 {
107107 $ validator = $ this ->factory ->createInstanceFor ('type ' );
108108 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -118,7 +118,7 @@ protected function checkType(&$value, $schema = null, JsonPointer $path = null,
118118 * @param JsonPointer|null $path
119119 * @param mixed $i
120120 */
121- protected function checkUndefined (&$ value , $ schema = null , JsonPointer $ path = null , $ i = null , $ fromDefault = false )
121+ protected function checkUndefined (&$ value , $ schema = null , ? JsonPointer $ path = null , $ i = null , $ fromDefault = false )
122122 {
123123 /** @var UndefinedConstraint $validator */
124124 $ validator = $ this ->factory ->createInstanceFor ('undefined ' );
@@ -136,7 +136,7 @@ protected function checkUndefined(&$value, $schema = null, JsonPointer $path = n
136136 * @param JsonPointer|null $path
137137 * @param mixed $i
138138 */
139- protected function checkString ($ value , $ schema = null , JsonPointer $ path = null , $ i = null )
139+ protected function checkString ($ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
140140 {
141141 $ validator = $ this ->factory ->createInstanceFor ('string ' );
142142 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -147,12 +147,12 @@ protected function checkString($value, $schema = null, JsonPointer $path = null,
147147 /**
148148 * Checks a number element
149149 *
150- * @param mixed $value
151- * @param mixed $schema
152- * @param JsonPointer $path
153- * @param mixed $i
150+ * @param mixed $value
151+ * @param mixed $schema
152+ * @param JsonPointer|null $path
153+ * @param mixed $i
154154 */
155- protected function checkNumber ($ value , $ schema = null , JsonPointer $ path = null , $ i = null )
155+ protected function checkNumber ($ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
156156 {
157157 $ validator = $ this ->factory ->createInstanceFor ('number ' );
158158 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -168,7 +168,7 @@ protected function checkNumber($value, $schema = null, JsonPointer $path = null,
168168 * @param JsonPointer|null $path
169169 * @param mixed $i
170170 */
171- protected function checkEnum ($ value , $ schema = null , JsonPointer $ path = null , $ i = null )
171+ protected function checkEnum ($ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
172172 {
173173 $ validator = $ this ->factory ->createInstanceFor ('enum ' );
174174 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -184,7 +184,7 @@ protected function checkEnum($value, $schema = null, JsonPointer $path = null, $
184184 * @param JsonPointer|null $path
185185 * @param mixed $i
186186 */
187- protected function checkConst ($ value , $ schema = null , JsonPointer $ path = null , $ i = null )
187+ protected function checkConst ($ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
188188 {
189189 $ validator = $ this ->factory ->createInstanceFor ('const ' );
190190 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -200,7 +200,7 @@ protected function checkConst($value, $schema = null, JsonPointer $path = null,
200200 * @param JsonPointer|null $path
201201 * @param mixed $i
202202 */
203- protected function checkFormat ($ value , $ schema = null , JsonPointer $ path = null , $ i = null )
203+ protected function checkFormat ($ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
204204 {
205205 $ validator = $ this ->factory ->createInstanceFor ('format ' );
206206 $ validator ->check ($ value , $ schema , $ path , $ i );
0 commit comments