From be5210537933d86a5c4b5c58f837031d25038f31 Mon Sep 17 00:00:00 2001 From: gkedzierski Date: Mon, 16 Jun 2014 17:56:20 +0200 Subject: [PATCH] Move constructor argument before --- src/Monolog/Handler/SlackHandler.php | 4 ++-- tests/Monolog/Handler/SlackHandlerTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Monolog/Handler/SlackHandler.php b/src/Monolog/Handler/SlackHandler.php index 5a3cdea2..f38a6928 100644 --- a/src/Monolog/Handler/SlackHandler.php +++ b/src/Monolog/Handler/SlackHandler.php @@ -49,11 +49,11 @@ class SlackHandler extends SocketHandler * @param string $token Slack API token * @param string $channel Slack channel (encoded ID or name) * @param string $username Name of a bot + * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) * @param int $level The minimum logging level at which this handler will be triggered * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) */ - public function __construct($token, $channel, $username = 'Monolog', $level = Logger::CRITICAL, $bubble = true, $useAttachment = true) + public function __construct($token, $channel, $username = 'Monolog', $useAttachment = true, $level = Logger::CRITICAL, $bubble = true) { if (!extension_loaded('openssl')) { throw new MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler'); diff --git a/tests/Monolog/Handler/SlackHandlerTest.php b/tests/Monolog/Handler/SlackHandlerTest.php index 90b7f664..943c466b 100644 --- a/tests/Monolog/Handler/SlackHandlerTest.php +++ b/tests/Monolog/Handler/SlackHandlerTest.php @@ -96,7 +96,7 @@ class SlackHandlerTest extends TestCase private function createHandler($token = 'myToken', $channel = 'channel1', $username = 'Monolog', $useAttachment = true) { - $constructorArgs = array($token, $channel, $username, Logger::DEBUG, true, $useAttachment); + $constructorArgs = array($token, $channel, $username, $useAttachment, Logger::DEBUG, true); $this->res = fopen('php://memory', 'a'); $this->handler = $this->getMock( '\Monolog\Handler\SlackHandler',