Skip to content

Commit

Permalink
Allow-int-in-EndpointIdentifier-version
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Beranek committed May 14, 2024
1 parent f37afb6 commit d5c21a2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/EndpointIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ class EndpointIdentifier implements EndpointInterface

private $apiAction;

public function __construct(string $method, string|int $version, string $package, ?string $apiAction = null)
/**
* @param string $method example: "GET", "POST", "PUT", "DELETE"
* @param string|int $version Version must have semantic numbering. For example "1", "1.1", "0.13.2" etc.
* @param string $package example: "users"
* @param string|null $apiAction example: "query"
*/
public function __construct(string $method, $version, string $package, ?string $apiAction = null)
{
$version = (string) $version;
$this->method = strtoupper($method);
Expand Down

0 comments on commit d5c21a2

Please sign in to comment.