mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-08 06:06:40 +02:00
CS fixes
This commit is contained in:
@@ -46,9 +46,9 @@ class HtmlFormatter extends NormalizerFormatter
|
|||||||
/**
|
/**
|
||||||
* Creates an HTML table row
|
* Creates an HTML table row
|
||||||
*
|
*
|
||||||
* @param string $th Row header content
|
* @param string $th Row header content
|
||||||
* @param string $td Row standard cell content
|
* @param string $td Row standard cell content
|
||||||
* @param bool $escapeTd false if td content must not be html escaped
|
* @param bool $escapeTd false if td content must not be html escaped
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function addRow($th, $td = ' ', $escapeTd = true)
|
private function addRow($th, $td = ' ', $escapeTd = true)
|
||||||
|
@@ -24,7 +24,6 @@ use Monolog\Logger;
|
|||||||
*/
|
*/
|
||||||
class FleepHookHandler extends SocketHandler
|
class FleepHookHandler extends SocketHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
const FLEEP_HOST = 'fleep.io';
|
const FLEEP_HOST = 'fleep.io';
|
||||||
|
|
||||||
const FLEEP_HOOK_URI = '/hook/';
|
const FLEEP_HOOK_URI = '/hook/';
|
||||||
@@ -40,9 +39,9 @@ class FleepHookHandler extends SocketHandler
|
|||||||
* For instructions on how to create a new web hook in your conversations
|
* For instructions on how to create a new web hook in your conversations
|
||||||
* see https://fleep.io/integrations/webhooks/
|
* see https://fleep.io/integrations/webhooks/
|
||||||
*
|
*
|
||||||
* @param string $token Webhook token
|
* @param string $token Webhook token
|
||||||
* @param bool|int $level The minimum logging level at which this handler will be triggered
|
* @param bool|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 $bubble Whether the messages that are handled can bubble up the stack or not
|
||||||
* @throws MissingExtensionException
|
* @throws MissingExtensionException
|
||||||
*/
|
*/
|
||||||
public function __construct($token, $level = Logger::DEBUG, $bubble = true)
|
public function __construct($token, $level = Logger::DEBUG, $bubble = true)
|
||||||
@@ -67,7 +66,6 @@ class FleepHookHandler extends SocketHandler
|
|||||||
protected function getDefaultFormatter()
|
protected function getDefaultFormatter()
|
||||||
{
|
{
|
||||||
return new LineFormatter(null, null, true, true);
|
return new LineFormatter(null, null, true, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -81,11 +79,10 @@ class FleepHookHandler extends SocketHandler
|
|||||||
$this->closeSocket();
|
$this->closeSocket();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @param array $record
|
* @param array $record
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function generateDataStream($record)
|
protected function generateDataStream($record)
|
||||||
@@ -95,7 +92,6 @@ class FleepHookHandler extends SocketHandler
|
|||||||
return $this->buildHeader($content) . $content;
|
return $this->buildHeader($content) . $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the header of the API Call
|
* Builds the header of the API Call
|
||||||
*
|
*
|
||||||
@@ -113,11 +109,10 @@ class FleepHookHandler extends SocketHandler
|
|||||||
return $header;
|
return $header;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the body of API call
|
* Builds the body of API call
|
||||||
*
|
*
|
||||||
* @param array $record
|
* @param array $record
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function buildContent($record)
|
private function buildContent($record)
|
||||||
@@ -128,5 +123,4 @@ class FleepHookHandler extends SocketHandler
|
|||||||
|
|
||||||
return http_build_query($dataArray);
|
return http_build_query($dataArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -75,8 +75,8 @@ class WebProcessor
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $extraName
|
* @param string $extraName
|
||||||
* @param string $serverName
|
* @param string $serverName
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function addExtraField($extraName, $serverName)
|
public function addExtraField($extraName, $serverName)
|
||||||
|
@@ -16,9 +16,6 @@ use Monolog\Logger;
|
|||||||
use Monolog\TestCase;
|
use Monolog\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit tests for the FleepHookHandler
|
|
||||||
*
|
|
||||||
* @author Ando Roots <ando@sqroot.eu>
|
|
||||||
* @coversDefaultClass \Monolog\Handler\FleepHookHandler
|
* @coversDefaultClass \Monolog\Handler\FleepHookHandler
|
||||||
*/
|
*/
|
||||||
class FleepHookHandlerTest extends TestCase
|
class FleepHookHandlerTest extends TestCase
|
||||||
|
Reference in New Issue
Block a user