diff --git a/src/State.php b/src/State.php index d2a5ea7..efa9813 100644 --- a/src/State.php +++ b/src/State.php @@ -108,9 +108,9 @@ final class State implements StateBearer } /** @return self */ - public static function from(State $State) + public static function from(StateBearer $StateBearer) { - return $State; + return $StateBearer->state(); } public function isolatedCopy(): self diff --git a/src/StateBearer.php b/src/StateBearer.php index 8e64bef..f5580ec 100644 --- a/src/StateBearer.php +++ b/src/StateBearer.php @@ -6,5 +6,5 @@ interface StateBearer { public function state(): State; /** @return static */ - public static function from(State $State); + public static function from(StateBearer $StateBearer); }