You are here

public function GravInstallerTest::getPackageVars in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/composer/installers/tests/Composer/Installers/Test/GravInstallerTest.php \Composer\Installers\Test\GravInstallerTest::getPackageVars()

Parameters

$package \Composer\Package\PackageInterface:

1 call to GravInstallerTest::getPackageVars()
GravInstallerTest::testInflectPackageVars in vendor/composer/installers/tests/Composer/Installers/Test/GravInstallerTest.php

File

vendor/composer/installers/tests/Composer/Installers/Test/GravInstallerTest.php, line 49

Class

GravInstallerTest

Namespace

Composer\Installers\Test

Code

public function getPackageVars($package) {
  $type = $package
    ->getType();
  $prettyName = $package
    ->getPrettyName();
  if (strpos($prettyName, '/') !== false) {
    list($vendor, $name) = explode('/', $prettyName);
  }
  else {
    $vendor = '';
    $name = $prettyName;
  }
  return compact('name', 'vendor', 'type');
}