Fixed naming.
This commit is contained in:
parent
5dd96b36ed
commit
45e674a733
|
@ -9,8 +9,6 @@ use b8\Http\Response\RedirectResponse;
|
||||||
use b8\View;
|
use b8\View;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPCI Front Controller
|
|
||||||
*
|
|
||||||
* @author Dan Cryer <dan@block8.co.uk>
|
* @author Dan Cryer <dan@block8.co.uk>
|
||||||
*/
|
*/
|
||||||
class Application extends b8\Application
|
class Application extends b8\Application
|
||||||
|
@ -21,7 +19,7 @@ class Application extends b8\Application
|
||||||
protected $controller;
|
protected $controller;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialise PHPCI - Handles session verification, routing, etc.
|
* Initialise Application - Handles session verification, routing, etc.
|
||||||
*/
|
*/
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ use b8\Store\Factory;
|
||||||
use PHPCensor\Model\Build;
|
use PHPCensor\Model\Build;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPCI Build Factory - Takes in a generic "Build" and returns a type-specific build model.
|
* BuildFactory - Takes in a generic "Build" and returns a type-specific build model.
|
||||||
*
|
*
|
||||||
* @author Dan Cryer <dan@block8.co.uk>
|
* @author Dan Cryer <dan@block8.co.uk>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -46,7 +46,7 @@ class CreateAdminCommand extends Command
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an admin user in the existing PHPCI database
|
* Creates an admin user in the existing database
|
||||||
*
|
*
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -218,7 +218,7 @@ class InstallCommand extends Command
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load configuration for PHPCI form CLI options or ask info to user.
|
* Load configuration form CLI options or ask info to user.
|
||||||
*
|
*
|
||||||
* @param InputInterface $input
|
* @param InputInterface $input
|
||||||
* @param OutputInterface $output
|
* @param OutputInterface $output
|
||||||
|
@ -463,7 +463,7 @@ class InstallCommand extends Command
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the PHPCI config.yml file.
|
* Write the config.yml file.
|
||||||
* @param array $config
|
* @param array $config
|
||||||
*/
|
*/
|
||||||
protected function writeConfigFile(array $config)
|
protected function writeConfigFile(array $config)
|
||||||
|
|
|
@ -57,7 +57,7 @@ class WorkerCommand extends Command
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow PHPCI to run in "debug mode"
|
// Allow to run in "debug mode"
|
||||||
if ($input->hasOption('debug') && $input->getOption('debug')) {
|
if ($input->hasOption('debug') && $input->getOption('debug')) {
|
||||||
$output->writeln('<comment>Debug mode enabled.</comment>');
|
$output->writeln('<comment>Debug mode enabled.</comment>');
|
||||||
define('DEBUG_MODE', true);
|
define('DEBUG_MODE', true);
|
||||||
|
|
|
@ -8,9 +8,6 @@ use b8\Http\Request;
|
||||||
use b8\Http\Response;
|
use b8\Http\Response;
|
||||||
use b8\View;
|
use b8\View;
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPCI Base Controller
|
|
||||||
*/
|
|
||||||
class Controller extends \b8\Controller
|
class Controller extends \b8\Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -202,8 +202,10 @@ class BuildController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formats a list of builds into rows suitable for the dropdowns in the PHPCI header bar.
|
* Formats a list of builds into rows suitable for the dropdowns in the header bar.
|
||||||
|
*
|
||||||
* @param $builds
|
* @param $builds
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function formatBuilds($builds)
|
protected function formatBuilds($builds)
|
||||||
|
|
|
@ -9,7 +9,7 @@ use PHPCensor\Model\Build;
|
||||||
use PHPCensor\Controller;
|
use PHPCensor\Controller;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Home Controller - Displays the PHPCI Dashboard.
|
* Home Controller - Displays the Dashboard.
|
||||||
*
|
*
|
||||||
* @author Dan Cryer <dan@block8.co.uk>
|
* @author Dan Cryer <dan@block8.co.uk>
|
||||||
*/
|
*/
|
||||||
|
@ -41,7 +41,7 @@ class HomeController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display PHPCI dashboard:
|
* Display dashboard:
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ use b8\Config;
|
||||||
use PHPCensor\Builder;
|
use PHPCensor\Builder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class for sending emails using PHPCI's email configuration.
|
* Helper class for sending emails using email configuration.
|
||||||
*/
|
*/
|
||||||
class Email
|
class Email
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
use Phinx\Migration\AbstractMigration;
|
use Phinx\Migration\AbstractMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initial migration to create a PHPCI v1.2 database.
|
* Initial migration to create database.
|
||||||
*/
|
*/
|
||||||
class InitialMigration extends AbstractMigration
|
class InitialMigration extends AbstractMigration
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,8 +5,6 @@ namespace PHPCensor;
|
||||||
use PHPCensor\Model\Build;
|
use PHPCensor\Model\Build;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPCI Plugin class - Used by all build plugins.
|
|
||||||
*
|
|
||||||
* @author Dan Cryer <dan@block8.co.uk>
|
* @author Dan Cryer <dan@block8.co.uk>
|
||||||
*/
|
*/
|
||||||
abstract class Plugin
|
abstract class Plugin
|
||||||
|
|
|
@ -7,7 +7,7 @@ use PHPCensor\Model\Build;
|
||||||
use PHPCensor\Plugin;
|
use PHPCensor\Plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean build removes Composer related files and allows PHPCI users to clean up their build directory.
|
* Clean build removes Composer related files and allows users to clean up their build directory.
|
||||||
* Useful as a precursor to copy_build.
|
* Useful as a precursor to copy_build.
|
||||||
*
|
*
|
||||||
* @author Dan Cryer <dan@block8.co.uk>
|
* @author Dan Cryer <dan@block8.co.uk>
|
||||||
|
|
|
@ -8,7 +8,7 @@ use PHPCensor\Model\Build;
|
||||||
use PHPCensor\Plugin;
|
use PHPCensor\Plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Integrates PHPCI with Deployer: https://github.com/rebelinblue/deployer
|
* Integration with Deployer: https://github.com/rebelinblue/deployer
|
||||||
*
|
*
|
||||||
* @author Dan Cryer <dan@block8.co.uk>
|
* @author Dan Cryer <dan@block8.co.uk>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Psr\Log\LogLevel;
|
||||||
use PHPCensor\Plugin;
|
use PHPCensor\Plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Email Plugin - Provides simple email capability to PHPCI.
|
* Email Plugin - Provides simple email capability.
|
||||||
*
|
*
|
||||||
* @author Steve Brazier <meadsteve@gmail.com>
|
* @author Steve Brazier <meadsteve@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,9 +11,7 @@ use PHPCensor\Plugin;
|
||||||
/**
|
/**
|
||||||
* Flowdock Plugin
|
* Flowdock Plugin
|
||||||
*
|
*
|
||||||
* @author Petr Cervenka <petr@nanosolutions.io>
|
* @author Petr Cervenka <petr@nanosolutions.io>
|
||||||
* @package PHPCI
|
|
||||||
* @subpackage Plugins
|
|
||||||
*/
|
*/
|
||||||
class FlowdockNotify extends Plugin
|
class FlowdockNotify extends Plugin
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@ use PHPCensor\ZeroConfigPluginInterface;
|
||||||
*/
|
*/
|
||||||
class PhpUnit extends Plugin implements ZeroConfigPluginInterface
|
class PhpUnit extends Plugin implements ZeroConfigPluginInterface
|
||||||
{
|
{
|
||||||
/** @var string[] Raw options from the PHPCI config file */
|
/** @var string[] Raw options from the config file */
|
||||||
protected $options = [];
|
protected $options = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -44,7 +44,7 @@ class Executor
|
||||||
/**
|
/**
|
||||||
* Execute a the appropriate set of plugins for a given build stage.
|
* Execute a the appropriate set of plugins for a given build stage.
|
||||||
*
|
*
|
||||||
* @param array $config PHPCI configuration
|
* @param array $config Configuration
|
||||||
* @param string $stage
|
* @param string $stage
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
|
|
@ -24,7 +24,7 @@ class UserService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new user within PHPCI.
|
* Create a new user.
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param string $email
|
* @param string $email
|
||||||
|
|
|
@ -98,7 +98,7 @@ class ProjectStore extends Store
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all branch names PHPCI has run builds against.
|
* Returns a list of all branch names.
|
||||||
*
|
*
|
||||||
* @param $projectId
|
* @param $projectId
|
||||||
*
|
*
|
||||||
|
|
|
@ -146,7 +146,7 @@ class BuildWorker
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks that the job received is actually from PHPCI, and has a valid type.
|
* Checks that the job received is actually, and has a valid type.
|
||||||
* @param Job $job
|
* @param Job $job
|
||||||
* @param $jobData
|
* @param $jobData
|
||||||
* @return bool
|
* @return bool
|
||||||
|
@ -154,13 +154,11 @@ class BuildWorker
|
||||||
protected function verifyJob(Job $job, $jobData)
|
protected function verifyJob(Job $job, $jobData)
|
||||||
{
|
{
|
||||||
if (empty($jobData) || !is_array($jobData)) {
|
if (empty($jobData) || !is_array($jobData)) {
|
||||||
// Probably not from PHPCI.
|
|
||||||
$this->pheanstalk->delete($job);
|
$this->pheanstalk->delete($job);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!array_key_exists('type', $jobData) || $jobData['type'] !== 'php-censor.build') {
|
if (!array_key_exists('type', $jobData) || $jobData['type'] !== 'php-censor.build') {
|
||||||
// Probably not from PHPCI.
|
|
||||||
$this->pheanstalk->delete($job);
|
$this->pheanstalk->delete($job);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,6 @@ namespace PHPCensor;
|
||||||
use PHPCensor\Model\Build;
|
use PHPCensor\Model\Build;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPCI Plugin Interface - Used by all build plugins.
|
|
||||||
*
|
|
||||||
* @author Dan Cryer <dan@block8.co.uk>
|
* @author Dan Cryer <dan@block8.co.uk>
|
||||||
*/
|
*/
|
||||||
interface ZeroConfigPluginInterface
|
interface ZeroConfigPluginInterface
|
||||||
|
|
|
@ -8,9 +8,8 @@ use PHPCensor\Plugin\Util\PhpUnitResultJunit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class PhpUnitResultTest parses the results for the PhpUnitV2 plugin
|
* Class PhpUnitResultTest parses the results for the PhpUnitV2 plugin
|
||||||
* @author Pablo Tejada <pablo@ptejada.com>
|
*
|
||||||
* @package PHPCI
|
* @author Pablo Tejada <pablo@ptejada.com>
|
||||||
* @subpackage Plugin
|
|
||||||
*/
|
*/
|
||||||
class PhpUnitResultTest extends \PHPUnit\Framework\TestCase
|
class PhpUnitResultTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue