Skip to content

Commit

Permalink
Specify nullable type
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed May 24, 2022
1 parent b1a02c6 commit 8dd33b3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Removed `egeloen/http-adapter` as suggested package since the project is abandoned by @franmomu [#2069](https://github.com/ruflin/Elastica/pull/2069)
* Removed `0` as valid request data using Analyze API by @franmomu [#2068](https://github.com/ruflin/Elastica/pull/2068)
### Fixed
* Fixed some PHPDoc types adding `null` as possible value by @franmomu [#2070](https://github.com/ruflin/Elastica/pull/2070)
### Security

## [7.1.5](https://github.com/ruflin/Elastica/compare/7.1.5...7.1.4)
Expand Down
4 changes: 2 additions & 2 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,15 +341,15 @@ public static function create($params = [])
}

/**
* @return string User
* @return string|null User
*/
public function getUsername()
{
return $this->hasParam('username') ? $this->getParam('username') : null;
}

/**
* @return string Password
* @return string|null Password
*/
public function getPassword()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Query/AbstractGeoDistance.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ abstract class AbstractGeoDistance extends AbstractQuery
/**
* Latitude.
*
* @var float
* @var float|null
*/
protected $_latitude;

/**
* Longitude.
*
* @var float
* @var float|null
*/
protected $_longitude;

Expand Down
2 changes: 1 addition & 1 deletion src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Request extends Param
public const NDJSON_CONTENT_TYPE = 'application/x-ndjson';

/**
* @var Connection
* @var Connection|null
*/
protected $_connection;

Expand Down
2 changes: 1 addition & 1 deletion src/Transport/NullTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class NullTransport extends AbstractTransport
/**
* Response you want to get from the transport.
*
* @var Response Response
* @var Response|null Response
*/
protected $_response;

Expand Down

0 comments on commit 8dd33b3

Please sign in to comment.