2929final class Config
3030{
3131 /**
32+ * @psalm-mutation-free
33+ *
3234 * @param \Closure(Clock, self): Clock $mapClock
3335 * @param \Closure(Halt, self): Halt $mapHalt
3436 * @param \Closure(HttpTransport, self): HttpTransport $mapHttpTransport
@@ -60,6 +62,7 @@ private function __construct(
6062 ) {
6163 }
6264
65+ #[\NoDiscard]
6366 public static function new (): self
6467 {
6568 return new self (
@@ -97,6 +100,7 @@ public static function new(): self
97100 *
98101 * @param callable(self): self $map
99102 */
103+ #[\NoDiscard]
100104 public function map (callable $ map ): self
101105 {
102106 /** @psalm-suppress ImpureFunctionCall */
@@ -106,6 +110,7 @@ public function map(callable $map): self
106110 /**
107111 * @psalm-mutation-free
108112 */
113+ #[\NoDiscard]
109114 public function withClock (Clock $ clock ): self
110115 {
111116 return new self (
@@ -133,6 +138,7 @@ public function withClock(Clock $clock): self
133138 *
134139 * @param \Closure(Clock, self): Clock $map
135140 */
141+ #[\NoDiscard]
136142 public function mapClock (\Closure $ map ): self
137143 {
138144 $ previous = $ this ->mapClock ;
@@ -163,6 +169,7 @@ public function mapClock(\Closure $map): self
163169 /**
164170 * @psalm-mutation-free
165171 */
172+ #[\NoDiscard]
166173 public function haltProcessVia (Halt $ halt ): self
167174 {
168175 return new self (
@@ -190,6 +197,7 @@ public function haltProcessVia(Halt $halt): self
190197 *
191198 * @param \Closure(Halt, self): Halt $map
192199 */
200+ #[\NoDiscard]
193201 public function mapHalt (\Closure $ map ): self
194202 {
195203 $ previous = $ this ->mapHalt ;
@@ -221,6 +229,7 @@ public function mapHalt(\Closure $map): self
221229 /**
222230 * @psalm-mutation-free
223231 */
232+ #[\NoDiscard]
224233 public function withIO (IO $ io ): self
225234 {
226235 return new self (
@@ -246,6 +255,7 @@ public function withIO(IO $io): self
246255 /**
247256 * @psalm-mutation-free
248257 */
258+ #[\NoDiscard]
249259 public function withEnvironmentPath (EnvironmentPath $ path ): self
250260 {
251261 return new self (
@@ -271,6 +281,7 @@ public function withEnvironmentPath(EnvironmentPath $path): self
271281 /**
272282 * @psalm-mutation-free
273283 */
284+ #[\NoDiscard]
274285 public function useHttpTransport (HttpTransport $ transport ): self
275286 {
276287 return new self (
@@ -298,6 +309,7 @@ public function useHttpTransport(HttpTransport $transport): self
298309 *
299310 * @param \Closure(HttpTransport, self): HttpTransport $map
300311 */
312+ #[\NoDiscard]
301313 public function mapHttpTransport (\Closure $ map ): self
302314 {
303315 $ previous = $ this ->mapHttpTransport ;
@@ -330,6 +342,7 @@ public function mapHttpTransport(\Closure $map): self
330342 *
331343 * @param \Closure(Url): AccessLayer\Connection $sql
332344 */
345+ #[\NoDiscard]
333346 public function openSQLConnectionVia (\Closure $ sql ): self
334347 {
335348 return new self (
@@ -357,6 +370,7 @@ public function openSQLConnectionVia(\Closure $sql): self
357370 *
358371 * @param \Closure(AccessLayer\Connection, self): AccessLayer\Connection $map
359372 */
373+ #[\NoDiscard]
360374 public function mapSQLConnection (\Closure $ map ): self
361375 {
362376 $ previous = $ this ->mapSql ;
@@ -389,6 +403,7 @@ public function mapSQLConnection(\Closure $map): self
389403 *
390404 * @param \Closure(Control\Server, self): Control\Server $map
391405 */
406+ #[\NoDiscard]
392407 public function mapServerControl (\Closure $ map ): self
393408 {
394409 $ previous = $ this ->mapServerControl ;
@@ -421,6 +436,7 @@ public function mapServerControl(\Closure $map): self
421436 *
422437 * @param \Closure(Status\Server, self): Status\Server $map
423438 */
439+ #[\NoDiscard]
424440 public function mapServerStatus (\Closure $ map ): self
425441 {
426442 $ previous = $ this ->mapServerStatus ;
@@ -453,6 +469,7 @@ public function mapServerStatus(\Closure $map): self
453469 *
454470 * @param \Closure(Watch, self): Watch $map
455471 */
472+ #[\NoDiscard]
456473 public function mapFileWatch (\Closure $ map ): self
457474 {
458475 $ previous = $ this ->mapFileWatch ;
@@ -485,6 +502,7 @@ public function mapFileWatch(\Closure $map): self
485502 *
486503 * @param \Closure(Path, self): Attempt<Filesystem> $filesystem
487504 */
505+ #[\NoDiscard]
488506 public function mountFilesystemVia (\Closure $ filesystem ): self
489507 {
490508 return new self (
@@ -512,6 +530,7 @@ public function mountFilesystemVia(\Closure $filesystem): self
512530 *
513531 * @param \Closure(Filesystem, self): Filesystem $map
514532 */
533+ #[\NoDiscard]
515534 public function mapFilesystem (\Closure $ map ): self
516535 {
517536 $ previous = $ this ->mapFilesystem ;
@@ -542,6 +561,7 @@ public function mapFilesystem(\Closure $map): self
542561 /**
543562 * @psalm-mutation-free
544563 */
564+ #[\NoDiscard]
545565 public function handleSignalsVia (Handler $ handler ): self
546566 {
547567 return new self (
@@ -567,6 +587,7 @@ public function handleSignalsVia(Handler $handler): self
567587 /**
568588 * @internal
569589 */
590+ #[\NoDiscard]
570591 public function clock (): Clock
571592 {
572593 return ($ this ->mapClock )($ this ->clock , $ this );
@@ -577,6 +598,7 @@ public function clock(): Clock
577598 *
578599 * @return Attempt<Filesystem>
579600 */
601+ #[\NoDiscard]
580602 public function filesystem (Path $ path ): Attempt
581603 {
582604 return ($ this ->filesystem )($ path , $ this )->map (
@@ -587,6 +609,7 @@ public function filesystem(Path $path): Attempt
587609 /**
588610 * @internal
589611 */
612+ #[\NoDiscard]
590613 public function io (): IO
591614 {
592615 return $ this ->io ;
@@ -595,6 +618,7 @@ public function io(): IO
595618 /**
596619 * @internal
597620 */
621+ #[\NoDiscard]
598622 public function halt (): Halt
599623 {
600624 return ($ this ->mapHalt )($ this ->halt , $ this );
@@ -603,6 +627,7 @@ public function halt(): Halt
603627 /**
604628 * @internal
605629 */
630+ #[\NoDiscard]
606631 public function environmentPath (): EnvironmentPath
607632 {
608633 return $ this ->path ;
@@ -611,6 +636,7 @@ public function environmentPath(): EnvironmentPath
611636 /**
612637 * @internal
613638 */
639+ #[\NoDiscard]
614640 public function httpTransport (): HttpTransport
615641 {
616642 $ transport = $ this ->httpTransport ?? Curl::of (
@@ -624,6 +650,7 @@ public function httpTransport(): HttpTransport
624650 /**
625651 * @internal
626652 */
653+ #[\NoDiscard]
627654 public function sql (Url $ url ): AccessLayer \Connection
628655 {
629656 return ($ this ->mapSql )(
@@ -635,6 +662,7 @@ public function sql(Url $url): AccessLayer\Connection
635662 /**
636663 * @internal
637664 */
665+ #[\NoDiscard]
638666 public function serverControl (Control \Server $ server ): Control \Server
639667 {
640668 return ($ this ->mapServerControl )($ server , $ this );
@@ -643,6 +671,7 @@ public function serverControl(Control\Server $server): Control\Server
643671 /**
644672 * @internal
645673 */
674+ #[\NoDiscard]
646675 public function serverStatus (Status \Server $ server ): Status \Server
647676 {
648677 return ($ this ->mapServerStatus )($ server , $ this );
@@ -651,6 +680,7 @@ public function serverStatus(Status\Server $server): Status\Server
651680 /**
652681 * @internal
653682 */
683+ #[\NoDiscard]
654684 public function fileWatch (Watch $ watch ): Watch
655685 {
656686 return ($ this ->mapFileWatch )($ watch , $ this );
@@ -659,6 +689,7 @@ public function fileWatch(Watch $watch): Watch
659689 /**
660690 * @internal
661691 */
692+ #[\NoDiscard]
662693 public function signalsHandler (): Handler
663694 {
664695 return $ this ->signals ;
0 commit comments