File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -77,9 +77,9 @@ public function addErrors(array $errors)
77
77
}
78
78
}
79
79
80
- public function getErrors ($ errorContext = null )
80
+ public function getErrors ($ errorContext = Validator:: ERROR_ALL )
81
81
{
82
- if ($ errorContext === null ) {
82
+ if ($ errorContext === Validator:: ERROR_ALL ) {
83
83
return $ this ->errors ;
84
84
}
85
85
@@ -90,9 +90,9 @@ public function getErrors($errorContext = null)
90
90
});
91
91
}
92
92
93
- public function numErrors ($ errorContext = null )
93
+ public function numErrors ($ errorContext = Validator:: ERROR_ALL )
94
94
{
95
- if ($ errorContext === null ) {
95
+ if ($ errorContext === Validator:: ERROR_ALL ) {
96
96
return count ($ this ->errors );
97
97
}
98
98
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ class Validator extends BaseConstraint
26
26
const SCHEMA_MEDIA_TYPE = 'application/schema+json ' ;
27
27
28
28
const ERROR_NONE = 0x00000000 ;
29
+ const ERROR_ALL = ~self ::ERROR_NONE ;
29
30
const ERROR_DOCUMENT_VALIDATION = 0x00000001 ;
30
31
const ERROR_SCHEMA_VALIDATION = 0x00000002 ;
31
32
You can’t perform that action at this time.
0 commit comments