diff --git a/psalm.xml b/psalm.xml
index 510148d..feccc34 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -14,4 +14,7 @@
+
+
+
diff --git a/src/LineParser.php b/src/LineParser.php
index d1ef1c8..754ee23 100644
--- a/src/LineParser.php
+++ b/src/LineParser.php
@@ -13,5 +13,6 @@ interface LineParser
/**
* @return Maybe
*/
+ #[\NoDiscard]
public function __invoke(Str $line): Maybe;
}
diff --git a/src/Log.php b/src/Log.php
index 12e20b4..3d5942b 100644
--- a/src/Log.php
+++ b/src/Log.php
@@ -41,11 +41,13 @@ public static function of(PointInTime $time, Str $raw, Set $attributes): self
return new self($time, $raw, $attributes);
}
+ #[\NoDiscard]
public function time(): PointInTime
{
return $this->time;
}
+ #[\NoDiscard]
public function raw(): Str
{
return $this->raw;
@@ -54,6 +56,7 @@ public function raw(): Str
/**
* @return Set
*/
+ #[\NoDiscard]
public function attributes(): Set
{
return $this->attributes;
@@ -62,16 +65,19 @@ public function attributes(): Set
/**
* @return Maybe
*/
+ #[\NoDiscard]
public function attribute(string $key): Maybe
{
return $this->attributes->find(static fn($attribute) => $attribute->key() === $key);
}
+ #[\NoDiscard]
public function equals(self $log): bool
{
return $this->raw->equals($log->raw());
}
+ #[\NoDiscard]
public function toString(): string
{
return $this->raw->toString();
diff --git a/src/Log/Attribute.php b/src/Log/Attribute.php
index 51be484..e259554 100644
--- a/src/Log/Attribute.php
+++ b/src/Log/Attribute.php
@@ -8,6 +8,8 @@
*/
interface Attribute
{
+ #[\NoDiscard]
public function key(): string;
+ #[\NoDiscard]
public function value(): mixed;
}
diff --git a/src/Reader.php b/src/Reader.php
index 4bd7248..b591235 100644
--- a/src/Reader.php
+++ b/src/Reader.php
@@ -18,6 +18,7 @@ private function __construct(LineParser $parser)
$this->parse = $parser;
}
+ #[\NoDiscard]
public function __invoke(Content $file): Sequence
{
/**