From adc0dfe77902fbcb57061c4b64370dcb0d854573 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Tue, 12 Nov 2024 17:38:31 +0200 Subject: Add phpstan --- tests/FileSystemDriverTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/FileSystemDriverTest.php') diff --git a/tests/FileSystemDriverTest.php b/tests/FileSystemDriverTest.php index c28c489..a05b5a9 100644 --- a/tests/FileSystemDriverTest.php +++ b/tests/FileSystemDriverTest.php @@ -126,7 +126,7 @@ class FileSystemDriverTest extends MockeryTestCase $this->assertCount(8, $lines); $first_line = $lines[0]; - $last_line = end($lines); + $last_line = $lines[count($lines) - 1]; $full_date = (new DateTime())->format('Y-m-d H:i:s'); $this->assertStringContainsString("[{$full_date}] FileSystemDriverTest.EMERGENCY: test", $first_line); $this->assertStringContainsString("[{$full_date}] FileSystemDriverTest.DEBUG: test", $last_line); @@ -161,7 +161,7 @@ class FileSystemDriverTest extends MockeryTestCase $driver->shouldReceive('log')->passthru(); $driver->shouldReceive('exists')->andReturn(true); $driver->shouldReceive('isWriteable')->andReturns(true); - $driver->shouldReceive('write')->withArgs(function ($path, $data) use (&$result) { + $driver->shouldReceive('write')->withArgs(function (string $path, string $data) use (&$result) { $result .= $data; return true; -- cgit v1.2.3