Such method (L161, Repofuck.php) is only a two liner. It accepts a string to set the current entity.
This line (L163, Repofuck.php) throws an EntityNotDefined exception when it is supplied with an undefined entity (L97, Entities.php):
$this->entity = $this->entities->resolve($name);
Should such line throw an exception, the resetEntity() might go awry; it has no try-catch statement. If a try-catch statement is made, how shall the method go when something is caught? Shall the current entity be untouched? Shall it be returning a false?
Such method (L161, Repofuck.php) is only a two liner. It accepts a string to set the current entity.
This line (L163, Repofuck.php) throws an
EntityNotDefined
exception when it is supplied with an undefined entity (L97, Entities.php):$this->entity = $this->entities->resolve($name);
Should such line throw an exception, the
resetEntity()
might go awry; it has no try-catch statement. If a try-catch statement is made, how shall the method go when something is caught? Shall the current entity be untouched? Shall it be returning afalse
?I am not sure of what will be.