diff --git a/.php_cs b/.php_cs index f04e5a93..366ccd08 100644 --- a/.php_cs +++ b/.php_cs @@ -9,7 +9,7 @@ For the full copyright and license information, please view the LICENSE file that was distributed with this source code. EOF; -$finder = Symfony\CS\Finder\DefaultFinder::create() +$finder = Symfony\CS\Finder::create() ->files() ->name('*.php') ->exclude('Fixtures') @@ -17,23 +17,28 @@ $finder = Symfony\CS\Finder\DefaultFinder::create() ->in(__DIR__.'/tests') ; -return Symfony\CS\Config\Config::create() +return Symfony\CS\Config::create() ->setUsingCache(true) + //->setUsingLinter(false) ->setRiskyAllowed(true) ->setRules(array( '@PSR2' => true, - 'duplicate_semicolon' => true, - 'extra_empty_lines' => true, + 'binary_operator_spaces' => true, + 'blank_line_before_return' => true, 'header_comment' => array('header' => $header), 'include' => true, 'long_array_syntax' => true, 'method_separation' => true, - 'multiline_array_trailing_comma' => true, - 'namespace_no_leading_whitespace' => true, 'no_blank_lines_after_class_opening' => true, - 'no_empty_lines_after_phpdocs' => true, - 'object_operator' => true, - 'operators_spaces' => true, + 'no_blank_lines_after_phpdoc' => true, + 'no_blank_lines_between_uses' => true, + 'no_duplicate_semicolons' => true, + 'no_extra_consecutive_blank_lines' => true, + 'no_leading_import_slash' => true, + 'no_leading_namespace_whitespace' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_unused_imports' => true, + 'object_operator_without_whitespace' => true, 'phpdoc_align' => true, 'phpdoc_indent' => true, 'phpdoc_no_access' => true, @@ -43,15 +48,11 @@ return Symfony\CS\Config\Config::create() 'phpdoc_trim' => true, 'phpdoc_type_to_var' => true, 'psr0' => true, - 'return' => true, - 'remove_leading_slash_use' => true, - 'remove_lines_between_uses' => true, - 'single_array_no_trailing_comma' => true, 'single_blank_line_before_namespace' => true, 'spaces_cast' => true, - 'standardize_not_equal' => true, - 'ternary_spaces' => true, - 'unused_use' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, 'whitespacy_lines' => true, )) ->finder($finder) diff --git a/src/Monolog/Handler/AmqpHandler.php b/src/Monolog/Handler/AmqpHandler.php index bf0552c7..2f79c1c0 100644 --- a/src/Monolog/Handler/AmqpHandler.php +++ b/src/Monolog/Handler/AmqpHandler.php @@ -83,6 +83,7 @@ class AmqpHandler extends AbstractProcessingHandler { if ($this->exchange instanceof AMQPExchange) { parent::handleBatch($records); + return; } @@ -107,7 +108,7 @@ class AmqpHandler extends AbstractProcessingHandler /** * Gets the routing key for the AMQP exchange * - * @param array $record + * @param array $record * @return string */ private function getRoutingKey(array $record) @@ -123,7 +124,7 @@ class AmqpHandler extends AbstractProcessingHandler } /** - * @param string $data + * @param string $data * @return AMQPMessage */ private function createAmqpMessage($data) diff --git a/src/Monolog/Handler/BrowserConsoleHandler.php b/src/Monolog/Handler/BrowserConsoleHandler.php index 86a59a79..a8a43aee 100644 --- a/src/Monolog/Handler/BrowserConsoleHandler.php +++ b/src/Monolog/Handler/BrowserConsoleHandler.php @@ -65,7 +65,7 @@ class BrowserConsoleHandler extends AbstractProcessingHandler if (count(self::$records)) { if ($format === 'html') { - self::writeOutput(''); + self::writeOutput(''); } elseif ($format === 'js') { self::writeOutput(self::generateScript()); } diff --git a/src/Monolog/Handler/HandlerWrapper.php b/src/Monolog/Handler/HandlerWrapper.php index 8be8e5ea..ad2bd814 100644 --- a/src/Monolog/Handler/HandlerWrapper.php +++ b/src/Monolog/Handler/HandlerWrapper.php @@ -74,6 +74,7 @@ class HandlerWrapper implements HandlerInterface public function pushProcessor($callback) { $this->handler->pushProcessor($callback); + return $this; } @@ -91,6 +92,7 @@ class HandlerWrapper implements HandlerInterface public function setFormatter(FormatterInterface $formatter) { $this->handler->setFormatter($formatter); + return $this; } @@ -101,4 +103,4 @@ class HandlerWrapper implements HandlerInterface { return $this->handler->getFormatter(); } -} \ No newline at end of file +} diff --git a/src/Monolog/Handler/TestHandler.php b/src/Monolog/Handler/TestHandler.php index e24fa9e9..2e0e8c4b 100644 --- a/src/Monolog/Handler/TestHandler.php +++ b/src/Monolog/Handler/TestHandler.php @@ -18,50 +18,50 @@ namespace Monolog\Handler; * * @author Jordi Boggiano * - * @method boolean hasEmergency($record) - * @method boolean hasAlert($record) - * @method boolean hasCritical($record) - * @method boolean hasError($record) - * @method boolean hasWarning($record) - * @method boolean hasNotice($record) - * @method boolean hasInfo($record) - * @method boolean hasDebug($record) + * @method bool hasEmergency($record) + * @method bool hasAlert($record) + * @method bool hasCritical($record) + * @method bool hasError($record) + * @method bool hasWarning($record) + * @method bool hasNotice($record) + * @method bool hasInfo($record) + * @method bool hasDebug($record) * - * @method boolean hasEmergencyRecords() - * @method boolean hasAlertRecords() - * @method boolean hasCriticalRecords() - * @method boolean hasErrorRecords() - * @method boolean hasWarningRecords() - * @method boolean hasNoticeRecords() - * @method boolean hasInfoRecords() - * @method boolean hasDebugRecords() + * @method bool hasEmergencyRecords() + * @method bool hasAlertRecords() + * @method bool hasCriticalRecords() + * @method bool hasErrorRecords() + * @method bool hasWarningRecords() + * @method bool hasNoticeRecords() + * @method bool hasInfoRecords() + * @method bool hasDebugRecords() * - * @method boolean hasEmergencyThatContains($message) - * @method boolean hasAlertThatContains($message) - * @method boolean hasCriticalThatContains($message) - * @method boolean hasErrorThatContains($message) - * @method boolean hasWarningThatContains($message) - * @method boolean hasNoticeThatContains($message) - * @method boolean hasInfoThatContains($message) - * @method boolean hasDebugThatContains($message) + * @method bool hasEmergencyThatContains($message) + * @method bool hasAlertThatContains($message) + * @method bool hasCriticalThatContains($message) + * @method bool hasErrorThatContains($message) + * @method bool hasWarningThatContains($message) + * @method bool hasNoticeThatContains($message) + * @method bool hasInfoThatContains($message) + * @method bool hasDebugThatContains($message) * - * @method boolean hasEmergencyThatMatches($message) - * @method boolean hasAlertThatMatches($message) - * @method boolean hasCriticalThatMatches($message) - * @method boolean hasErrorThatMatches($message) - * @method boolean hasWarningThatMatches($message) - * @method boolean hasNoticeThatMatches($message) - * @method boolean hasInfoThatMatches($message) - * @method boolean hasDebugThatMatches($message) + * @method bool hasEmergencyThatMatches($message) + * @method bool hasAlertThatMatches($message) + * @method bool hasCriticalThatMatches($message) + * @method bool hasErrorThatMatches($message) + * @method bool hasWarningThatMatches($message) + * @method bool hasNoticeThatMatches($message) + * @method bool hasInfoThatMatches($message) + * @method bool hasDebugThatMatches($message) * - * @method boolean hasEmergencyThatPasses($message) - * @method boolean hasAlertThatPasses($message) - * @method boolean hasCriticalThatPasses($message) - * @method boolean hasErrorThatPasses($message) - * @method boolean hasWarningThatPasses($message) - * @method boolean hasNoticeThatPasses($message) - * @method boolean hasInfoThatPasses($message) - * @method boolean hasDebugThatPasses($message) + * @method bool hasEmergencyThatPasses($message) + * @method bool hasAlertThatPasses($message) + * @method bool hasCriticalThatPasses($message) + * @method bool hasErrorThatPasses($message) + * @method bool hasWarningThatPasses($message) + * @method bool hasNoticeThatPasses($message) + * @method bool hasInfoThatPasses($message) + * @method bool hasDebugThatPasses($message) */ class TestHandler extends AbstractProcessingHandler {