1
0
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:
Aidan Woods 2021-10-15 23:20:20 +01:00
parent 421a2393d0
commit 638079a3da
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9
3 changed files with 3 additions and 3 deletions

View File

@ -108,7 +108,7 @@ final class State implements StateBearer
}
/** @return self */
public static function fromState(State $State)
public static function from(State $State)
{
return $State;
}

View File

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

View File

@ -49,6 +49,6 @@ final class StateTest extends TestCase
{
$State = new State;
$this->assertSame($State, State::fromState($State));
$this->assertSame($State, State::from($State));
}
}