@@ -39,7 +39,7 @@ abstract class Constraint extends BaseConstraint implements ConstraintInterface
3939 *
4040 * @return JsonPointer;
4141 */
42- protected function incrementPath (JsonPointer $ path = null , $ i )
42+ protected function incrementPath (? JsonPointer $ path = null , $ i )
4343 {
4444 $ path = $ path ?: new JsonPointer ('' );
4545
@@ -65,7 +65,7 @@ protected function incrementPath(JsonPointer $path = null, $i)
6565 * @param JsonPointer|null $path
6666 * @param mixed $i
6767 */
68- protected function checkArray (&$ value , $ schema = null , JsonPointer $ path = null , $ i = null )
68+ protected function checkArray (&$ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
6969 {
7070 $ validator = $ this ->factory ->createInstanceFor ('collection ' );
7171 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -83,7 +83,7 @@ protected function checkArray(&$value, $schema = null, JsonPointer $path = null,
8383 * @param mixed $additionalProperties
8484 * @param mixed $patternProperties
8585 */
86- protected function checkObject (&$ value , $ schema = null , JsonPointer $ path = null , $ properties = null ,
86+ protected function checkObject (&$ value , $ schema = null , ? JsonPointer $ path = null , $ properties = null ,
8787 $ additionalProperties = null , $ patternProperties = null , $ appliedDefaults = array ())
8888 {
8989 $ validator = $ this ->factory ->createInstanceFor ('object ' );
@@ -100,7 +100,7 @@ protected function checkObject(&$value, $schema = null, JsonPointer $path = null
100100 * @param JsonPointer|null $path
101101 * @param mixed $i
102102 */
103- protected function checkType (&$ value , $ schema = null , JsonPointer $ path = null , $ i = null )
103+ protected function checkType (&$ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
104104 {
105105 $ validator = $ this ->factory ->createInstanceFor ('type ' );
106106 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -116,7 +116,7 @@ protected function checkType(&$value, $schema = null, JsonPointer $path = null,
116116 * @param JsonPointer|null $path
117117 * @param mixed $i
118118 */
119- protected function checkUndefined (&$ value , $ schema = null , JsonPointer $ path = null , $ i = null , $ fromDefault = false )
119+ protected function checkUndefined (&$ value , $ schema = null , ? JsonPointer $ path = null , $ i = null , $ fromDefault = false )
120120 {
121121 $ validator = $ this ->factory ->createInstanceFor ('undefined ' );
122122
@@ -133,7 +133,7 @@ protected function checkUndefined(&$value, $schema = null, JsonPointer $path = n
133133 * @param JsonPointer|null $path
134134 * @param mixed $i
135135 */
136- protected function checkString ($ value , $ schema = null , JsonPointer $ path = null , $ i = null )
136+ protected function checkString ($ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
137137 {
138138 $ validator = $ this ->factory ->createInstanceFor ('string ' );
139139 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -149,7 +149,7 @@ protected function checkString($value, $schema = null, JsonPointer $path = null,
149149 * @param JsonPointer $path
150150 * @param mixed $i
151151 */
152- protected function checkNumber ($ value , $ schema = null , JsonPointer $ path = null , $ i = null )
152+ protected function checkNumber ($ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
153153 {
154154 $ validator = $ this ->factory ->createInstanceFor ('number ' );
155155 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -165,7 +165,7 @@ protected function checkNumber($value, $schema = null, JsonPointer $path = null,
165165 * @param JsonPointer|null $path
166166 * @param mixed $i
167167 */
168- protected function checkEnum ($ value , $ schema = null , JsonPointer $ path = null , $ i = null )
168+ protected function checkEnum ($ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
169169 {
170170 $ validator = $ this ->factory ->createInstanceFor ('enum ' );
171171 $ validator ->check ($ value , $ schema , $ path , $ i );
@@ -181,7 +181,7 @@ protected function checkEnum($value, $schema = null, JsonPointer $path = null, $
181181 * @param JsonPointer|null $path
182182 * @param mixed $i
183183 */
184- protected function checkFormat ($ value , $ schema = null , JsonPointer $ path = null , $ i = null )
184+ protected function checkFormat ($ value , $ schema = null , ? JsonPointer $ path = null , $ i = null )
185185 {
186186 $ validator = $ this ->factory ->createInstanceFor ('format ' );
187187 $ validator ->check ($ value , $ schema , $ path , $ i );
0 commit comments