From d22211c4b4ea8e65261be69907313d89f7a39399 Mon Sep 17 00:00:00 2001 From: Marco Vito Moscaritolo Date: Sun, 19 Jul 2015 20:09:27 +0200 Subject: [PATCH] Improved docs. --- PHPCI/Builder.php | 10 ++++++++++ PHPCI/Helper/LoginIsDisabled.php | 14 ++++++++------ PHPCI/Helper/MailerFactory.php | 8 ++++++-- public/index.php | 1 + 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/PHPCI/Builder.php b/PHPCI/Builder.php index 39e8ca41..930777c5 100644 --- a/PHPCI/Builder.php +++ b/PHPCI/Builder.php @@ -99,6 +99,7 @@ class Builder implements LoggerAwareInterface /** * Set up the builder. + * * @param \PHPCI\Model\Build $build * @param LoggerInterface $logger */ @@ -130,6 +131,7 @@ class Builder implements LoggerAwareInterface /** * Set the config array, as read from phpci.yml + * * @param array|null $config * @throws \Exception */ @@ -144,6 +146,7 @@ class Builder implements LoggerAwareInterface /** * Access a variable from the phpci.yml file. + * * @param string * @return mixed */ @@ -160,6 +163,7 @@ class Builder implements LoggerAwareInterface /** * Access a variable from the config.yml + * * @param $key * @return mixed */ @@ -259,6 +263,7 @@ class Builder implements LoggerAwareInterface /** * Find a binary required by a plugin. + * * @param string $binary * @param bool $quiet * @@ -272,6 +277,7 @@ class Builder implements LoggerAwareInterface /** * Replace every occurrence of the interpolation vars in the given string * Example: "This is build %PHPCI_BUILD%" => "This is build 182" + * * @param string $input * @return string */ @@ -328,6 +334,7 @@ class Builder implements LoggerAwareInterface /** * Write to the build log. + * * @param $message * @param string $level * @param array $context @@ -339,6 +346,7 @@ class Builder implements LoggerAwareInterface /** * Add a success-coloured message to the log. + * * @param string */ public function logSuccess($message) @@ -348,6 +356,7 @@ class Builder implements LoggerAwareInterface /** * Add a failure-coloured message to the log. + * * @param string $message * @param \Exception $exception The exception that caused the error. */ @@ -359,6 +368,7 @@ class Builder implements LoggerAwareInterface * Returns a configured instance of the plugin factory. * * @param Build $build + * * @return PluginFactory */ private function buildPluginFactory(Build $build) diff --git a/PHPCI/Helper/LoginIsDisabled.php b/PHPCI/Helper/LoginIsDisabled.php index 437b95cd..5732c172 100644 --- a/PHPCI/Helper/LoginIsDisabled.php +++ b/PHPCI/Helper/LoginIsDisabled.php @@ -12,15 +12,17 @@ namespace PHPCI\Helper; use b8\Config; /** -* Login Is Disabled Helper - Checks if login is disalbed in the view -* @author Stephen Ball -* @package PHPCI -* @subpackage Web -*/ + * Login Is Disabled Helper - Checks if login is disalbed in the view + * + * @author Stephen Ball + * @package PHPCI + * @subpackage Web + */ class LoginIsDisabled { /** * Checks if + * * @param $method * @param array $params * @return mixed|null @@ -28,7 +30,7 @@ class LoginIsDisabled public function __call($method, $params = array()) { unset($method, $params); - + $config = Config::getInstance(); $state = (bool) $config->get('phpci.authentication_settings.state', false); diff --git a/PHPCI/Helper/MailerFactory.php b/PHPCI/Helper/MailerFactory.php index 641c06b9..37fed72a 100644 --- a/PHPCI/Helper/MailerFactory.php +++ b/PHPCI/Helper/MailerFactory.php @@ -11,6 +11,7 @@ namespace PHPCI\Helper; /** * Class MailerFactory helps to set up and configure a SwiftMailer object. + * * @package PHPCI\Helper */ class MailerFactory @@ -22,6 +23,7 @@ class MailerFactory /** * Set the mailer factory configuration. + * * @param array $config */ public function __construct($config = array()) @@ -34,7 +36,8 @@ class MailerFactory } /** - * Returns an instance of Swift_Mailer based on the config.s + * Returns an instance of Swift_Mailer based on the config. + * * @return \Swift_Mailer */ public function getSwiftMailerFromConfig() @@ -61,7 +64,9 @@ class MailerFactory /** * Return a specific configuration value by key. + * * @param $configName + * * @return null|string */ public function getMailConfig($configName) @@ -70,7 +75,6 @@ class MailerFactory return $this->emailConfig[$configName]; } else { // Check defaults - switch($configName) { case 'smtp_address': return "localhost"; diff --git a/public/index.php b/public/index.php index d83582f3..27986c77 100644 --- a/public/index.php +++ b/public/index.php @@ -12,6 +12,7 @@ session_start(); require_once(__DIR__ . '/../bootstrap.php'); +/** @var PHPCI\Application */ $app = $container->get('application'); print $app->handleRequest();