/**
* @return string|array
*/
public function locate(string
$name, string
$currentPath = null, bool
$first = true
) { if ('' ===
$name) { throw new \
InvalidArgumentException('An empty file name is not valid to be located.'
);
} if ($this->
isAbsolutePath($name)) { if (!
file_exists($name)) { throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist.',
$name), 0, null,
[$name]);
} return $name;
} $paths =
$this->paths;
if (null !==
$currentPath) { array_unshift($paths,
$currentPath);
}