Skip to content

Commit

Permalink
QA: Use nullable types
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Mar 25, 2024
1 parent 21316fa commit c31f11b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/main/php/util/Authority.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ static function __static() {
* Creates a new authority
*
* @param string $host
* @param int $port
* @param string $user
* @param string|util.Secret $password
* @param ?int $port
* @param ?string $user
* @param ?string|util.Secret $password
*/
public function __construct($host, $port= null, $user= null, $password= null) {
$this->host= $host;
Expand Down Expand Up @@ -67,13 +67,13 @@ public static function parse($input) {
/** @return string */
public function host() { return $this->host; }

/** @return int */
/** @return ?int */
public function port() { return $this->port; }

/** @return string */
/** @return ?string */
public function user() { return $this->user; }

/** @return util.Secret */
/** @return ?util.Secret */
public function password() { return $this->password; }

/**
Expand Down
8 changes: 4 additions & 4 deletions src/main/php/util/URI.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,16 @@ public function scheme() { return $this->scheme; }
/** @return util.Authority */
public function authority() { return $this->authority; }

/** @return string */
/** @return ?string */
public function host() { return $this->authority ? $this->authority->host() : null; }

/** @return int */
/** @return ?int */
public function port() { return $this->authority ? $this->authority->port() : null; }

/** @return string */
/** @return ?string */
public function user() { return $this->authority ? $this->authority->user() : null; }

/** @return util.Secret */
/** @return ?util.Secret */
public function password() { return $this->authority ? $this->authority->password() : null; }

/**
Expand Down

0 comments on commit c31f11b

Please sign in to comment.