1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 16:42:57 +00:00

More PSR-2 goodness

This commit is contained in:
Jordi Boggiano 2012-05-22 17:13:15 +02:00
parent 99513ba52b
commit c440b4594a
18 changed files with 108 additions and 108 deletions

View file

@ -24,5 +24,5 @@ interface NotifiableRepositoryInterface extends RepositoryInterface
*
* @param PackageInterface $package Package that is installed
*/
function notifyInstall(PackageInterface $package);
public function notifyInstall(PackageInterface $package);
}

View file

@ -29,7 +29,7 @@ interface RepositoryInterface extends \Countable
*
* @return Boolean
*/
function hasPackage(PackageInterface $package);
public function hasPackage(PackageInterface $package);
/**
* Searches for the first match of a package by name and version.
@ -39,7 +39,7 @@ interface RepositoryInterface extends \Countable
*
* @return PackageInterface|null
*/
function findPackage($name, $version);
public function findPackage($name, $version);
/**
* Searches for all packages matching a name and optionally a version.
@ -49,12 +49,12 @@ interface RepositoryInterface extends \Countable
*
* @return array
*/
function findPackages($name, $version = null);
public function findPackages($name, $version = null);
/**
* Returns list of registered packages.
*
* @return array
*/
function getPackages();
public function getPackages();
}

View file

@ -22,7 +22,7 @@ interface VcsDriverInterface
/**
* Initializes the driver (git clone, svn checkout, fetch info etc)
*/
function initialize();
public function initialize();
/**
* Return the composer.json file information
@ -30,47 +30,47 @@ interface VcsDriverInterface
* @param string $identifier Any identifier to a specific branch/tag/commit
* @return array containing all infos from the composer.json file
*/
function getComposerInformation($identifier);
public function getComposerInformation($identifier);
/**
* Return the root identifier (trunk, master, default/tip ..)
*
* @return string Identifier
*/
function getRootIdentifier();
public function getRootIdentifier();
/**
* Return list of branches in the repository
*
* @return array Branch names as keys, identifiers as values
*/
function getBranches();
public function getBranches();
/**
* Return list of tags in the repository
*
* @return array Tag names as keys, identifiers as values
*/
function getTags();
public function getTags();
/**
* @param string $identifier Any identifier to a specific branch/tag/commit
* @return array With type, url reference and shasum keys.
*/
function getDist($identifier);
public function getDist($identifier);
/**
* @param string $identifier Any identifier to a specific branch/tag/commit
* @return array With type, url and reference keys.
*/
function getSource($identifier);
public function getSource($identifier);
/**
* Return the URL of the repository
*
* @return string
*/
function getUrl();
public function getUrl();
/**
* Return true if the repository has a composer file for a given identifier,
@ -79,7 +79,7 @@ interface VcsDriverInterface
* @param string $identifier Any identifier to a specific branch/tag/commit
* @return boolean Whether the repository has a composer file for a given identifier.
*/
function hasComposerFile($identifier);
public function hasComposerFile($identifier);
/**
* Checks if this driver can handle a given url
@ -89,5 +89,5 @@ interface VcsDriverInterface
* @param Boolean $shallow unless true, only shallow checks (url matching typically) should be done
* @return Boolean
*/
static function supports(IOInterface $io, $url, $deep = false);
public static function supports(IOInterface $io, $url, $deep = false);
}

View file

@ -24,24 +24,24 @@ interface WritableRepositoryInterface extends RepositoryInterface
/**
* Writes repository (f.e. to the disc).
*/
function write();
public function write();
/**
* Adds package to the repository.
*
* @param PackageInterface $package package instance
*/
function addPackage(PackageInterface $package);
public function addPackage(PackageInterface $package);
/**
* Removes package from the repository.
*
* @param PackageInterface $package package instance
*/
function removePackage(PackageInterface $package);
public function removePackage(PackageInterface $package);
/**
* Forces a reload of all packages
*/
function reload();
public function reload();
}