src/Locator.php
public function locate($command)
    {
        $paths = $this->locateAll($command);

        return empty($paths) ? null : $paths[0];
    }
public function locate($command)
    {
        $paths = $this->locateAll($command);

        return empty($paths) ? null : $paths[0];
    }
Locates the given command in the user's path.

@api
@param string $command The command to locate.
@return string|null The full path to the command or null if not path
found.