Skip to content

Commit

Permalink
fix default value for \round
Browse files Browse the repository at this point in the history
  • Loading branch information
isfedorov committed Aug 29, 2024
1 parent abc2932 commit 2b7bdea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion standard/standard_3.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function floor(int|float $num) {}
* @return float The rounded value
*/
#[Pure]
function round(int|float $num, int $precision = 0, #[LanguageLevelTypeAware(['8.4' => 'RoundingMode|int'], default: 'int')] $mode = RoundingMode::HalfAwayFromZero): float {}
function round(int|float $num, int $precision = 0, #[LanguageLevelTypeAware(['8.4' => 'RoundingMode|int'], default: 'int')] $mode = 0): float {}

/**
* Sine
Expand Down
14 changes: 14 additions & 0 deletions tests/TestData/mutedProblems.json
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,20 @@
}
],
"functions": [
{
"name": "round",
"parameters": [
{
"name": "mode",
"problems": [
{
"description": "wrong default value",
"versions": [8.4]
}
]
}
]
},
{
"name": "each",
"problems": [
Expand Down

0 comments on commit 2b7bdea

Please sign in to comment.