From d451045fa1198cd8234900167a4c6024e2eb5eff Mon Sep 17 00:00:00 2001 From: "Victor.Sergeyev" Date: Mon, 2 Dec 2024 12:38:02 +0400 Subject: [PATCH] fix: lazy collection type hinting --- src/Entities/LogEntryCollection.php | 2 +- src/Helpers/LogParser.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Entities/LogEntryCollection.php b/src/Entities/LogEntryCollection.php index 8dbc50c..15a7682 100644 --- a/src/Entities/LogEntryCollection.php +++ b/src/Entities/LogEntryCollection.php @@ -18,7 +18,7 @@ class LogEntryCollection extends LazyCollection { public static $lastCount = null; - public static function load(string $raw): static + public static function load(string|LazyCollection $raw): static { return new static(function () use (&$raw) { foreach (LogParser::parse($raw) as $entry) { diff --git a/src/Helpers/LogParser.php b/src/Helpers/LogParser.php index f3646e2..0af7855 100644 --- a/src/Helpers/LogParser.php +++ b/src/Helpers/LogParser.php @@ -22,7 +22,7 @@ class LogParser * @param string|LazyCollection $raw * @return array|LazyCollection */ - public static function parse(&$raw) + public static function parse(string|LazyCollection &$raw) { static::$parsed = [];