Skip to content

[Enhancement] Use string|int or even UriInterface for client Factory #2

@Gounlaf

Description

@Gounlaf

Hi @mcustiel,

I'm doing transition from v1 to v2.
IMO, this method should be a bit refactored:

public function createPhiremockClient(Host $host, Port $port): Phiremock

As a user of your library, why I should now that you have classes Host & Port?
The two below should be better

/** @param string|int $port */
public function createPhiremockClient(string $host, $port): Phiremock

or even

public function createPhiremockClient(Psr\Http\Message\UriInterface $uri): Phiremock

Regards,

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions