Skip to content

Commit

Permalink
Closure::__invoke() does not have any parameters in PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
kukulich authored and DmitryTronin committed Nov 30, 2021
1 parent 5ef8b38 commit ec24a9a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
3 changes: 1 addition & 2 deletions Core/Core_c.php
Expand Up @@ -634,11 +634,10 @@ private function __construct() {}
/**
* This is for consistency with other classes that implement calling magic,
* as this method is not used for calling the function.
* @param mixed ...$_ [optional]
* @return mixed
* @link https://secure.php.net/manual/en/class.closure.php
*/
public function __invoke(...$_) {}
public function __invoke() {}

/**
* Duplicates the closure with a new bound object and class scope
Expand Down
16 changes: 0 additions & 16 deletions tests/TestData/mutedProblems.json
Expand Up @@ -2935,22 +2935,6 @@
}
]
},
{
"name": "Closure",
"methods": [
{
"name": "__invoke",
"problems": [
{
"description": "parameter mismatch",
"versions": [
"ALL"
]
}
]
}
]
},
{
"name": "SyncEvent",
"methods": [
Expand Down

0 comments on commit ec24a9a

Please sign in to comment.