Skip to content

Commit

Permalink
phpdoc, style
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Oct 26, 2018
1 parent 2d5723f commit c400fa4
Show file tree
Hide file tree
Showing 12 changed files with 205 additions and 107 deletions.
5 changes: 2 additions & 3 deletions lib/Components/Component.php
Expand Up @@ -143,7 +143,7 @@ public function getDependencyList();
* Return a data array with the most relevant information about this
* component.
*
* @return array Information about this component.
* @return stdClass Information about this component.
*/
public function getData();

Expand Down Expand Up @@ -178,8 +178,7 @@ public function changed($log, $options);
/**
* Timestamp the package.xml file with the current time.
*
* @param Components_Output $output The output handler.
* @param array $options Options for the operation.
* @param array $options Options for the operation.
*
* @return string The success message.
*/
Expand Down
64 changes: 42 additions & 22 deletions lib/Components/Component/Base.php
Expand Up @@ -60,6 +60,7 @@ public function __construct(
* Return the name of the component.
*
* @return string The component name.
* @throws Components_Exception
*/
public function getName()
{
Expand All @@ -70,6 +71,7 @@ public function getName()
* Return the component summary.
*
* @return string The summary of the component.
* @throws Components_Exception
*/
public function getSummary()
{
Expand All @@ -80,6 +82,7 @@ public function getSummary()
* Return the component description.
*
* @return string The description of the component.
* @throws Components_Exception
*/
public function getDescription()
{
Expand All @@ -90,6 +93,7 @@ public function getDescription()
* Return the version of the component.
*
* @return string The component version.
* @throws Components_Exception
*/
public function getVersion()
{
Expand All @@ -100,6 +104,7 @@ public function getVersion()
* Returns the previous version of the component.
*
* @return string The previous component version.
* @throws Components_Exception
*/
public function getPreviousVersion()
{
Expand Down Expand Up @@ -132,6 +137,7 @@ function($a, $b) {
* Return the last release date of the component.
*
* @return string The date.
* @throws Components_Exception
*/
public function getDate()
{
Expand All @@ -142,6 +148,7 @@ public function getDate()
* Return the channel of the component.
*
* @return string The component channel.
* @throws Components_Exception
*/
public function getChannel()
{
Expand All @@ -152,6 +159,7 @@ public function getChannel()
* Return the dependencies for the component.
*
* @return array The component dependencies.
* @throws Components_Exception
*/
public function getDependencies()
{
Expand All @@ -164,6 +172,7 @@ public function getDependencies()
* @param string $key "release" or "api"
*
* @return string The stability.
* @throws Components_Exception
*/
public function getState($key = 'release')
{
Expand All @@ -174,6 +183,7 @@ public function getState($key = 'release')
* Return the package lead developers.
*
* @return string The package lead developers.
* @throws Components_Exception
*/
public function getLeads()
{
Expand All @@ -184,6 +194,7 @@ public function getLeads()
* Return the component license.
*
* @return string The component license.
* @throws Components_Exception
*/
public function getLicense()
{
Expand All @@ -194,6 +205,7 @@ public function getLicense()
* Return the component license URI.
*
* @return string The component license URI.
* @throws Components_Exception
*/
public function getLicenseLocation()
{
Expand All @@ -204,6 +216,7 @@ public function getLicenseLocation()
* Return the package notes.
*
* @return string The notes for the current release.
* @throws Components_Exception
*/
public function getNotes()
{
Expand All @@ -224,6 +237,7 @@ public function hasLocalPackageXml()
* Returns the link to the change log.
*
* @return string The link to the change log.
* @throws Components_Exception
*/
public function getChangelogLink()
{
Expand All @@ -234,7 +248,8 @@ public function getChangelogLink()
* Return a data array with the most relevant information about this
* component.
*
* @return array Information about this component.
* @return stdClass Information about this component.
* @throws Components_Exception
*/
public function getData()
{
Expand Down Expand Up @@ -268,16 +283,17 @@ public function getDependencyList()
*/
public function getDocumentOrigin()
{
return null;
}

/**
* Update the package.xml file for this component.
*
* @param string $action The action to perform. Either "update", "diff",
* or "print".
* @param array $options Options for this operation.
* @param array $options Options for this operation.
*
* @return NULL
* @throws Components_Exception
*/
public function updatePackage($action, $options)
{
Expand All @@ -289,10 +305,11 @@ public function updatePackage($action, $options)
/**
* Update the component changelog.
*
* @param string $log The log entry.
* @param array $options Options for the operation.
* @param string $log The log entry.
* @param array $options Options for the operation.
*
* @return string[] Output messages.
* @return string[] Output messages.
* @throws Components_Exception
*/
public function changed($log, $options)
{
Expand All @@ -304,9 +321,10 @@ public function changed($log, $options)
/**
* Timestamp the package.xml file with the current time.
*
* @param array $options Options for the operation.
* @param array $options Options for the operation.
*
* @return string The success message.
* @throws Components_Exception
*/
public function timestampAndSync($options)
{
Expand All @@ -322,9 +340,9 @@ public function timestampAndSync($options)
* @param string $initial_note The text for the initial note.
* @param string $stability_api The API stability for the next release.
* @param string $stability_release The stability for the next release.
* @param array $options Options for the operation.
* @param array $options Options for the operation.
*
* @return NULL
* @throws Components_Exception
*/
public function nextVersion(
$version,
Expand All @@ -344,9 +362,10 @@ public function nextVersion(
*
* @param string $changes New version for the CHANGES file.
* @param string $app New version for the Application.php file.
* @param array $options Options for the operation.
* @param array $options Options for the operation.
*
* @return string The success message.
* @throws Components_Exception
*/
public function currentSentinel($changes, $app, $options)
{
Expand All @@ -358,11 +377,11 @@ public function currentSentinel($changes, $app, $options)
/**
* Tag the component.
*
* @param string $tag Tag name.
* @param string $message Tag message.
* @param Components_Helper_Commit $commit The commit helper.
* @param string $tag Tag name.
* @param string $message Tag message.
* @param Components_Helper_Commit $commit The commit helper.
*
* @return NULL
* @throws Components_Exception
*/
public function tag($tag, $message, $commit)
{
Expand All @@ -376,7 +395,7 @@ public function tag($tag, $message, $commit)
*
* @param Components_Helper_Root $helper The root helper.
*
* @return NULL
* @throws Components_Exception
*/
public function repositoryRoot(Components_Helper_Root $helper)
{
Expand All @@ -388,11 +407,12 @@ public function repositoryRoot(Components_Helper_Root $helper)
/**
* Install the channel of this component in the environment.
*
* @param Components_Pear_Environment $env The environment to install
* into.
* @param array $options Install options.
* @param Components_Pear_Environment $env The environment to install
* into.
* @param array $options Install options.
*
* @return NULL
* @throws Components_Exception
* @throws Components_Exception_Pear
*/
public function installChannel(
Components_Pear_Environment $env, $options = array()
Expand Down Expand Up @@ -432,8 +452,6 @@ protected function getFactory()
* Create the specified directory.
*
* @param string $destination The destination path.
*
* @return NULL
*/
protected function createDestination($destination)
{
Expand All @@ -446,6 +464,7 @@ protected function createDestination($destination)
* Return a PEAR package representation for the component.
*
* @return Horde_Pear_Package_Xml The package representation.
* @throws Components_Exception
*/
protected function getPackageXml()
{
Expand All @@ -457,7 +476,7 @@ protected function getPackageXml()
*
* @param array $options The current options.
*
* @return array The installatin options.
* @return array The installation options.
*/
protected function getBaseInstallationOptions($options)
{
Expand All @@ -471,6 +490,7 @@ protected function getBaseInstallationOptions($options)
* Check if the library has a CI job.
*
* @return boolean True if a CI job is defined.
* @throws Components_Exception
*/
protected function _hasCi()
{
Expand Down
15 changes: 10 additions & 5 deletions lib/Components/Component/Factory.php
Expand Up @@ -33,7 +33,7 @@ class Components_Component_Factory
/**
* The factory for PEAR handlers.
*
* @var Components_Factory
* @var Components_Pear_Factory
*/
protected $_factory;

Expand All @@ -47,7 +47,7 @@ class Components_Component_Factory
/**
* The output handler.
*
* @var Component_Output
* @var Components_Output
*/
protected $_output;

Expand Down Expand Up @@ -88,7 +88,7 @@ class Components_Component_Factory
* components.
* @param Horde_Http_Client $client The HTTP client for remote
* access.
* @param Component_Output $output The output handler.
* @param Components_Output $output The output handler.
* @param Components_Release_Notes $notes The release notes.
*/
public function __construct(
Expand Down Expand Up @@ -206,8 +206,7 @@ public function createDependencyList(Components_Component $component)
/**
* Create a component dependency representation.
*
* @param array $dependencies The dependency information.
* @param Components_Component $parent The parent component.
* @param array $dependencies The dependency information.
*
* @return Components_Component_Dependency The dependency.
*/
Expand Down Expand Up @@ -305,6 +304,8 @@ public function createPackageXml($package_xml_path)
*
* @param string $package_xml_dir Path to the parent directory of the
* new package.xml file.
*
* @throws Horde_Pear_Exception
*/
public function createPackageFile($package_xml_dir)
{
Expand All @@ -317,6 +318,8 @@ public function createPackageFile($package_xml_dir)
*
* @param string $package_xml_dir Path to the parent directory of the
* new package.xml file.
*
* @throws Horde_Pear_Exception
*/
public function createThemePackageFile($package_xml_dir)
{
Expand All @@ -331,6 +334,7 @@ public function createThemePackageFile($package_xml_dir)
* new package.xml file.
*
* @return Horde_Pear_Package_Contents_List
* @throws Components_Exception
*/
public function createContentList($package_xml_dir)
{
Expand All @@ -348,6 +352,7 @@ public function createContentList($package_xml_dir)
* new package.xml file.
*
* @return Horde_Pear_Package_Contents_List
* @throws Components_Exception
*/
public function createThemeContentList($package_xml_dir)
{
Expand Down

0 comments on commit c400fa4

Please sign in to comment.