Skip to content

Commit

Permalink
add common phpunit $_SERVER values bool
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Oct 10, 2022
1 parent b424de9 commit b5f6da7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,9 @@ public static function getGlobalType(string $var_id, int $codebase_analysis_php_
$request_time_float_helper = Type::getFloat();
$request_time_float_helper->possibly_undefined = true;

$bool_helper = Type::getBool();
$bool_helper->possibly_undefined = true;

$detailed_type = new TKeyedArray([
// https://www.php.net/manual/en/reserved.variables.server.php
'PHP_SELF' => $non_empty_string_helper,
Expand Down Expand Up @@ -719,6 +722,9 @@ public static function getGlobalType(string $var_id, int $codebase_analysis_php_
'HTTP_SEC_CH_UA_PLATFORM' => $non_empty_string_helper,
'HTTP_SEC_CH_UA_MOBILE' => $non_empty_string_helper,
'HTTP_SEC_CH_UA' => $non_empty_string_helper,
// phpunit
'APP_DEBUG' => $bool_helper,
'APP_ENV' => $string_helper,
]);

// generic case for all other elements
Expand Down

0 comments on commit b5f6da7

Please sign in to comment.