mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Slightly nicer method name
Normally this name might be too vague for an interface, but implementing this interface is a fairly special use case. We can expect dedicated types here (so method name unlikely to be an issue).
This commit is contained in:
parent
421a2393d0
commit
638079a3da
@ -108,7 +108,7 @@ final class State implements StateBearer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @return self */
|
/** @return self */
|
||||||
public static function fromState(State $State)
|
public static function from(State $State)
|
||||||
{
|
{
|
||||||
return $State;
|
return $State;
|
||||||
}
|
}
|
||||||
|
@ -6,5 +6,5 @@ interface StateBearer
|
|||||||
{
|
{
|
||||||
public function state(): State;
|
public function state(): State;
|
||||||
/** @return static */
|
/** @return static */
|
||||||
public static function fromState(State $State);
|
public static function from(State $State);
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,6 @@ final class StateTest extends TestCase
|
|||||||
{
|
{
|
||||||
$State = new State;
|
$State = new State;
|
||||||
|
|
||||||
$this->assertSame($State, State::fromState($State));
|
$this->assertSame($State, State::from($State));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user