@@ -122,13 +122,13 @@ protected function validateCommonProperties($value, $schema = null, $path = null
122122 // Draft 4 - Required is an array of strings - e.g. "required": ["foo", ...]
123123 foreach ($ schema ->required as $ required ) {
124124 if (!property_exists ($ value , $ required )) {
125- $ this ->addError ($ required , "the property " . $ required . " is required " );
125+ $ this ->addError ($ required , "The property " . $ required . " is required " );
126126 }
127127 }
128128 } else if (isset ($ schema ->required ) && !is_array ($ schema ->required )) {
129129 // Draft 3 - Required attribute - e.g. "foo": {"type": "string", "required": true}
130130 if ( $ schema ->required && $ value instanceof UndefinedConstraint) {
131- $ this ->addError ($ path , "is missing and it is required " );
131+ $ this ->addError ($ path , "Is missing and it is required " );
132132 }
133133 }
134134 }
@@ -148,7 +148,7 @@ protected function validateCommonProperties($value, $schema = null, $path = null
148148
149149 // if no new errors were raised it must be a disallowed value
150150 if (count ($ this ->getErrors ()) == count ($ initErrors )) {
151- $ this ->addError ($ path , "disallowed value was matched " );
151+ $ this ->addError ($ path , "Disallowed value was matched " );
152152 } else {
153153 $ this ->errors = $ initErrors ;
154154 }
@@ -160,7 +160,7 @@ protected function validateCommonProperties($value, $schema = null, $path = null
160160
161161 // if no new errors were raised then the instance validated against the "not" schema
162162 if (count ($ this ->getErrors ()) == count ($ initErrors )) {
163- $ this ->addError ($ path , "matched a schema which it should not " );
163+ $ this ->addError ($ path , "Matched a schema which it should not " );
164164 } else {
165165 $ this ->errors = $ initErrors ;
166166 }
@@ -170,12 +170,12 @@ protected function validateCommonProperties($value, $schema = null, $path = null
170170 if (is_object ($ value )) {
171171 if (isset ($ schema ->minProperties )) {
172172 if (count (get_object_vars ($ value )) < $ schema ->minProperties ) {
173- $ this ->addError ($ path , "must contain a minimum of " . $ schema ->minProperties . " properties " );
173+ $ this ->addError ($ path , "Must contain a minimum of " . $ schema ->minProperties . " properties " );
174174 }
175175 }
176176 if (isset ($ schema ->maxProperties )) {
177177 if (count (get_object_vars ($ value )) > $ schema ->maxProperties ) {
178- $ this ->addError ($ path , "must contain no more than " . $ schema ->maxProperties . " properties " );
178+ $ this ->addError ($ path , "Must contain no more than " . $ schema ->maxProperties . " properties " );
179179 }
180180 }
181181 }
@@ -209,7 +209,7 @@ protected function validateOfProperties($value, $schema, $path, $i = "")
209209 $ isValid = $ isValid && (count ($ this ->getErrors ()) == count ($ initErrors ));
210210 }
211211 if (!$ isValid ) {
212- $ this ->addError ($ path , "failed to match all schemas " );
212+ $ this ->addError ($ path , "Failed to match all schemas " );
213213 }
214214 }
215215
@@ -224,7 +224,7 @@ protected function validateOfProperties($value, $schema, $path, $i = "")
224224 }
225225 }
226226 if (!$ isValid ) {
227- $ this ->addError ($ path , "failed to match at least one schema " );
227+ $ this ->addError ($ path , "Failed to match at least one schema " );
228228 } else {
229229 $ this ->errors = $ startErrors ;
230230 }
0 commit comments