[ 'code' => ' [ 'code' => ' [], 'ignored_issues' => [], 'php_version' => '8.0', ]; yield 'Iterating over \DatePeriod (#5954) PHP7 Traversable' => [ 'code' => 'format("Y-m-d"); }', 'assertions' => [ '$period' => 'DatePeriod', '$dt' => 'DateTimeInterface|null', ], 'ignored_issues' => [], 'php_version' => '7.3', ]; yield 'Iterating over \DatePeriod (#5954) PHP8 IteratorAggregate' => [ 'code' => 'format("Y-m-d"); }', 'assertions' => [ '$period' => 'DatePeriod', '$dt' => 'DateTimeImmutable|null', ], 'ignored_issues' => [], 'php_version' => '8.0', ]; yield 'Iterating over \DatePeriod (#5954), ISO string' => [ 'code' => 'format("Y-m-d"); }', 'assertions' => [ '$period' => 'DatePeriod', '$dt' => 'DateTime|null', ], 'ignored_issues' => [], 'php_version' => '8.0', ]; yield 'DatePeriod implements only Traversable on PHP 7' => [ 'code' => ' [], 'ignored_issues' => [], 'php_version' => '7.3', ]; yield 'DatePeriod implements IteratorAggregate on PHP 8' => [ 'code' => ' [], 'ignored_issues' => ['RedundantCondition'], 'php_version' => '8.0', ]; yield 'sprintf yields a non-empty-string for non-empty-string value' => [ 'code' => ' [ 'code' => ' [ '$a===' => 'string', ], ]; yield 'json_encode returns a non-empty-string provided JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE' => [ 'code' => ' [ '$a===' => 'non-empty-string', ], ]; yield 'json_encode returns a non-empty-string with JSON_THROW_ON_ERROR' => [ 'code' => ' [ '$a===' => 'non-empty-string', '$b===' => 'non-empty-string', '$c===' => 'non-empty-string', '$d===' => 'non-empty-string', '$e===' => 'false|non-empty-string', '$f===' => 'false|non-empty-string', ], ]; yield 'str_starts_with/str_ends_with/str_contains redundant condition detection' => [ 'code' => ' [ '$a1===' => 'true', '$b1===' => 'false', '$c1===' => 'bool', '$a2===' => 'true', '$b2===' => 'false', '$c2===' => 'bool', '$a3===' => 'true', '$b3===' => 'false', '$c3===' => 'bool', ], ]; yield 'PHP8 str_* function assert non-empty-string' => [ 'code' => ' [ '$a===' => 'non-empty-string', '$b===' => 'non-empty-string', '$c===' => 'non-empty-string', '$d===' => 'non-empty-string', '$e===' => 'non-empty-string', ], ]; yield "PHP8 str_* function doesn't subtract string after assertion" => [ 'code' => ' [ '$a===' => 'false|string', '$b===' => 'false|string', '$c===' => 'false|string', ], ]; yield "str_contains doesn't yield InvalidLiteralArgument for __DIR__" => [ 'code' => ' [ 'code' => ' 'InvalidArgument', ]; yield 'json_encode invalid depth' => [ 'code' => ' 'InvalidArgument', ]; yield 'str_contains literal haystack' => [ 'code' => ' 'InvalidLiteralArgument', ]; yield 'str_starts_with literal haystack' => [ 'code' => ' 'InvalidLiteralArgument', ]; yield 'str_ends_with literal haystack' => [ 'code' => ' 'InvalidLiteralArgument', ]; } }