mirror of
https://github.com/pestphp/pest.git
synced 2026-09-05 14:23:34 +02:00
25 lines
373 B
PHP
25 lines
373 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pest\Plugins\Tia\Cis\Concerns;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
trait ReadsEnvironment
|
|
{
|
|
private function environment(string $name): ?string
|
|
{
|
|
$value = getenv($name);
|
|
|
|
if (! is_string($value)) {
|
|
return null;
|
|
}
|
|
|
|
$value = trim($value);
|
|
|
|
return $value === '' ? null : $value;
|
|
}
|
|
}
|