2222
2323class Validator implements Validatable
2424{
25- private Context $ context ;
25+ protected Context $ context ;
2626
27- private PropertyValidator $ validator ;
27+ protected PropertyValidator $ validator ;
2828
2929 /**
3030 * @throws ContextPropertyException
@@ -118,7 +118,7 @@ public function validate(array $data, string|object $model): object
118118 return $ validModel ;
119119 }
120120
121- private function getDefaultPropertyValidator (): PropertyValidator
121+ protected function getDefaultPropertyValidator (): PropertyValidator
122122 {
123123 $ chainRulesExtractor = new ChainValidator ;
124124 $ chainRulesExtractor ->add (new TypeHintValidator );
@@ -133,7 +133,7 @@ private function getDefaultPropertyValidator(): PropertyValidator
133133 * @throws ContextPropertyException
134134 * @throws InvalidOptionException
135135 */
136- private function getDefaultAliasGenerator (ReflectionClass $ reflectionClass ): callable
136+ protected function getDefaultAliasGenerator (ReflectionClass $ reflectionClass ): callable
137137 {
138138 $ allAttributes = $ reflectionClass ->getAttributes (Options \AliasGenerator::class);
139139 foreach ($ allAttributes as $ attribute ) {
@@ -155,7 +155,7 @@ private function getDefaultAliasGenerator(ReflectionClass $reflectionClass): cal
155155 /**
156156 * Retrieves the alias for a given property
157157 */
158- private function getAliasName (ReflectionProperty $ reflectionProperty , callable $ defaultAliasGenerator ): string
158+ protected function getAliasName (ReflectionProperty $ reflectionProperty , callable $ defaultAliasGenerator ): string
159159 {
160160 $ propertyName = $ reflectionProperty ->getName ();
161161 $ allAttributes = $ reflectionProperty ->getAttributes (Options \Alias::class);
@@ -171,7 +171,7 @@ private function getAliasName(ReflectionProperty $reflectionProperty, callable $
171171 /**
172172 * Checks if a given property is to be ignored
173173 */
174- private function isToValidate (ReflectionProperty $ reflectionProperty ): bool
174+ protected function isToValidate (ReflectionProperty $ reflectionProperty ): bool
175175 {
176176 $ allAttributes = $ reflectionProperty ->getAttributes (Options \Ignore::class);
177177 foreach ($ allAttributes as $ attribute ) {
0 commit comments