mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-11 07:34:12 +02:00
CS fixes
This commit is contained in:
@@ -15,7 +15,6 @@ use Monolog\Handler\TestHandler;
|
||||
|
||||
class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
public function testRegister()
|
||||
{
|
||||
$logger = new Logger('test', [$handler = new TestHandler]);
|
||||
@@ -46,7 +45,7 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
return [
|
||||
[null, 10, str_repeat(' ', 1024 * 10), null],
|
||||
[E_ALL, 15, str_repeat(' ', 1024 * 15), E_ALL]
|
||||
[E_ALL, 15, str_repeat(' ', 1024 * 15), E_ALL],
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* This file is part of the Monolog package.
|
||||
*
|
||||
* (c) Roel Harbers <roelharbers@gmail.com>
|
||||
* (c) Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -76,7 +76,7 @@ class RollbarHandlerTest extends TestCase
|
||||
private function createExceptionRecord($level = Logger::DEBUG, $message = 'test', $exception = null): array
|
||||
{
|
||||
return $this->getRecord($level, $message, [
|
||||
'exception' => $exception ?: new Exception()
|
||||
'exception' => $exception ?: new Exception(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the Monolog package.
|
||||
@@ -42,8 +42,8 @@ class SlackRecordTest extends TestCase
|
||||
|
||||
/**
|
||||
* @dataProvider dataGetAttachmentColor
|
||||
* @param int $logLevel
|
||||
* @param string $expectedColour RGB hex color or name of Slack color
|
||||
* @param int $logLevel
|
||||
* @param string $expectedColour RGB hex color or name of Slack color
|
||||
* @covers ::getAttachmentColor
|
||||
*/
|
||||
public function testGetAttachmentColor($logLevel, $expectedColour)
|
||||
@@ -88,7 +88,7 @@ class SlackRecordTest extends TestCase
|
||||
array(array(), '[]'),
|
||||
array($multipleDimensions, json_encode($multipleDimensions, $jsonPrettyPrintFlag)),
|
||||
array($numericKeys, json_encode($numericKeys, $jsonPrettyPrintFlag)),
|
||||
array($singleDimension, json_encode($singleDimension))
|
||||
array($singleDimension, json_encode($singleDimension)),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -176,13 +176,17 @@ class SlackRecordTest extends TestCase
|
||||
$formatter
|
||||
->expects($this->any())
|
||||
->method('format')
|
||||
->will($this->returnCallback(function ($record) { return $record['message'] . 'test'; }));
|
||||
->will($this->returnCallback(function ($record) {
|
||||
return $record['message'] . 'test';
|
||||
}));
|
||||
|
||||
$formatter2 = $this->getMock('Monolog\\Formatter\\FormatterInterface');
|
||||
$formatter2
|
||||
->expects($this->any())
|
||||
->method('format')
|
||||
->will($this->returnCallback(function ($record) { return $record['message'] . 'test1'; }));
|
||||
->will($this->returnCallback(function ($record) {
|
||||
return $record['message'] . 'test1';
|
||||
}));
|
||||
|
||||
$message = 'Test message';
|
||||
$record = new SlackRecord(null, null, false, null, false, false, array(), $formatter);
|
||||
@@ -268,13 +272,13 @@ class SlackRecordTest extends TestCase
|
||||
array(
|
||||
'title' => 'Extra',
|
||||
'value' => sprintf('```%s```', json_encode($extra, $this->jsonPrettyPrintFlag)),
|
||||
'short' => false
|
||||
'short' => false,
|
||||
),
|
||||
array(
|
||||
'title' => 'Context',
|
||||
'value' => sprintf('```%s```', json_encode($context, $this->jsonPrettyPrintFlag)),
|
||||
'short' => false
|
||||
)
|
||||
'short' => false,
|
||||
),
|
||||
),
|
||||
$attachment['fields']
|
||||
);
|
||||
@@ -296,7 +300,7 @@ class SlackRecordTest extends TestCase
|
||||
array(array(
|
||||
'title' => 'Level',
|
||||
'value' => $levelName,
|
||||
'short' => false
|
||||
'short' => false,
|
||||
)),
|
||||
$attachment['fields']
|
||||
);
|
||||
@@ -322,13 +326,13 @@ class SlackRecordTest extends TestCase
|
||||
array(
|
||||
'title' => 'tags',
|
||||
'value' => sprintf('```%s```', json_encode($extra['tags'])),
|
||||
'short' => false
|
||||
'short' => false,
|
||||
),
|
||||
array(
|
||||
'title' => 'test',
|
||||
'value' => $context['test'],
|
||||
'short' => false
|
||||
)
|
||||
'short' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$attachment = $data['attachments'][0];
|
||||
@@ -370,12 +374,12 @@ class SlackRecordTest extends TestCase
|
||||
array(
|
||||
'title' => 'info',
|
||||
'value' => sprintf('```%s```', json_encode(array('author' => 'Jordi'), $this->jsonPrettyPrintFlag)),
|
||||
'short' => false
|
||||
'short' => false,
|
||||
),
|
||||
array(
|
||||
'title' => 'tags',
|
||||
'value' => sprintf('```%s```', json_encode(array('web'))),
|
||||
'short' => false
|
||||
'short' => false,
|
||||
),
|
||||
);
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the Monolog package.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the Monolog package.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the Monolog package.
|
||||
|
Reference in New Issue
Block a user