[ 'code' => 'modify(getString()); $b = $dateTimeImmutable->modify(getString()); ', 'assertions' => [ '$a' => 'DateTime|false', '$b' => 'DateTimeImmutable|false', ], ], 'modifyWithValidConstant' => [ 'code' => 'modify(getString()); $b = $dateTimeImmutable->modify(getString()); ', 'assertions' => [ '$a' => 'DateTime&static', '$b' => 'DateTimeImmutable&static', ], ], 'modifyWithInvalidConstant' => [ 'code' => 'modify(getString()); $b = $dateTimeImmutable->modify(getString()); ', 'assertions' => [ '$a' => 'false', '$b' => 'false', ], ], 'modifyWithBothConstant' => [ 'code' => 'modify(getString()); $b = $dateTimeImmutable->modify(getString()); ', 'assertions' => [ '$a' => 'DateTime|false', '$b' => 'DateTimeImmutable|false', ], ], 'modifyStaticReturn' => [ 'code' => 'modify("+7 days"); ', 'assertions' => [ '$mod' => 'Subclass&static', ], ], ]; } }