Code style fixes

This commit is contained in:
Dmitry Khomutov 2017-01-13 22:35:41 +07:00
commit 1237bf450c
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
88 changed files with 205 additions and 261 deletions

View file

@ -13,9 +13,9 @@ use PHPCensor\Builder;
use PHPCensor\Helper\Lang;
use PHPCensor\Model\Build;
use PHPCensor\Plugin\Util\TestResultParsers\Codeception as Parser;
use Psr\Log\LogLevel;
use PHPCensor\Plugin;
use PHPCensor\ZeroConfigPlugin;
use PHPCensor\ZeroConfigPluginInterface;
use Psr\Log\LogLevel;
/**
* Codeception Plugin - Enables full acceptance, unit, and functional testing.
@ -26,7 +26,7 @@ use PHPCensor\ZeroConfigPlugin;
* @package PHPCI
* @subpackage Plugins
*/
class Codeception extends Plugin implements ZeroConfigPlugin
class Codeception extends Plugin implements ZeroConfigPluginInterface
{
/** @var string */
protected $args = '';
@ -142,7 +142,7 @@ class Codeception extends Plugin implements ZeroConfigPlugin
$this->builder->log(
'Codeception XML path: '. $this->builder->buildPath . $this->path . 'report.xml',
Loglevel::DEBUG
LogLevel::DEBUG
);
$xml = file_get_contents($this->builder->buildPath . $this->path . 'report.xml', false);

View file

@ -13,7 +13,7 @@ use PHPCensor;
use PHPCensor\Builder;
use PHPCensor\Model\Build;
use PHPCensor\Plugin;
use PHPCensor\ZeroConfigPlugin;
use PHPCensor\ZeroConfigPluginInterface;
/**
* Composer Plugin - Provides access to Composer functionality.
@ -22,7 +22,7 @@ use PHPCensor\ZeroConfigPlugin;
* @package PHPCI
* @subpackage Plugins
*/
class Composer extends Plugin implements ZeroConfigPlugin
class Composer extends Plugin implements ZeroConfigPluginInterface
{
protected $directory;
protected $action;

View file

@ -9,13 +9,8 @@
namespace PHPCensor\Plugin;
use b8\Config;
use b8\ViewRuntimeException;
use Exception;
use b8\View;
use PHPCensor\Builder;
use PHPCensor\Helper\Lang;
use PHPCensor\Model\Build;
use PHPCensor\Helper\Email as EmailHelper;
use Psr\Log\LogLevel;
use PHPCensor\Plugin;
@ -57,7 +52,7 @@ class Email extends Plugin
try {
$view = $this->getMailTemplate();
} catch (ViewRuntimeException $e) {
} catch (\RuntimeException $e) {
$this->builder->log(
sprintf('Unknown mail template "%s", falling back to default.', $this->options['template']),
LogLevel::WARNING

View file

@ -9,9 +9,7 @@
namespace PHPCensor\Plugin;
use PHPCensor\Builder;
use PHPCensor\Helper\Lang;
use PHPCensor\Model\Build;
use PHPCensor\Plugin;
/**

View file

@ -9,9 +9,7 @@
namespace PHPCensor\Plugin;
use PHPCensor\Builder;
use PHPCensor\Helper\Lang;
use PHPCensor\Model\Build;
use PHPCensor\Plugin;
/**

View file

@ -2,7 +2,6 @@
namespace PHPCensor\Plugin;
use Exception;
use PHPCensor\Builder;
use PHPCensor\Helper\Lang;
use PHPCensor\Model\Build;
@ -204,7 +203,7 @@ class Phar extends Plugin
}
$success = true;
} catch (Exception $e) {
} catch (\Exception $e) {
$this->builder->log(Lang::get('phar_internal_error'));
$this->builder->log($e->getMessage());
}

View file

@ -14,7 +14,7 @@ use PHPCensor\Builder;
use PHPCensor\Model\Build;
use PHPCensor\Model\BuildError;
use PHPCensor\Plugin;
use PHPCensor\ZeroConfigPlugin;
use PHPCensor\ZeroConfigPluginInterface;
/**
* PHP Code Sniffer Plugin - Allows PHP Code Sniffer testing.
@ -23,7 +23,7 @@ use PHPCensor\ZeroConfigPlugin;
* @package PHPCI
* @subpackage Plugins
*/
class PhpCodeSniffer extends Plugin implements ZeroConfigPlugin
class PhpCodeSniffer extends Plugin implements ZeroConfigPluginInterface
{
/**
* @var array

View file

@ -14,7 +14,7 @@ use PHPCensor\Helper\Lang;
use PHPCensor\Model\Build;
use PHPCensor\Model\BuildError;
use PHPCensor\Plugin;
use PHPCensor\ZeroConfigPlugin;
use PHPCensor\ZeroConfigPluginInterface;
/**
* PHP Copy / Paste Detector - Allows PHP Copy / Paste Detector testing.
@ -23,7 +23,7 @@ use PHPCensor\ZeroConfigPlugin;
* @package PHPCI
* @subpackage Plugins
*/
class PhpCpd extends Plugin implements ZeroConfigPlugin
class PhpCpd extends Plugin implements ZeroConfigPluginInterface
{
protected $directory;
protected $args;

View file

@ -13,7 +13,7 @@ use PHPCensor;
use PHPCensor\Builder;
use PHPCensor\Model\Build;
use PHPCensor\Plugin;
use PHPCensor\ZeroConfigPlugin;
use PHPCensor\ZeroConfigPluginInterface;
/**
* PHP Docblock Checker Plugin - Checks your PHP files for appropriate uses of Docblocks
@ -22,7 +22,7 @@ use PHPCensor\ZeroConfigPlugin;
* @package PHPCI
* @subpackage Plugins
*/
class PhpDocblockChecker extends Plugin implements ZeroConfigPlugin
class PhpDocblockChecker extends Plugin implements ZeroConfigPluginInterface
{
/**
* @var string Based on the assumption the root may not hold the code to be

View file

@ -13,7 +13,7 @@ use PHPCensor;
use PHPCensor\Builder;
use PHPCensor\Model\Build;
use PHPCensor\Plugin;
use PHPCensor\ZeroConfigPlugin;
use PHPCensor\ZeroConfigPluginInterface;
/**
* PHP Loc - Allows PHP Copy / Lines of Code testing.
@ -22,7 +22,7 @@ use PHPCensor\ZeroConfigPlugin;
* @package PHPCI
* @subpackage Plugins
*/
class PhpLoc extends Plugin implements ZeroConfigPlugin
class PhpLoc extends Plugin implements ZeroConfigPluginInterface
{
/**
* @var string

View file

@ -13,7 +13,7 @@ use PHPCensor;
use PHPCensor\Builder;
use PHPCensor\Model\Build;
use PHPCensor\Plugin;
use PHPCensor\ZeroConfigPlugin;
use PHPCensor\ZeroConfigPluginInterface;
/**
* PHP Mess Detector Plugin - Allows PHP Mess Detector testing.
@ -22,7 +22,7 @@ use PHPCensor\ZeroConfigPlugin;
* @package PHPCI
* @subpackage Plugins
*/
class PhpMessDetector extends Plugin implements ZeroConfigPlugin
class PhpMessDetector extends Plugin implements ZeroConfigPluginInterface
{
/**
* @var array

View file

@ -12,7 +12,7 @@ namespace PHPCensor\Plugin;
use PHPCensor\Builder;
use PHPCensor\Model\Build;
use PHPCensor\Plugin;
use PHPCensor\ZeroConfigPlugin;
use PHPCensor\ZeroConfigPluginInterface;
/**
* Php Parallel Lint Plugin - Provides access to PHP lint functionality.
@ -21,7 +21,7 @@ use PHPCensor\ZeroConfigPlugin;
* @package PHPCI
* @subpackage Plugins
*/
class PhpParallelLint extends Plugin implements ZeroConfigPlugin
class PhpParallelLint extends Plugin implements ZeroConfigPluginInterface
{
/**
* @var string

View file

@ -10,8 +10,6 @@
namespace PHPCensor\Plugin;
use PHPCensor;
use PHPCensor\Builder;
use PHPCensor\Model\Build;
use PHPCensor\Plugin;
/**

View file

@ -17,7 +17,7 @@ use PHPCensor\Model\BuildError;
use PHPCensor\Plugin\Option\PhpUnitOptions;
use PHPCensor\Plugin\Util\PhpUnitResult;
use PHPCensor\Plugin;
use PHPCensor\ZeroConfigPlugin;
use PHPCensor\ZeroConfigPluginInterface;
/**
* PHP Unit Plugin - A rewrite of the original PHP Unit plugin
@ -27,7 +27,7 @@ use PHPCensor\ZeroConfigPlugin;
* @package PHPCI
* @subpackage Plugins
*/
class PhpUnit extends Plugin implements ZeroConfigPlugin
class PhpUnit extends Plugin implements ZeroConfigPluginInterface
{
/** @var string[] Raw options from the PHPCI config file */
protected $options = array();

6
src/PHPCensor/Plugin/TechnicalDebt.php Executable file → Normal file
View file

@ -13,7 +13,7 @@ use PHPCensor;
use PHPCensor\Builder;
use PHPCensor\Model\Build;
use PHPCensor\Plugin;
use PHPCensor\ZeroConfigPlugin;
use PHPCensor\ZeroConfigPluginInterface;
/**
* Technical Debt Plugin - Checks for existence of "TODO", "FIXME", etc.
@ -22,7 +22,7 @@ use PHPCensor\ZeroConfigPlugin;
* @package PHPCI
* @subpackage Plugins
*/
class TechnicalDebt extends Plugin implements ZeroConfigPlugin
class TechnicalDebt extends Plugin implements ZeroConfigPluginInterface
{
/**
* @var array
@ -155,7 +155,7 @@ class TechnicalDebt extends Plugin implements ZeroConfigPlugin
$skipFile = true;
}
if ($skipFile == false) {
if ($skipFile === false) {
$files[] = $file->getRealPath();
}
}