RuntimeEnvironmentInterface

Interface

Answers common runtime-environment questions from process environment flags.

Table of Contents

Methods

isAgentPresent()

Returns whether the current process exposes known AI-agent environment markers.

 : bool
isCi()

Returns whether the current process runs in a CI environment.

 : bool
isComposerTestRun()

Returns whether the current process runs inside the Composer or PHPUnit test runtime.

 : bool
isEnabled()

Returns whether a truthy environment flag is enabled.

 : bool
isGithubActions()

Returns whether the current process runs in GitHub Actions.

 : bool
Methods

isAgentPresent()

Public

Returns whether the current process exposes known AI-agent environment markers.

public isAgentPresent() : bool
Return values
bool

isCi()

Public

Returns whether the current process runs in a CI environment.

public isCi() : bool
Return values
bool

isComposerTestRun()

Public

Returns whether the current process runs inside the Composer or PHPUnit test runtime.

public isComposerTestRun() : bool
Return values
bool

isEnabled()

Public

Returns whether a truthy environment flag is enabled.

public isEnabled( string  $name) : bool
Parameters
$name : string

Description

the environment variable name

Return values
bool

Description

true when the environment variable is enabled

isGithubActions()

Public

Returns whether the current process runs in GitHub Actions.

public isGithubActions() : bool
Return values
bool