src/Helpers/Composer.php
public function packageExists($namespace, $package)
    {
        $folder = $this->vendorFolder . $namespace;
        $folderExists = file_exists($folder);

        if (!$folderExists) {
            return false;
        }

        $packageFolder = $folder . '/' . $package;
        $packageFolderExists = file_exists($packageFolder);

        return $packageFolderExists;
    }
public function packageExists($namespace, $package)
    {
        $folder = $this->vendorFolder . $namespace;
        $folderExists = file_exists($folder);

        if (!$folderExists) {
            return false;
        }

        $packageFolder = $folder . '/' . $package;
        $packageFolderExists = file_exists($packageFolder);

        return $packageFolderExists;
    }
public function packageExists ( $ namespace , $ package ) { $ folder = $ this -> vendorFolder . $ namespace ; $ folderExists = file_exists ( $ folder ) ; if ( ! $ folderExists ) { return false ; } $ packageFolder = $ folder . '/' . $ package ; $ packageFolderExists = file_exists ( $ packageFolder ) ; return $ packageFolderExists ; }
Determine if a composer package exists.

@param string $namespace Package namespace.
@param string $package   Package name.

@return bool
Determine if a composer package exists .