Skip to content

Commit

Permalink
Merge branch 'php-8.0/generic-scopeindent-support-match' of https://g…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Mar 5, 2021
2 parents 1106d65 + 19b401a commit ed08850
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 2 deletions.
27 changes: 27 additions & 0 deletions src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,33 @@ class Foo
}
}

$value = match ($value) {
'' => null,
false => false,
1, 2, 3 => true,
default => $value,
};

$value = match ($value) {
'' => null,
false => false,
1, 2, 3 => true,
default => $value,
};

$value = match (
$value
) {
'' => null,
false
=> false,
1,
2,
3 => true,
default =>
$value,
};

/* ADD NEW TESTS ABOVE THIS LINE AND MAKE SURE THAT THE 1 (space-based) AND 2 (tab-based) FILES ARE IN SYNC! */
?>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,33 @@ class Foo
}
}

$value = match ($value) {
'' => null,
false => false,
1, 2, 3 => true,
default => $value,
};

$value = match ($value) {
'' => null,
false => false,
1, 2, 3 => true,
default => $value,
};

$value = match (
$value
) {
'' => null,
false
=> false,
1,
2,
3 => true,
default =>
$value,
};

/* ADD NEW TESTS ABOVE THIS LINE AND MAKE SURE THAT THE 1 (space-based) AND 2 (tab-based) FILES ARE IN SYNC! */
?>

Expand Down
27 changes: 27 additions & 0 deletions src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,33 @@ class Foo
}
}

$value = match ($value) {
'' => null,
false => false,
1, 2, 3 => true,
default => $value,
};

$value = match ($value) {
'' => null,
false => false,
1, 2, 3 => true,
default => $value,
};

$value = match (
$value
) {
'' => null,
false
=> false,
1,
2,
3 => true,
default =>
$value,
};

/* ADD NEW TESTS ABOVE THIS LINE AND MAKE SURE THAT THE 1 (space-based) AND 2 (tab-based) FILES ARE IN SYNC! */
?>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,33 @@ class Foo
}
}

$value = match ($value) {
'' => null,
false => false,
1, 2, 3 => true,
default => $value,
};

$value = match ($value) {
'' => null,
false => false,
1, 2, 3 => true,
default => $value,
};

$value = match (
$value
) {
'' => null,
false
=> false,
1,
2,
3 => true,
default =>
$value,
};

/* ADD NEW TESTS ABOVE THIS LINE AND MAKE SURE THAT THE 1 (space-based) AND 2 (tab-based) FILES ARE IN SYNC! */
?>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,14 @@ public function getErrorList($testFile='ScopeIndentUnitTest.inc')
1340 => 1,
1342 => 1,
1345 => 1,
1487 => 1,
1488 => 1,
1489 => 1,
1490 => 1,
1500 => 1,
1503 => 1,
1514 => 1,
1515 => 1,
1516 => 1,
1517 => 1,
];

}//end getErrorList()
Expand Down

0 comments on commit ed08850

Please sign in to comment.