OverwriteRules
This commit is contained in:
parent
3a26a2e0c2
commit
709201547c
8 changed files with 252 additions and 19 deletions
|
|
@ -60,7 +60,7 @@ class RuleFactory
|
|||
$paramsSub = self::getParametersMeta($type->getFqsen()->__toString());
|
||||
$rules = array_merge(
|
||||
$rules,
|
||||
self::buildRules($paramsSub, $prefix . '.'),
|
||||
self::infer($paramsSub, $prefix . '.'),
|
||||
);
|
||||
}
|
||||
return $rules;
|
||||
|
|
@ -103,7 +103,7 @@ class RuleFactory
|
|||
* @param array<ParameterMeta> $parameters
|
||||
* @return array<string,array<int,string|Rule>>
|
||||
*/
|
||||
public static function buildRules(array $parameters, string $prefix): array
|
||||
public static function infer(array $parameters, string $prefix): array
|
||||
{
|
||||
$rules = [];
|
||||
foreach ($parameters as $parameter) {
|
||||
|
|
@ -163,7 +163,7 @@ class RuleFactory
|
|||
$paramsSub = self::getParametersMeta($type->getName());
|
||||
$rules = array_merge(
|
||||
$rules,
|
||||
self::buildRules($paramsSub, $root . '.'),
|
||||
self::infer($paramsSub, $root . '.'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue