Skip to content

Commit

Permalink
fix: make implicitly nullable parameters explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
LenaDooms committed Dec 16, 2024
1 parent 09da53b commit 0c089de
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions lib/Api/DevCycleClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ class DevCycleClient
public function __construct(
string $sdkKey,
DevCycleOptions $dvcOptions,
HTTPConfiguration $config = null,
ClientInterface $client = null,
HeaderSelector $selector = null,
?HTTPConfiguration $config = null,
?ClientInterface $client = null,
?HeaderSelector $selector = null,
)
{
if ($sdkKey === '') {
Expand Down
2 changes: 1 addition & 1 deletion lib/ApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ApiException extends Exception
* @param string[]|null $responseHeaders HTTP response header
* @param string|stdClass|null $responseBody HTTP decoded body of the server response either as \stdClass or string
*/
public function __construct(string $message = "", int $code = 0, $responseHeaders = [], string|stdClass $responseBody = null)
public function __construct(string $message = "", int $code = 0, $responseHeaders = [], string|stdClass|null $responseBody = null)
{
parent::__construct($message, $code);
$this->responseHeaders = $responseHeaders;
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/DevCycleEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ public function getModelName(): string
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->container['type'] = $data['type'] ?? null;
$this->container['target'] = $data['target'] ?? null;
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/DevCycleOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DevCycleOptions
* @param string|null $bucketingApiHostname
* @param string|null $unixSocketPath
*/
public function __construct(bool $enableEdgeDB = false, string $bucketingApiHostname = null, ?string $unixSocketPath = null, array $httpOptions = [])
public function __construct(bool $enableEdgeDB = false, ?string $bucketingApiHostname = null, ?string $unixSocketPath = null, array $httpOptions = [])
{
$this->enableEdgeDB = $enableEdgeDB;
if ($bucketingApiHostname !== null) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/DevCycleUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ public function getSdkTypeAllowableValues(): array
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->container['user_id'] = $data['user_id'] ?? null;
$this->container['email'] = $data['email'] ?? null;
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/DevCycleUserAndEventsBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ public function getModelName(): string
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->container['events'] = $data['events'] ?? null;
$this->container['user'] = $data['user'] ?? null;
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/ErrorResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ public function getModelName(): string
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->container['message'] = $data['message'] ?? null;
$this->container['data'] = $data['data'] ?? null;
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/Feature.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ public function getTypeAllowableValues(): array
/**
* Constructor
*
* @param array[] $data Associated array of property values
* @param array[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->container['_id'] = $data['_id'] ?? null;
$this->container['key'] = $data['key'] ?? null;
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/InlineResponse201.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ public function getModelName(): string
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->container['message'] = $data['message'] ?? null;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/Variable.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ public function getTypeAllowableValues(): array
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* @param mixed[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
$this->container['_id'] = $data['_id'] ?? null;
$this->container['key'] = $data['key'] ?? null;
Expand Down
4 changes: 2 additions & 2 deletions lib/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ObjectSerializer
* @param string|null $format the format of the OpenAPITools type of the data
*
*/
public static function sanitizeForSerialization(mixed $data, string $type = null, string $format = null): mixed
public static function sanitizeForSerialization(mixed $data, ?string $type = null, ?string $format = null): mixed
{
if (is_scalar($data) || null === $data) {
return $data;
Expand Down Expand Up @@ -186,7 +186,7 @@ public static function serializeCollection(array $collection, string $style, boo
* @param null $httpHeaders HTTP headers
* @return object|array|null a single or an array of $class instances
*/
public static function deserialize(mixed $data, string $class, $httpHeaders = null)
public static function deserialize(mixed $data, string $class, ?$httpHeaders = null)
{
if (null === $data) {
return null;
Expand Down

0 comments on commit 0c089de

Please sign in to comment.