From 45e674a7335f61d83fe29b8283086a43f408bc76 Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Sat, 21 Oct 2017 15:51:05 +0700 Subject: [PATCH] Fixed naming. --- src/PHPCensor/Application.php | 4 +--- src/PHPCensor/BuildFactory.php | 2 +- src/PHPCensor/Command/CreateAdminCommand.php | 2 +- src/PHPCensor/Command/InstallCommand.php | 4 ++-- src/PHPCensor/Command/WorkerCommand.php | 2 +- src/PHPCensor/Controller.php | 3 --- src/PHPCensor/Controller/BuildController.php | 4 +++- src/PHPCensor/Controller/HomeController.php | 4 ++-- src/PHPCensor/Helper/Email.php | 2 +- .../Migrations/20140513143726_initial_migration.php | 2 +- src/PHPCensor/Plugin.php | 2 -- src/PHPCensor/Plugin/CleanBuild.php | 2 +- src/PHPCensor/Plugin/Deployer.php | 2 +- src/PHPCensor/Plugin/Email.php | 2 +- src/PHPCensor/Plugin/FlowdockNotify.php | 4 +--- src/PHPCensor/Plugin/PhpUnit.php | 2 +- src/PHPCensor/Plugin/Util/Executor.php | 2 +- src/PHPCensor/Service/UserService.php | 2 +- src/PHPCensor/Store/ProjectStore.php | 2 +- src/PHPCensor/Worker/BuildWorker.php | 4 +--- src/PHPCensor/ZeroConfigPluginInterface.php | 2 -- tests/PHPCensor/Plugin/Util/PhpUnitResultTest.php | 5 ++--- 22 files changed, 24 insertions(+), 36 deletions(-) diff --git a/src/PHPCensor/Application.php b/src/PHPCensor/Application.php index 9e7157f7..1e69eb56 100644 --- a/src/PHPCensor/Application.php +++ b/src/PHPCensor/Application.php @@ -9,8 +9,6 @@ use b8\Http\Response\RedirectResponse; use b8\View; /** - * PHPCI Front Controller - * * @author Dan Cryer */ class Application extends b8\Application @@ -21,7 +19,7 @@ class Application extends b8\Application protected $controller; /** - * Initialise PHPCI - Handles session verification, routing, etc. + * Initialise Application - Handles session verification, routing, etc. */ public function init() { diff --git a/src/PHPCensor/BuildFactory.php b/src/PHPCensor/BuildFactory.php index e1d46b3a..71393729 100644 --- a/src/PHPCensor/BuildFactory.php +++ b/src/PHPCensor/BuildFactory.php @@ -6,7 +6,7 @@ use b8\Store\Factory; 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 */ diff --git a/src/PHPCensor/Command/CreateAdminCommand.php b/src/PHPCensor/Command/CreateAdminCommand.php index a7f14929..c723459f 100644 --- a/src/PHPCensor/Command/CreateAdminCommand.php +++ b/src/PHPCensor/Command/CreateAdminCommand.php @@ -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} */ diff --git a/src/PHPCensor/Command/InstallCommand.php b/src/PHPCensor/Command/InstallCommand.php index b7e631fa..f0e3b3f6 100644 --- a/src/PHPCensor/Command/InstallCommand.php +++ b/src/PHPCensor/Command/InstallCommand.php @@ -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 OutputInterface $output @@ -463,7 +463,7 @@ class InstallCommand extends Command } /** - * Write the PHPCI config.yml file. + * Write the config.yml file. * @param array $config */ protected function writeConfigFile(array $config) diff --git a/src/PHPCensor/Command/WorkerCommand.php b/src/PHPCensor/Command/WorkerCommand.php index 2946b542..3004c51b 100644 --- a/src/PHPCensor/Command/WorkerCommand.php +++ b/src/PHPCensor/Command/WorkerCommand.php @@ -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')) { $output->writeln('Debug mode enabled.'); define('DEBUG_MODE', true); diff --git a/src/PHPCensor/Controller.php b/src/PHPCensor/Controller.php index c0335893..a99ec1f6 100644 --- a/src/PHPCensor/Controller.php +++ b/src/PHPCensor/Controller.php @@ -8,9 +8,6 @@ use b8\Http\Request; use b8\Http\Response; use b8\View; -/** - * PHPCI Base Controller - */ class Controller extends \b8\Controller { /** diff --git a/src/PHPCensor/Controller/BuildController.php b/src/PHPCensor/Controller/BuildController.php index d8435d17..a00d4a93 100644 --- a/src/PHPCensor/Controller/BuildController.php +++ b/src/PHPCensor/Controller/BuildController.php @@ -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 + * * @return array */ protected function formatBuilds($builds) diff --git a/src/PHPCensor/Controller/HomeController.php b/src/PHPCensor/Controller/HomeController.php index 1187eb1b..04e1fa5b 100644 --- a/src/PHPCensor/Controller/HomeController.php +++ b/src/PHPCensor/Controller/HomeController.php @@ -9,7 +9,7 @@ use PHPCensor\Model\Build; use PHPCensor\Controller; /** - * Home Controller - Displays the PHPCI Dashboard. + * Home Controller - Displays the Dashboard. * * @author Dan Cryer */ @@ -41,7 +41,7 @@ class HomeController extends Controller } /** - * Display PHPCI dashboard: + * Display dashboard: */ public function index() { diff --git a/src/PHPCensor/Helper/Email.php b/src/PHPCensor/Helper/Email.php index 6f7ccc01..dd5eb78a 100644 --- a/src/PHPCensor/Helper/Email.php +++ b/src/PHPCensor/Helper/Email.php @@ -6,7 +6,7 @@ use b8\Config; use PHPCensor\Builder; /** - * Helper class for sending emails using PHPCI's email configuration. + * Helper class for sending emails using email configuration. */ class Email { diff --git a/src/PHPCensor/Migrations/20140513143726_initial_migration.php b/src/PHPCensor/Migrations/20140513143726_initial_migration.php index cab5b12a..9c329a68 100644 --- a/src/PHPCensor/Migrations/20140513143726_initial_migration.php +++ b/src/PHPCensor/Migrations/20140513143726_initial_migration.php @@ -3,7 +3,7 @@ use Phinx\Migration\AbstractMigration; /** - * Initial migration to create a PHPCI v1.2 database. + * Initial migration to create database. */ class InitialMigration extends AbstractMigration { diff --git a/src/PHPCensor/Plugin.php b/src/PHPCensor/Plugin.php index d0510baf..2ec77339 100644 --- a/src/PHPCensor/Plugin.php +++ b/src/PHPCensor/Plugin.php @@ -5,8 +5,6 @@ namespace PHPCensor; use PHPCensor\Model\Build; /** - * PHPCI Plugin class - Used by all build plugins. - * * @author Dan Cryer */ abstract class Plugin diff --git a/src/PHPCensor/Plugin/CleanBuild.php b/src/PHPCensor/Plugin/CleanBuild.php index 375b96dd..01f05e02 100644 --- a/src/PHPCensor/Plugin/CleanBuild.php +++ b/src/PHPCensor/Plugin/CleanBuild.php @@ -7,7 +7,7 @@ use PHPCensor\Model\Build; 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. * * @author Dan Cryer diff --git a/src/PHPCensor/Plugin/Deployer.php b/src/PHPCensor/Plugin/Deployer.php index c18fd735..c0e17ecc 100644 --- a/src/PHPCensor/Plugin/Deployer.php +++ b/src/PHPCensor/Plugin/Deployer.php @@ -8,7 +8,7 @@ use PHPCensor\Model\Build; use PHPCensor\Plugin; /** - * Integrates PHPCI with Deployer: https://github.com/rebelinblue/deployer + * Integration with Deployer: https://github.com/rebelinblue/deployer * * @author Dan Cryer */ diff --git a/src/PHPCensor/Plugin/Email.php b/src/PHPCensor/Plugin/Email.php index 0c0580dd..e64387b6 100644 --- a/src/PHPCensor/Plugin/Email.php +++ b/src/PHPCensor/Plugin/Email.php @@ -8,7 +8,7 @@ use Psr\Log\LogLevel; use PHPCensor\Plugin; /** - * Email Plugin - Provides simple email capability to PHPCI. + * Email Plugin - Provides simple email capability. * * @author Steve Brazier */ diff --git a/src/PHPCensor/Plugin/FlowdockNotify.php b/src/PHPCensor/Plugin/FlowdockNotify.php index a8d267e1..de57770d 100644 --- a/src/PHPCensor/Plugin/FlowdockNotify.php +++ b/src/PHPCensor/Plugin/FlowdockNotify.php @@ -11,9 +11,7 @@ use PHPCensor\Plugin; /** * Flowdock Plugin * - * @author Petr Cervenka - * @package PHPCI - * @subpackage Plugins + * @author Petr Cervenka */ class FlowdockNotify extends Plugin { diff --git a/src/PHPCensor/Plugin/PhpUnit.php b/src/PHPCensor/Plugin/PhpUnit.php index 941ab965..72e362b4 100644 --- a/src/PHPCensor/Plugin/PhpUnit.php +++ b/src/PHPCensor/Plugin/PhpUnit.php @@ -20,7 +20,7 @@ use PHPCensor\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 = []; /** diff --git a/src/PHPCensor/Plugin/Util/Executor.php b/src/PHPCensor/Plugin/Util/Executor.php index 03f3ce76..a6f9c35c 100644 --- a/src/PHPCensor/Plugin/Util/Executor.php +++ b/src/PHPCensor/Plugin/Util/Executor.php @@ -44,7 +44,7 @@ class Executor /** * Execute a the appropriate set of plugins for a given build stage. * - * @param array $config PHPCI configuration + * @param array $config Configuration * @param string $stage * * @return bool diff --git a/src/PHPCensor/Service/UserService.php b/src/PHPCensor/Service/UserService.php index 7cb47852..a0990aee 100644 --- a/src/PHPCensor/Service/UserService.php +++ b/src/PHPCensor/Service/UserService.php @@ -24,7 +24,7 @@ class UserService } /** - * Create a new user within PHPCI. + * Create a new user. * * @param string $name * @param string $email diff --git a/src/PHPCensor/Store/ProjectStore.php b/src/PHPCensor/Store/ProjectStore.php index 70330f73..a77eef7a 100644 --- a/src/PHPCensor/Store/ProjectStore.php +++ b/src/PHPCensor/Store/ProjectStore.php @@ -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 * diff --git a/src/PHPCensor/Worker/BuildWorker.php b/src/PHPCensor/Worker/BuildWorker.php index afe23ca6..dcddb83a 100644 --- a/src/PHPCensor/Worker/BuildWorker.php +++ b/src/PHPCensor/Worker/BuildWorker.php @@ -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 $jobData * @return bool @@ -154,13 +154,11 @@ class BuildWorker protected function verifyJob(Job $job, $jobData) { if (empty($jobData) || !is_array($jobData)) { - // Probably not from PHPCI. $this->pheanstalk->delete($job); return false; } if (!array_key_exists('type', $jobData) || $jobData['type'] !== 'php-censor.build') { - // Probably not from PHPCI. $this->pheanstalk->delete($job); return false; } diff --git a/src/PHPCensor/ZeroConfigPluginInterface.php b/src/PHPCensor/ZeroConfigPluginInterface.php index 23092371..c258fe82 100644 --- a/src/PHPCensor/ZeroConfigPluginInterface.php +++ b/src/PHPCensor/ZeroConfigPluginInterface.php @@ -5,8 +5,6 @@ namespace PHPCensor; use PHPCensor\Model\Build; /** - * PHPCI Plugin Interface - Used by all build plugins. - * * @author Dan Cryer */ interface ZeroConfigPluginInterface diff --git a/tests/PHPCensor/Plugin/Util/PhpUnitResultTest.php b/tests/PHPCensor/Plugin/Util/PhpUnitResultTest.php index 6f10551c..f7beba3b 100644 --- a/tests/PHPCensor/Plugin/Util/PhpUnitResultTest.php +++ b/tests/PHPCensor/Plugin/Util/PhpUnitResultTest.php @@ -8,9 +8,8 @@ use PHPCensor\Plugin\Util\PhpUnitResultJunit; /** * Class PhpUnitResultTest parses the results for the PhpUnitV2 plugin - * @author Pablo Tejada - * @package PHPCI - * @subpackage Plugin + * + * @author Pablo Tejada */ class PhpUnitResultTest extends \PHPUnit\Framework\TestCase {