public function __construct(array $sourceLocators = [])
{
// This slightly confusing code simply type-checks the $sourceLocators
// array by unpacking them and splatting them in the closure.
$validator = function (SourceLocator ...$sourceLocator) {
return $sourceLocator;
};
$this->sourceLocators = $validator(...$sourceLocators);
}