diff --git a/CHANGELOG.md b/CHANGELOG.md
index eecf798..69369fc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog
+## [Unreleased]
+
+### Fixed
+
+- Forgot to declare pure methods
+
## 4.1.0 - 2025-08-20
### Changed
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/Handler.php b/src/Handler.php
index 2c6071e..1e985fc 100644
--- a/src/Handler.php
+++ b/src/Handler.php
@@ -11,11 +11,18 @@
final class Handler
{
+ /**
+ * @psalm-mutation-free
+ */
private function __construct(
private Main|Async $implementation,
) {
}
+ /**
+ * @psalm-pure
+ */
+ #[\NoDiscard]
public static function main(): self
{
return new self(Main::install());
@@ -43,7 +50,9 @@ public function remove(callable $listener): void
* instruct the fiber to terminate.
*
* @internal
+ * @psalm-mutation-free
*/
+ #[\NoDiscard]
public function async(?Interceptor $interceptor = null): self
{
return new self(
diff --git a/src/Handler/Async.php b/src/Handler/Async.php
index dfb42a0..9211e86 100644
--- a/src/Handler/Async.php
+++ b/src/Handler/Async.php
@@ -15,12 +15,19 @@
*/
final class Async
{
+ /**
+ * @psalm-mutation-free
+ */
private function __construct(
private Handler $parent,
private ?Interceptor $interceptor,
) {
}
+ /**
+ * @psalm-pure
+ */
+ #[\NoDiscard]
public static function new(Handler $parent, ?Interceptor $interceptor): self
{
return new self($parent, $interceptor);
diff --git a/src/Handler/Main.php b/src/Handler/Main.php
index 05bd1a5..6ca4f99 100644
--- a/src/Handler/Main.php
+++ b/src/Handler/Main.php
@@ -19,6 +19,8 @@
final class Main
{
/**
+ * @psalm-mutation-free
+ *
* @param Map> $handlers
*/
private function __construct(
@@ -28,6 +30,10 @@ private function __construct(
) {
}
+ /**
+ * @psalm-pure
+ */
+ #[\NoDiscard]
public static function install(): self
{
return new self(