Skip to content

Type hinting incoherence for exceptions #22

@soullivaneuh

Description

@soullivaneuh
Q A
Bug? no
New Feature? no
Version v1.0.1

On the exceptions property:

/**
* @var Exception[]
*/
private $exceptions = [];

The type hinting corresponds to Http\Client\Exception

But on the adder:

/**
* Adds an exception that will be thrown.
*
* @param \Exception $exception
*/
public function addException(\Exception $exception)
{
$this->exceptions[] = $exception;
}

It corresponds to \Exception.

AFAIK, it makes no sense. Which one should be choose?

I may add a PR after getting #21 merged.

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