You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I understand correctly from the code, Collectors don't have a configuration per se, but rather have access to all the arguments passed to the collector. As a result, they handle those values as they wish without any validation of any kind.
Example:
// src/Collector/ClassNameCollector.phpprivatefunctiongetRegexByConfiguration(array$configuration)
{
if (!isset($configuration['regex'])) {
thrownew \LogicException('ClassNameCollector needs the regex configuration.');
}
return$configuration['regex'];
}
Wouldn't it be better to change that and have one configuration per collector? That way we could add a validation step when creating the collector configuration.
The text was updated successfully, but these errors were encountered:
this will be definitely changed in the near feature when i start working on #76
right now i don't want to promise that a validation step will be possible. i would prefer a "hackable" configuration over static checks, but i'll do my best to reach both goals.
If I understand correctly from the code, Collectors don't have a configuration per se, but rather have access to all the arguments passed to the collector. As a result, they handle those values as they wish without any validation of any kind.
Example:
Wouldn't it be better to change that and have one configuration per collector? That way we could add a validation step when creating the collector configuration.
The text was updated successfully, but these errors were encountered: