Slightly nicer to allow construction from StateBearer

This commit is contained in:
Aidan Woods 2021-10-15 23:23:14 +01:00
parent 638079a3da
commit 9749ef7a8e
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -6,5 +6,5 @@ interface StateBearer
{
public function state(): State;
/** @return static */
public static function from(State $State);
public static function from(StateBearer $StateBearer);
}