Skip to content

ReflectionClass::getStaticProperties doesn't need null return type #10259

Closed
@othercorey

Description

@othercorey

Description

The following code:

<?php
$r = new ReflectionMethod('ReflectionClass::getStaticProperties');
echo (string)$r->getTentativeReturnType();

Resulted in this output:

?array

But I expected this output instead:

array

Looks like the return paths were changed to RETURN_THROWS() in 8664ff7 and 8176059 but the stub wasn't updated.

Usually, after these cleanups, the stub is correct but the docs are outdated, however this seems to be the wrong stub.

I'm not sure how to update the stub and generated code from it.

PHP Version

8.1.14

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions