From 1bcf66f5704734ef07f1e1a348ff00968b14fcaa Mon Sep 17 00:00:00 2001 From: Kyrylo Silin Date: Tue, 30 Jul 2024 22:10:29 +0300 Subject: [PATCH] Add declare(strict_types=1); --- src/Backtrace.php | 2 ++ src/BaseMiddleware.php | 2 ++ src/CodeHunk.php | 2 ++ src/Config.php | 2 ++ src/FileCache.php | 2 ++ src/MiddlewareStack.php | 2 ++ src/Report.php | 2 ++ src/Reporter.php | 2 ++ src/Sender.php | 2 ++ src/Truncator.php | 2 ++ src/WrappedError.php | 2 ++ tests/ConfigTest.php | 2 ++ tests/ReportTest.php | 10 ++++++---- tests/ReporterTest.php | 2 ++ tests/TruncatorTest.php | 2 ++ tests/WrappedErrorTest.php | 2 ++ 16 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/Backtrace.php b/src/Backtrace.php index e04da55..76742a6 100644 --- a/src/Backtrace.php +++ b/src/Backtrace.php @@ -1,5 +1,7 @@ assertEquals("InvalidArgumentException", $error1['type']); $this->assertEquals("error 2", $error1['message']); $this->assertMatchesRegularExpression('/ReportTest.php$/', $error1['backtrace'][0]['file']); - $this->assertEquals(17, $error1['backtrace'][0]['line']); + $this->assertEquals(19, $error1['backtrace'][0]['line']); $this->assertEquals('', $error1['backtrace'][0]['function']); $this->assertEquals('testDataWithNestedErrors', $error1['backtrace'][1]['function']); $this->assertMatchesRegularExpression('/ReportTest.php$/', $error1['backtrace'][0]['file']); $this->assertEquals([ - 'start_line' => 15, + 'start_line' => 17, 'lines' => [ ' } catch (\Exception $e1) {', ' try {', @@ -44,12 +46,12 @@ public function testDataWithNestedErrors(): void $this->assertEquals("Exception", $error2['type']); $this->assertEquals("error 1", $error2['message']); $this->assertMatchesRegularExpression('/ReportTest.php$/', $error2['backtrace'][0]['file']); - $this->assertEquals(14, $error2['backtrace'][0]['line']); + $this->assertEquals(16, $error2['backtrace'][0]['line']); $this->assertEquals('', $error2['backtrace'][0]['function']); $this->assertEquals('testDataWithNestedErrors', $error2['backtrace'][1]['function']); $this->assertMatchesRegularExpression('/ReportTest.php$/', $error2['backtrace'][0]['file']); $this->assertEquals([ - 'start_line' => 12, + 'start_line' => 14, 'lines' => [ ' {', ' try {', diff --git a/tests/ReporterTest.php b/tests/ReporterTest.php index 71babb2..5848db8 100644 --- a/tests/ReporterTest.php +++ b/tests/ReporterTest.php @@ -1,5 +1,7 @@