def METHOD_NAME(self, cwd):
    """
    Search parent directories for composer.json.
    Starting at the current working directory. Go up one directory
    at a time checking if that directory contains a composer.json
    file. If it does, return that directory.
    """
    manifest_path = os.path.normpath(os.path.join(cwd, 'composer.json'))
    bin_path = os.path.normpath(os.path.join(cwd, 'vendor/bin/'))
    if os.path.isfile(manifest_path) and os.path.isdir(bin_path):
        return manifest_path
    parent = os.path.dirname(cwd)
    if parent == '/' or parent == cwd:
        return None
    return self.METHOD_NAME(parent)