Move the whole compiler GET of the component object to now use the container->component object/class.

This commit is contained in:
2023-01-22 02:38:21 +02:00
parent f44f385159
commit e6c02a29f6
115 changed files with 13148 additions and 6292 deletions

View File

@@ -88,9 +88,10 @@ class CoreValidation implements CoreValidationInterface
}
// remove the Rule.php from the name
$this->rules = array_map( function ($name): string {
return str_replace(array('./','Rule.php'), '', $name);
}, $rules);
$this->rules = array_map(
fn($name): string => str_replace(array('./','Rule.php'), '', (string) $name),
$rules
);
}
// return rules if found
@@ -99,9 +100,10 @@ class CoreValidation implements CoreValidationInterface
// check if the names should be all lowercase
if ($lowercase)
{
return array_map( function($item): string {
return strtolower($item);
}, $this->rules);
return array_map(
fn($item): string => strtolower((string) $item),
$this->rules
);
}
return $this->rules;
}