Skip to content

Commit

Permalink
Fix compatibility by removing type constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Mar 24, 2024
1 parent 1f23dd2 commit a5d4d21
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/php/com/mongodb/AuthenticationFailed.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class AuthenticationFailed extends CannotConnect {
private $user, $secret;

public function __construct(string $message, string $user, Secret $secret, Throwable $cause= null) {
public function __construct(string $message, string $user, Secret $secret, $cause= null) {
parent::__construct(18, 'AuthenticationFailed', $message, $cause);
$this->user= $user;
$this->secret= $secret;
Expand Down
2 changes: 1 addition & 1 deletion src/main/php/com/mongodb/NoSuitableCandidate.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class NoSuitableCandidate extends CannotConnect {
private $candidates;

public function __construct(string $intent, array $candidates, Throwable $cause= null) {
public function __construct(string $intent, array $candidates, $cause= null) {
parent::__construct(
6,
'HostUnreachable',
Expand Down
6 changes: 4 additions & 2 deletions src/main/php/com/mongodb/ObjectId.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ public function __construct($string) {
* - a 5-byte random value
* - a 3-byte incrementing counter, initialized to a random value
*
* @see https://docs.mongodb.com/manual/reference/method/ObjectId/
* @param ?int $timestamp
* @return self
* @see https://docs.mongodb.com/manual/reference/method/ObjectId/
*/
public static function create(int $timestamp= null): self {
public static function create($timestamp= null): self {
$uint32= self::$counter > 4294967294 ? self::$counter= 0 : ++self::$counter;
return new self(bin2hex(pack(
'Na5aaa',
Expand Down

0 comments on commit a5d4d21

Please sign in to comment.