Skip to content

PHPStan level 9 failure #29

Closed
Closed
@Ndiritu

Description

@Ndiritu

PHP version: 7.4

Description
Running PHPStan level 9 checks on this library fails with

 ------ -----------------------------------------------------------------------------------------------
  Line   FulfilledPromise.php
 ------ -----------------------------------------------------------------------------------------------
  58     Method Http\Promise\FulfilledPromise::wait() should return T but return statement is missing.
 ------ -----------------------------------------------------------------------------------------------

 ------ ----------------------------------------------------------------------------------------------
  Line   RejectedPromise.php
 ------ ----------------------------------------------------------------------------------------------
  55     Method Http\Promise\RejectedPromise::wait() should return T but return statement is missing.
 ------ ----------------------------------------------------------------------------------------------


 [ERROR] Found 2 errors

How to reproduce
phpstan analyze --level 9 src/

Possible Solution
Expand return type of wait() to accommodate void and null return types

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions