Skip to content

Commit

Permalink
fix mixed test not actually checking mixed (since superglobals have a…
Browse files Browse the repository at this point in the history
… more specific type now)
  • Loading branch information
kkmuffme committed Jan 15, 2024
1 parent 2414070 commit 5643cf5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/TypeReconciliation/ConditionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1168,11 +1168,19 @@ function Foo($width, $height) : void {
],
'notEmptyCheckOnMixedInTernary' => [
'code' => '<?php
$a = !empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] !== "off" ? true : false;',
/** @psalm-suppress InvalidReturnType */
function foo(): array {}
$b = foo();
$a = !empty($b["hello"]) && $b["hello"] !== "off" ? true : false;',
],
'notEmptyCheckOnMixedInIf' => [
'code' => '<?php
if (!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] !== "off") {
/** @psalm-suppress InvalidReturnType */
function foo(): array {}
$b = foo();
if (!empty($b["hello"]) && $b["hello"] !== "off") {
$a = true;
} else {
$a = false;
Expand Down

0 comments on commit 5643cf5

Please sign in to comment.