@@ -190,15 +190,6 @@ public function merge(Resolver $schema): Resolver
190190 return $ this ;
191191 }
192192
193- /**
194- * @return array<string>
195- */
196- private function resolveAllowedKeys (): array
197- {
198- $ allowedKeys = array_merge (array_keys ($ this ->defaults ), $ this ->required );
199- return $ allowedKeys ;
200- }
201-
202193 public function definitions (): Definitions
203194 {
204195 $ definitions = [];
@@ -216,6 +207,20 @@ public function definitions(): Definitions
216207 return new Definitions ($ definitions );
217208 }
218209
210+ public function errors (): ResolverErrors
211+ {
212+ return new ResolverErrors ($ this ->errors );
213+ }
214+
215+ /**
216+ * @return array<string>
217+ */
218+ private function resolveAllowedKeys (): array
219+ {
220+ $ allowedKeys = array_merge (array_keys ($ this ->defaults ), $ this ->required );
221+ return $ allowedKeys ;
222+ }
223+
219224 private function throwOrLogError (InvalidMap $ error ): void
220225 {
221226 if (!$ this ->ignoreErrors ) {
@@ -225,6 +230,11 @@ private function throwOrLogError(InvalidMap $error): void
225230 $ this ->errors [] = $ error ;
226231 }
227232
233+ /**
234+ * @param array<string,mixed> $config
235+ * @param string[] $keys
236+ * @return array<string,mixed> $config
237+ */
228238 private function removeKeys (array $ config , array $ keys ): array
229239 {
230240 foreach ($ keys as $ remove ) {
@@ -233,12 +243,4 @@ private function removeKeys(array $config, array $keys): array
233243
234244 return $ config ;
235245 }
236-
237- /**
238- * @return InvalidMap[]
239- */
240- public function errors (): array
241- {
242- return $ this ->errors ;
243- }
244246}
0 commit comments