Plugin DocBlock clenaup.

This commit is contained in:
Marco Vito Moscaritolo 2015-04-28 09:12:55 +02:00
parent b8443b8af7
commit cfeeaa96b2
38 changed files with 181 additions and 137 deletions

View file

@ -33,6 +33,7 @@ class Atoum implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -62,8 +63,7 @@ class Atoum implements PluginInterface
}
/**
* Run the Atoum plugin.
* @return bool
* {@inheritDocs}
*/
public function execute()
{

View file

@ -57,7 +57,7 @@ class Behat implements PluginInterface
}
/**
* Runs Behat tests.
* {@inheritDocs}
*/
public function execute()
{

View file

@ -34,6 +34,7 @@ class Campfire implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -61,8 +62,7 @@ class Campfire implements PluginInterface
}
/**
* Run the Campfire plugin.
* @return bool|mixed
* {@inheritDocs}
*/
public function execute()
{

View file

@ -49,8 +49,8 @@ class CleanBuild implements PluginInterface
}
/**
* Executes Composer and runs a specified command (e.g. install / update)
*/
* {@inheritDocs}
*/
public function execute()
{
$cmd = 'rm -Rf "%s"';

View file

@ -50,10 +50,7 @@ class Codeception implements PluginInterface, PluginZeroConfigInterface
protected $path;
/**
* @param $stage
* @param Builder $builder
* @param Build $build
* @return bool
* {@inheritDocs}
*/
public static function canExecute($stage, Builder $builder, Build $build)
{
@ -66,7 +63,9 @@ class Codeception implements PluginInterface, PluginZeroConfigInterface
/**
* Try and find the codeception YML config file.
*
* @param $buildPath
*
* @return null|string
*/
public static function findConfigFile($buildPath)
@ -84,6 +83,7 @@ class Codeception implements PluginInterface, PluginZeroConfigInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -109,7 +109,7 @@ class Codeception implements PluginInterface, PluginZeroConfigInterface
}
/**
* Runs Codeception tests, optionally using specified config file(s).
* {@inheritDocs}
*/
public function execute()
{
@ -128,8 +128,11 @@ class Codeception implements PluginInterface, PluginZeroConfigInterface
/**
* Run tests from a Codeception config file.
*
* @param $configPath
*
* @return bool|mixed
*
* @throws \Exception
*/
protected function runConfigFile($configPath)

View file

@ -34,11 +34,7 @@ class Composer implements PluginInterface, PluginZeroConfigInterface
protected $build;
/**
* Check if this plugin can be executed.
* @param $stage
* @param Builder $builder
* @param Build $build
* @return bool
* {@inheritDocs}
*/
public static function canExecute($stage, Builder $builder, Build $build)
{
@ -53,6 +49,7 @@ class Composer implements PluginInterface, PluginZeroConfigInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -80,8 +77,8 @@ class Composer implements PluginInterface, PluginZeroConfigInterface
}
/**
* Executes Composer and runs a specified command (e.g. install / update)
*/
* {@inheritDocs}
*/
public function execute()
{
$composerLocation = $this->phpci->findBinary(array('composer', 'composer.phar'));

View file

@ -33,6 +33,7 @@ class CopyBuild implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -48,8 +49,8 @@ class CopyBuild implements PluginInterface
}
/**
* Copies files from the root of the build directory into the target folder
*/
* {@inheritDocs}
*/
public function execute()
{
$build = $this->phpci->buildPath;
@ -74,6 +75,7 @@ class CopyBuild implements PluginInterface
/**
* Wipe the destination directory if it already exists.
*
* @throws \Exception
*/
protected function wipeExistingDirectory()

View file

@ -44,6 +44,7 @@ class Email implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param \Swift_Mailer $mailer
@ -60,7 +61,7 @@ class Email implements PluginInterface
}
/**
* Send a notification mail.
* {@inheritDocs}
*/
public function execute()
{
@ -95,11 +96,14 @@ class Email implements PluginInterface
}
/**
* @param string $toAddress Single address to send to
* @param string[] $ccList
* @param string $subject Email subject
* @param string $body Email body
* @return array Array of failed addresses
* Send a mail using the specified information.
*
* @param string $toAddress Single address to send to
* @param string[] $ccList List of user to CC
* @param string $subject Email subject
* @param string $body Email body
*
* @return array Array of failed addresses
*/
public function sendEmail($toAddress, $ccList, $subject, $body)
{
@ -122,14 +126,11 @@ class Email implements PluginInterface
/**
* Send an email to a list of specified subjects.
*
* @param array $toAddresses
* List of destinatary of message.
* @param string $subject
* Mail subject
* @param string $body
* Mail body
* @param array $toAddresses List of destinatary of message.
* @param string $subject Mail subject
* @param string $body Mail body
*
* @return int number of failed messages
* @return int number of failed messages
*/
public function sendSeparateEmails(array $toAddresses, $subject, $body)
{
@ -146,6 +147,7 @@ class Email implements PluginInterface
/**
* Get the list of email addresses to send to.
*
* @return array
*/
protected function getEmailAddresses()
@ -172,6 +174,7 @@ class Email implements PluginInterface
/**
* Get the list of email addresses to CC.
*
* @return array
*/
protected function getCcAddresses()

View file

@ -29,6 +29,7 @@ class Env implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -41,8 +42,8 @@ class Env implements PluginInterface
}
/**
* Adds the specified environment variables to the builder environment
*/
* {@inheritDocs}
*/
public function execute()
{
$success = true;

View file

@ -29,6 +29,7 @@ class Git implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -41,8 +42,7 @@ class Git implements PluginInterface
}
/**
* Run the Git plugin.
* @return bool
* {@inheritDocs}
*/
public function execute()
{
@ -72,8 +72,10 @@ class Git implements PluginInterface
/**
* Determine which action to run, and run it.
*
* @param $action
* @param array $options
*
* @return bool
*/
protected function runAction($action, array $options = array())
@ -98,6 +100,7 @@ class Git implements PluginInterface
/**
* Handle a merge action.
*
* @param $options
* @return bool
*/
@ -112,6 +115,7 @@ class Git implements PluginInterface
/**
* Handle a tag action.
*
* @param $options
* @return bool
*/
@ -134,6 +138,7 @@ class Git implements PluginInterface
/**
* Handle a pull action.
*
* @param $options
* @return bool
*/
@ -155,6 +160,7 @@ class Git implements PluginInterface
/**
* Handle a push action.
*
* @param $options
* @return bool
*/

View file

@ -73,8 +73,8 @@ class Grunt implements PluginInterface
}
/**
* Executes grunt and runs a specified command (e.g. install / update)
*/
* {@inheritDocs}
*/
public function execute()
{
// if npm does not work, we cannot use grunt, so we return false

View file

@ -73,8 +73,8 @@ class Gulp implements PluginInterface
}
/**
* Executes gulp and runs a specified command (e.g. install / update)
*/
* {@inheritDocs}
*/
public function execute()
{
// if npm does not work, we cannot use gulp, so we return false

View file

@ -31,9 +31,11 @@ class HipchatNotify implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
*
* @throws \Exception
*/
public function __construct(Builder $phpci, Build $build, array $options = array())
@ -72,8 +74,7 @@ class HipchatNotify implements PluginInterface
}
/**
* Run the HipChat plugin.
* @return bool
* {@inheritDocs}
*/
public function execute()
{

View file

@ -65,8 +65,7 @@ class Irc implements PluginInterface
}
/**
* Run IRC plugin.
* @return bool
* {@inheritDocs}
*/
public function execute()
{
@ -97,8 +96,11 @@ class Irc implements PluginInterface
}
/**
* Execute a list of IRC commands.
*
* @param resource $socket
* @param array $commands
*
* @return bool
*/
private function executeIrcCommands($socket, array $commands)
@ -124,9 +126,11 @@ class Irc implements PluginInterface
}
/**
* Execute a single IRC command.
*
* @param resource $socket
* @param string $command
*
* @return bool
*/
private function executeIrcCommand($socket, $command)

View file

@ -64,7 +64,7 @@ class Lint implements PluginInterface
}
/**
* Executes parallel lint
* {@inheritDocs}
*/
public function execute()
{
@ -86,9 +86,11 @@ class Lint implements PluginInterface
/**
* Lint an item (file or directory) by calling the appropriate method.
*
* @param $php
* @param $item
* @param $itemPath
*
* @return bool
*/
protected function lintItem($php, $item, $itemPath)
@ -106,8 +108,10 @@ class Lint implements PluginInterface
/**
* Run php -l against a directory of files.
*
* @param $php
* @param $path
*
* @return bool
*/
protected function lintDirectory($php, $path)
@ -136,8 +140,10 @@ class Lint implements PluginInterface
/**
* Run php -l against a specific file.
*
* @param $php
* @param $path
*
* @return bool
*/
protected function lintFile($php, $path)

View file

@ -95,9 +95,8 @@ class Mysql implements PluginInterface
}
/**
* Connects to MySQL and runs a specified set of queries.
* @return boolean
*/
* {@inheritDocs}
*/
public function execute()
{
try {
@ -124,7 +123,9 @@ class Mysql implements PluginInterface
/**
* @param string $query
*
* @return boolean
*
* @throws \Exception
*/
protected function executeFile($query)
@ -150,8 +151,10 @@ class Mysql implements PluginInterface
/**
* Builds the MySQL import command required to import/execute the specified file
*
* @param string $import_file Path to file, relative to the build root
* @param string $database If specified, this database is selected before execution
* @param string $database If specified, this database is selected before execution
*
* @return string
*/
protected function getImportCommand($import_file, $database = null)

View file

@ -29,6 +29,7 @@ class PackageBuild implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -44,8 +45,8 @@ class PackageBuild implements PluginInterface
}
/**
* Executes Composer and runs a specified command (e.g. install / update)
*/
* {@inheritDocs}
*/
public function execute()
{
$path = $this->phpci->buildPath;

View file

@ -54,6 +54,7 @@ class Pdepend implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -73,7 +74,7 @@ class Pdepend implements PluginInterface
}
/**
* Runs Pdepend with the given criteria as arguments
* {@inheritDocs}
*/
public function execute()
{

View file

@ -77,9 +77,8 @@ class Pgsql implements PluginInterface
}
/**
* Connects to PgSQL and runs a specified set of queries.
* @return boolean
*/
* {@inheritDocs}
*/
public function execute()
{
try {

View file

@ -126,6 +126,7 @@ class Phar implements PluginInterface
* Directory Setter
*
* @param string $directory Configuration Value
*
* @return Phar Fluent Interface
*/
public function setDirectory($directory)
@ -151,6 +152,7 @@ class Phar implements PluginInterface
* Filename Setter
*
* @param string $filename Configuration Value
*
* @return Phar Fluent Interface
*/
public function setFilename($filename)
@ -176,6 +178,7 @@ class Phar implements PluginInterface
* Regular Expression Setter
*
* @param string $regexp Configuration Value
*
* @return Phar Fluent Interface
*/
public function setRegExp($regexp)
@ -201,6 +204,7 @@ class Phar implements PluginInterface
* Stub Filename Setter
*
* @param string $stub Configuration Value
*
* @return Phar Fluent Interface
*/
public function setStub($stub)
@ -221,6 +225,7 @@ class Phar implements PluginInterface
/**
* Get stub content for the Phar file.
*
* @return string
*/
public function getStubContent()
@ -234,8 +239,7 @@ class Phar implements PluginInterface
}
/**
* Run the phar plugin.
* @return bool
* {@inheritDocs}
*/
public function execute()
{

View file

@ -37,6 +37,7 @@ class Phing implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -46,9 +47,7 @@ class Phing implements PluginInterface
$this->setPhpci($phpci);
$this->build = $build;
/*
* Set working directory
*/
// Set working directory
if (isset($options['directory'])) {
$directory = $phpci->buildPath . '/' . $options['directory'];
} else {
@ -57,9 +56,7 @@ class Phing implements PluginInterface
$this->setDirectory($directory);
/*
* Sen name of a non default build file
*/
// Set name of a non default build file
if (isset($options['build_file'])) {
$this->setBuildFile($options['build_file']);
}
@ -78,7 +75,7 @@ class Phing implements PluginInterface
}
/**
* Executes Phing and runs a specified targets
* {@inheritDocs}
*/
public function execute()
{
@ -100,7 +97,7 @@ class Phing implements PluginInterface
}
/**
* @return \PHPCI\Builder
* @return Builder
*/
public function getPhpci()
{
@ -108,7 +105,7 @@ class Phing implements PluginInterface
}
/**
* @param \PHPCI\Builder $phpci
* @param Builder $phpci
*
* @return $this
*/
@ -145,6 +142,7 @@ class Phing implements PluginInterface
/**
* Converts an array of targets into a string.
*
* @return string
*/
private function targetsToString()
@ -178,6 +176,7 @@ class Phing implements PluginInterface
* @param mixed $buildFile
*
* @return $this
*
* @throws \Exception
*/
public function setBuildFile($buildFile)
@ -191,6 +190,7 @@ class Phing implements PluginInterface
/**
* Get phing build file path.
*
* @return string
*/
public function getBuildFilePath()
@ -211,10 +211,8 @@ class Phing implements PluginInterface
*/
public function propertiesToString()
{
/**
* fix the problem when execute phing out of the build dir
* @ticket 748
*/
// Fix the problem when execute phing out of the build dir
// @ticket 748
if (!isset($this->properties['project.basedir'])) {
$this->properties['project.basedir'] = $this->getDirectory();
}
@ -254,6 +252,7 @@ class Phing implements PluginInterface
* @param string $propertyFile
*
* @return $this
*
* @throws \Exception
*/
public function setPropertyFile($propertyFile)

View file

@ -78,11 +78,7 @@ class PhpCodeSniffer implements PluginInterface, PluginZeroConfigInterface
protected $ignore;
/**
* Check if this plugin can be executed.
* @param $stage
* @param Builder $builder
* @param Build $build
* @return bool
* {@inheritDocs}
*/
public static function canExecute($stage, Builder $builder, Build $build)
{
@ -134,6 +130,7 @@ class PhpCodeSniffer implements PluginInterface, PluginZeroConfigInterface
/**
* Handle this plugin's options.
*
* @param $options
*/
protected function setOptions($options)
@ -146,8 +143,8 @@ class PhpCodeSniffer implements PluginInterface, PluginZeroConfigInterface
}
/**
* Runs PHP Code Sniffer in a specified directory, to a specified standard.
*/
* {@inheritDocs}
*/
public function execute()
{
list($ignore, $standard, $suffixes) = $this->getFlags();
@ -190,6 +187,7 @@ class PhpCodeSniffer implements PluginInterface, PluginZeroConfigInterface
/**
* Process options and produce an arguments string for PHPCS.
*
* @return array
*/
protected function getFlags()
@ -215,8 +213,11 @@ class PhpCodeSniffer implements PluginInterface, PluginZeroConfigInterface
/**
* Process the PHPCS output report.
*
* @param $output
*
* @return array
*
* @throws \Exception
*/
protected function processReport($output)

View file

@ -43,6 +43,7 @@ class PhpCpd implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -70,8 +71,8 @@ class PhpCpd implements PluginInterface
}
/**
* Runs PHP Copy/Paste Detector in a specified directory.
*/
* {@inheritDocs}
*/
public function execute()
{
$ignore = '';
@ -112,8 +113,11 @@ class PhpCpd implements PluginInterface
/**
* Process the PHPCPD XML report.
*
* @param $xmlString
*
* @return array
*
* @throws \Exception
*/
protected function processReport($xmlString)

View file

@ -63,8 +63,7 @@ class PhpCsFixer implements PluginInterface
}
/**
* Run PHP CS Fixer.
* @return bool
* {@inheritDocs}
*/
public function execute()
{
@ -83,6 +82,7 @@ class PhpCsFixer implements PluginInterface
/**
* Build an args string for PHPCS Fixer.
*
* @param $options
*/
public function buildArgs($options)
@ -102,6 +102,5 @@ class PhpCsFixer implements PluginInterface
if (isset($options['workingdir']) && $options['workingdir']) {
$this->workingdir = $this->phpci->buildPath . $options['workingdir'];
}
}
}

View file

@ -51,11 +51,7 @@ class PhpDocblockChecker implements PluginInterface, PluginZeroConfigInterface
protected $skipMethods = false;
/**
* Check if this plugin can be executed.
* @param $stage
* @param Builder $builder
* @param Build $build
* @return bool
* {@inheritDocs}
*/
public static function canExecute($stage, Builder $builder, Build $build)
{
@ -68,6 +64,7 @@ class PhpDocblockChecker implements PluginInterface, PluginZeroConfigInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -102,7 +99,7 @@ class PhpDocblockChecker implements PluginInterface, PluginZeroConfigInterface
}
/**
* Runs PHP Mess Detector in a specified directory.
* {@inheritDocs}
*/
public function execute()
{
@ -160,6 +157,7 @@ class PhpDocblockChecker implements PluginInterface, PluginZeroConfigInterface
/**
* Report all of the errors we've encountered line-by-line.
*
* @param $output
*/
protected function reportErrors($output)

View file

@ -28,17 +28,14 @@ class PhpLoc implements PluginInterface, PluginZeroConfigInterface
* @var string
*/
protected $directory;
/**
* @var \PHPCI\Builder
*/
protected $phpci;
/**
* Check if this plugin can be executed.
* @param $stage
* @param Builder $builder
* @param Build $build
* @return bool
* {@inheritDocs}
*/
public static function canExecute($stage, Builder $builder, Build $build)
{
@ -51,6 +48,7 @@ class PhpLoc implements PluginInterface, PluginZeroConfigInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -67,7 +65,7 @@ class PhpLoc implements PluginInterface, PluginZeroConfigInterface
}
/**
* Runs PHP Copy/Paste Detector in a specified directory.
* {@inheritDocs}
*/
public function execute()
{

View file

@ -59,11 +59,7 @@ class PhpMessDetector implements PluginInterface, PluginZeroConfigInterface
protected $rules;
/**
* Check if this plugin can be executed.
* @param $stage
* @param Builder $builder
* @param Build $build
* @return bool
* {@inheritDocs}
*/
public static function canExecute($stage, Builder $builder, Build $build)
{
@ -114,7 +110,7 @@ class PhpMessDetector implements PluginInterface, PluginZeroConfigInterface
}
/**
* Runs PHP Mess Detector in a specified directory.
* {@inheritDocs}
*/
public function execute()
{
@ -135,6 +131,7 @@ class PhpMessDetector implements PluginInterface, PluginZeroConfigInterface
/**
* Override a default setting.
*
* @param $options
* @param $key
*/
@ -147,8 +144,11 @@ class PhpMessDetector implements PluginInterface, PluginZeroConfigInterface
/**
* Process PHPMD's XML output report.
*
* @param $xmlString
*
* @return array
*
* @throws \Exception
*/
protected function processReport($xmlString)
@ -189,6 +189,7 @@ class PhpMessDetector implements PluginInterface, PluginZeroConfigInterface
/**
* Try and process the rules parameter from phpci.yml.
*
* @return bool
*/
protected function tryAndProcessRules()
@ -209,6 +210,7 @@ class PhpMessDetector implements PluginInterface, PluginZeroConfigInterface
/**
* Execute PHP Mess Detector.
*
* @param $binaryPath
*/
protected function executePhpMd($binaryPath)
@ -245,6 +247,7 @@ class PhpMessDetector implements PluginInterface, PluginZeroConfigInterface
/**
* Get the path PHPMD should be run against.
*
* @return string
*/
protected function getTargetPath()
@ -261,6 +264,7 @@ class PhpMessDetector implements PluginInterface, PluginZeroConfigInterface
* Returns a boolean indicating if the error count can be considered a success.
*
* @param int $errorCount
*
* @return bool
*/
protected function wasLastExecSuccessful($errorCount)

View file

@ -72,8 +72,8 @@ class PhpParallelLint implements PluginInterface
}
/**
* Executes parallel lint
*/
* {@inheritDocs}
*/
public function execute()
{
list($ignore) = $this->getFlags();
@ -99,6 +99,7 @@ class PhpParallelLint implements PluginInterface
/**
* Produce an argument string for PHP Parallel Lint.
*
* @return array
*/
protected function getFlags()

View file

@ -24,12 +24,12 @@ use PHPCI\PluginInterface;
class PhpSpec implements PluginInterface
{
/**
* @var \PHPCI\Builder
* @var Builder
*/
protected $phpci;
/**
* @var \PHPCI\Model\Build
* @var Build
*/
protected $build;
@ -40,6 +40,7 @@ class PhpSpec implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -52,8 +53,8 @@ class PhpSpec implements PluginInterface
}
/**
* Runs PHP Spec tests.
*/
* {@inheritDocs}
*/
public function execute()
{
$curdir = getcwd();
@ -145,7 +146,6 @@ class PhpSpec implements PluginInterface
$this->build->storeMeta('phpspec', $data);
return $success;
}
}

View file

@ -29,12 +29,12 @@ class PhpTalLint implements PluginInterface
protected $ignore;
/**
* @var \PHPCI\Builder
* @var Builder
*/
protected $phpci;
/**
* @var \PHPCI\Model\Build
* @var Build
*/
protected $build;
@ -89,6 +89,7 @@ class PhpTalLint implements PluginInterface
/**
* Handle this plugin's options.
*
* @param $options
*/
protected function setOptions($options)
@ -101,7 +102,7 @@ class PhpTalLint implements PluginInterface
}
/**
* Executes phptal lint
* {@inheritDocs}
*/
public function execute()
{
@ -145,8 +146,10 @@ class PhpTalLint implements PluginInterface
/**
* Lint an item (file or directory) by calling the appropriate method.
*
* @param $item
* @param $itemPath
*
* @return bool
*/
protected function lintItem($item, $itemPath)
@ -166,7 +169,9 @@ class PhpTalLint implements PluginInterface
/**
* Run phptal lint against a directory of files.
*
* @param $path
*
* @return bool
*/
protected function lintDirectory($path)
@ -195,7 +200,9 @@ class PhpTalLint implements PluginInterface
/**
* Run phptal lint against a specific file.
*
* @param $path
*
* @return bool
*/
protected function lintFile($path)
@ -246,6 +253,7 @@ class PhpTalLint implements PluginInterface
/**
* Process options and produce an arguments string for PHPTAL Lint.
*
* @return array
*/
protected function getFlags()

View file

@ -53,11 +53,7 @@ class PhpUnit implements PluginInterface, PluginZeroConfigInterface
protected $xmlConfigFile;
/**
* Check if this plugin can be executed.
* @param $stage
* @param Builder $builder
* @param Build $build
* @return bool
* {@inheritDocs}
*/
public static function canExecute($stage, Builder $builder, Build $build)
{
@ -70,7 +66,9 @@ class PhpUnit implements PluginInterface, PluginZeroConfigInterface
/**
* Try and find the phpunit XML config file.
*
* @param $buildPath
*
* @return null|string
*/
public static function findConfigFile($buildPath)
@ -141,8 +139,8 @@ class PhpUnit implements PluginInterface, PluginZeroConfigInterface
}
/**
* Runs PHP Unit tests in a specified directory, optionally using specified config file(s).
*/
* {@inheritDocs}
*/
public function execute()
{
if (empty($this->xmlConfigFile) && empty($this->directory)) {
@ -187,7 +185,9 @@ class PhpUnit implements PluginInterface, PluginZeroConfigInterface
/**
* Run the tests defined in a PHPUnit config file.
*
* @param $configPath
*
* @return bool|mixed
*/
protected function runConfigFile($configPath)
@ -215,7 +215,9 @@ class PhpUnit implements PluginInterface, PluginZeroConfigInterface
/**
* Run the PHPUnit tests in a specific directory or array of directories.
*
* @param $directory
*
* @return bool|mixed
*/
protected function runDir($directory)
@ -238,6 +240,7 @@ class PhpUnit implements PluginInterface, PluginZeroConfigInterface
/**
* @param $array
* @param $callable
*
* @return bool|mixed
*/
protected function recurseArg($array, $callable)

View file

@ -77,7 +77,7 @@ class Shell implements PluginInterface
}
/**
* Runs the shell command.
* {@inheritDocs}
*/
public function execute()
{

View file

@ -72,8 +72,7 @@ class SlackNotify implements PluginInterface
}
/**
* Run the Slack plugin.
* @return bool
* {@inheritDocs}
*/
public function execute()
{

View file

@ -62,8 +62,7 @@ class Sqlite implements PluginInterface
}
/**
* Connects to SQLite and runs a specified set of queries.
* @return boolean
* {@inheritDocs}
*/
public function execute()
{

View file

@ -67,12 +67,7 @@ class TechnicalDebt implements PluginInterface, PluginZeroConfigInterface
/**
* Check if this plugin can be executed.
*
* @param $stage
* @param Builder $builder
* @param Build $build
* @return bool
* {@inheritDocs}
*/
public static function canExecute($stage, Builder $builder, Build $build)
{
@ -112,6 +107,7 @@ class TechnicalDebt implements PluginInterface, PluginZeroConfigInterface
/**
* Handle this plugin's options.
*
* @param $options
*/
protected function setOptions($options)
@ -124,8 +120,8 @@ class TechnicalDebt implements PluginInterface, PluginZeroConfigInterface
}
/**
* Runs the plugin
*/
* {@inheritDocs}
*/
public function execute()
{
$success = true;

View file

@ -36,6 +36,7 @@ class Wipe implements PluginInterface
/**
* Set up the plugin, configure options, etc.
*
* @param Builder $phpci
* @param Build $build
* @param array $options
@ -49,8 +50,8 @@ class Wipe implements PluginInterface
}
/**
* Wipes a directory's contents
*/
* {@inheritDocs}
*/
public function execute()
{
$build = $this->phpci->buildPath;

View file

@ -131,6 +131,8 @@ class XMPP implements PluginInterface
/**
* Find config file for sendxmpp binary (default is .sendxmpprc)
*
* @return bool|null
*/
public function findConfigFile()
{
@ -146,8 +148,8 @@ class XMPP implements PluginInterface
}
/**
* Send notification message.
*/
* {@inheritDocs}
*/
public function execute()
{
$sendxmpp = $this->phpci->findBinary('sendxmpp');
@ -201,6 +203,7 @@ class XMPP implements PluginInterface
/**
* @param $message_file
*
* @return int
*/
protected function buildMessage($message_file)

View file

@ -19,7 +19,7 @@ use PHPCI\Model\Build;
interface PluginZeroConfigInterface
{
/**
* Execute the plugin withput requiring configuration.
* Check if this plugin can be executed.
*
* @param string $stage The current stage
* @param Builder $builder The plugin builder