From 5321d448fecf1546944dd62d8df845937efc9979 Mon Sep 17 00:00:00 2001 From: Sebastiaan Luca Date: Thu, 17 Mar 2022 12:45:59 +0100 Subject: [PATCH] Format code --- src/Pipe.php | 10 ++++++---- src/PipeProxy.php | 2 ++ src/functions.php | 2 ++ tests/IdentifierTest.php | 2 ++ tests/MethodsTest.php | 2 ++ tests/ObjectTest.php | 2 ++ 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/Pipe.php b/src/Pipe.php index 29cb73e..5c7a7c7 100644 --- a/src/Pipe.php +++ b/src/Pipe.php @@ -1,5 +1,7 @@ pipe($name, ...$arguments); } - public function __call(string $name, array $arguments): mixed + public static function from($value): self { - return $this->pipe($name, ...$arguments); + return new self($value); } public function pipe(callable|object|string $callback, mixed ...$arguments): self|PipeProxy diff --git a/src/PipeProxy.php b/src/PipeProxy.php index 3ef2f45..033ce8c 100644 --- a/src/PipeProxy.php +++ b/src/PipeProxy.php @@ -1,5 +1,7 @@