mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
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
Block a user