mirror of https://github.com/erusev/parsedown.git
Slightly nicer to allow construction from StateBearer
This commit is contained in:
parent
638079a3da
commit
9749ef7a8e
|
@ -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
|
||||
|
|
|
@ -6,5 +6,5 @@ interface StateBearer
|
|||
{
|
||||
public function state(): State;
|
||||
/** @return static */
|
||||
public static function from(State $State);
|
||||
public static function from(StateBearer $StateBearer);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue