Get the current environment if the user is in a project directory.
public getCurrentEnvironment ( Platformsh\Client\Model\Project $expectedProject = null, boolean | null $refresh = null ) : Platformsh\Client\Model\Environment | false | ||
$expectedProject | Platformsh\Client\Model\Project | The expected project. |
$refresh | boolean | null | Whether to refresh the environments or projects cache. |
return | Platformsh\Client\Model\Environment | false | The current environment. |