Skip to content

Commit

Permalink
Make ReflectionMethod->getClosure() always return Closure for newer v…
Browse files Browse the repository at this point in the history
…ersion of PHP
  • Loading branch information
lisachenko authored and isfedorov committed Apr 2, 2024
1 parent b0e6812 commit af5c627
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Reflection/ReflectionMethod.php
Expand Up @@ -189,8 +189,10 @@ public function isDestructor(): bool {}
* Returns a dynamically created closure for the method
*
* @link https://php.net/manual/en/reflectionmethod.getclosure.php
* @param object $object Forbidden for static methods, required for other methods or nothing.
* @return Closure|null Returns {@see Closure} or {@see null} in case of an error.
* @param object|null $object Forbidden for static methods, required for other methods or nothing.
* @return Closure Returns the newly created {@see Closure}.
* @throws ValueError if object is null but the method is non-static.
* @throws ReflectionException if object is not an instance of the class this method was declared in.
* @since 5.4
*/
#[Pure]
Expand Down

0 comments on commit af5c627

Please sign in to comment.