Skip to content

Commit

Permalink
More narrowly define the string types for the transport option.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChadSikorra committed Oct 13, 2024
1 parent 6b65991 commit 1bf2b2c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/FreeDSx/Ldap/ClientOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ final class ClientOptions

private int $port = 389;

/**
* @var 'tcp'|'udp'|'unix'
*/
private string $transport = 'tcp';

private ?string $baseDn = null;
Expand Down Expand Up @@ -127,6 +130,9 @@ public function getTransport(): string
return $this->transport;
}

/**
* @param 'tcp'|'udp'|'unix' $transport
*/
public function setTransport(string $transport): self
{
$this->transport = $transport;
Expand Down
6 changes: 6 additions & 0 deletions src/FreeDSx/Ldap/ServerOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ final class ServerOptions

private string $unixSocket = '/var/run/ldap.socket';

/**
* @var 'tcp'|'udp'|'unix'
*/
private string $transport = 'tcp';

private int $idleTimeout = 600;
Expand Down Expand Up @@ -105,6 +108,9 @@ public function getTransport(): string
return $this->transport;
}

/**
* @param 'tcp'|'udp'|'unix' $transport
*/
public function setTransport(string $transport): self
{
$this->transport = $transport;
Expand Down

0 comments on commit 1bf2b2c

Please sign in to comment.