Skip to content

Commit

Permalink
Make the AbstractSlackAttachmentFormatter compatible with version 2 (#19
Browse files Browse the repository at this point in the history
)
  • Loading branch information
gmponos authored May 16, 2020
1 parent 2e6fd92 commit 61ad8fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Formatter/AbstractSlackAttachmentFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function format(array $record): array
* @param int $depth
* @return mixed
*/
protected function normalize($data, int $depth = 0)
protected function normalize($data, $depth = 0)
{
if ($data === null || is_scalar($data)) {
return $this->normalizeScalar($data);
Expand All @@ -123,7 +123,7 @@ protected function normalize($data, int $depth = 0)
return $data;
}

protected function normalizeException(Throwable $e, int $depth = 0): array
protected function normalizeException($e, $depth = 0): array
{
return [
'class' => get_class($e),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Webthink\MonologSlack\Test\Unit\Formatter;

use Monolog\DateTimeImmutable;
use Monolog\Logger;
use Webthink\MonologSlack\Test\App\FooBar\TestBarNorm;
use Webthink\MonologSlack\Test\App\FooBar\TestFooNorm;
Expand All @@ -17,7 +16,7 @@ final class AbstractSlackAttachmentFormatterTest extends TestCase
public function testFormat()
{
$formatter = new DummySlackAttachmentFormatter();
$dateTime = new DateTimeImmutable(false);
$dateTime = new \DateTimeImmutable();
$formatted = $formatter->format([
'level' => Logger::ERROR,
'level_name' => 'ERROR',
Expand Down

0 comments on commit 61ad8fa

Please sign in to comment.