Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** |
| 6 | * Fast Forward Development Tools for PHP projects. |
| 7 | * |
| 8 | * This file is part of fast-forward/dev-tools project. |
| 9 | * |
| 10 | * @author Felipe Sayão Lobato Abreu <github@mentordosnerds.com> |
| 11 | * @license https://opensource.org/licenses/MIT MIT License |
| 12 | * |
| 13 | * @see https://github.com/php-fast-forward/ |
| 14 | * @see https://github.com/php-fast-forward/dev-tools |
| 15 | * @see https://github.com/php-fast-forward/dev-tools/issues |
| 16 | * @see https://php-fast-forward.github.io/dev-tools/ |
| 17 | * @see https://datatracker.ietf.org/doc/html/rfc2119 |
| 18 | */ |
| 19 | |
| 20 | namespace FastForward\DevTools\Environment; |
| 21 | |
| 22 | /** |
| 23 | * Answers common runtime-environment questions from process environment flags. |
| 24 | */ |
| 25 | interface RuntimeEnvironmentInterface |
| 26 | { |
| 27 | /** |
| 28 | * Returns whether a truthy environment flag is enabled. |
| 29 | * |
| 30 | * @param string $name the environment variable name |
| 31 | * |
| 32 | * @return bool true when the environment variable is enabled |
| 33 | */ |
| 34 | public function isEnabled(string $name): bool; |
| 35 | |
| 36 | /** |
| 37 | * Returns whether the current process runs in GitHub Actions. |
| 38 | */ |
| 39 | public function isGithubActions(): bool; |
| 40 | |
| 41 | /** |
| 42 | * Returns whether the current process runs in a CI environment. |
| 43 | */ |
| 44 | public function isCi(): bool; |
| 45 | |
| 46 | /** |
| 47 | * Returns whether the current process runs inside the Composer or PHPUnit test runtime. |
| 48 | */ |
| 49 | public function isComposerTestRun(): bool; |
| 50 | |
| 51 | /** |
| 52 | * Returns whether the current process exposes known AI-agent environment markers. |
| 53 | */ |
| 54 | public function isAgentPresent(): bool; |
| 55 | } |