From cfbaee135fa08a767528c63f8aeef8f76aa6f0bf Mon Sep 17 00:00:00 2001 From: Dan0sz <18595395+Dan0sz@users.noreply.github.com> Date: Wed, 3 Dec 2025 16:54:23 +0100 Subject: [PATCH] Fixed: Implicitly marking parameter $match as nullable is deprecated, the explicit nullable type must be used instead for 84 files. --- src/Client/lib/Api/DefaultApi.php | 6 +++--- src/Client/lib/Configuration.php | 2 +- src/Client/lib/Lib/GuzzleHttp/BodySummarizer.php | 2 +- src/Client/lib/Lib/GuzzleHttp/Client.php | 2 +- src/Client/lib/Lib/GuzzleHttp/ClientInterface.php | 2 +- src/Client/lib/Lib/GuzzleHttp/Cookie/CookieJar.php | 2 +- .../lib/Lib/GuzzleHttp/Cookie/CookieJarInterface.php | 2 +- .../Lib/GuzzleHttp/Exception/BadResponseException.php | 2 +- .../lib/Lib/GuzzleHttp/Exception/ConnectException.php | 2 +- .../lib/Lib/GuzzleHttp/Exception/RequestException.php | 10 +++++----- src/Client/lib/Lib/GuzzleHttp/Handler/MockHandler.php | 6 +++--- .../lib/Lib/GuzzleHttp/Handler/StreamHandler.php | 4 ++-- src/Client/lib/Lib/GuzzleHttp/HandlerStack.php | 6 +++--- src/Client/lib/Lib/GuzzleHttp/MessageFormatter.php | 2 +- .../lib/Lib/GuzzleHttp/MessageFormatterInterface.php | 2 +- src/Client/lib/Lib/GuzzleHttp/Middleware.php | 6 +++--- src/Client/lib/Lib/GuzzleHttp/Promise/Coroutine.php | 4 ++-- src/Client/lib/Lib/GuzzleHttp/Promise/Each.php | 10 +++++----- .../lib/Lib/GuzzleHttp/Promise/FulfilledPromise.php | 4 ++-- src/Client/lib/Lib/GuzzleHttp/Promise/Promise.php | 8 ++++---- .../lib/Lib/GuzzleHttp/Promise/PromiseInterface.php | 4 ++-- .../lib/Lib/GuzzleHttp/Promise/RejectedPromise.php | 4 ++-- src/Client/lib/Lib/GuzzleHttp/Promise/Utils.php | 2 +- src/Client/lib/Lib/GuzzleHttp/Psr7/CachingStream.php | 2 +- src/Client/lib/Lib/GuzzleHttp/Psr7/HttpFactory.php | 6 +++--- src/Client/lib/Lib/GuzzleHttp/Psr7/MultipartStream.php | 2 +- src/Client/lib/Lib/GuzzleHttp/Psr7/Response.php | 2 +- src/Client/lib/Lib/GuzzleHttp/Psr7/StreamWrapper.php | 2 +- src/Client/lib/Lib/GuzzleHttp/Psr7/UploadedFile.php | 4 ++-- src/Client/lib/Lib/GuzzleHttp/Psr7/Uri.php | 2 +- src/Client/lib/Lib/GuzzleHttp/Psr7/Utils.php | 2 +- src/Client/lib/Lib/GuzzleHttp/RetryMiddleware.php | 4 ++-- src/Client/lib/Lib/GuzzleHttp/TransferStats.php | 4 ++-- .../Psr/Http/Message/UploadedFileFactoryInterface.php | 6 +++--- src/Client/lib/Model/Capabilities.php | 2 +- src/Client/lib/Model/CapabilitiesFeatures.php | 2 +- src/Client/lib/Model/CustomProp.php | 2 +- src/Client/lib/Model/CustomPropCustomProp.php | 2 +- src/Client/lib/Model/CustomPropDisableRequest.php | 2 +- .../lib/Model/CustomPropDisableRequestBulkDisable.php | 2 +- src/Client/lib/Model/CustomPropEnableRequest.php | 2 +- .../lib/Model/CustomPropEnableRequestBulkEnable.php | 2 +- src/Client/lib/Model/CustomPropListResponse.php | 2 +- src/Client/lib/Model/Error.php | 2 +- src/Client/lib/Model/Funnel.php | 2 +- src/Client/lib/Model/FunnelCreateRequest.php | 2 +- src/Client/lib/Model/FunnelCreateRequestFunnel.php | 2 +- .../lib/Model/FunnelCreateRequestFunnelStepsInner.php | 2 +- src/Client/lib/Model/FunnelFunnel.php | 2 +- src/Client/lib/Model/FunnelListResponse.php | 2 +- src/Client/lib/Model/FunnelListResponseMeta.php | 2 +- src/Client/lib/Model/Goal.php | 2 +- src/Client/lib/Model/GoalCreateRequest.php | 2 +- .../lib/Model/GoalCreateRequestBulkGetOrCreate.php | 2 +- .../GoalCreateRequestBulkGetOrCreateGoalsInner.php | 2 +- src/Client/lib/Model/GoalCreateRequestCustomEvent.php | 2 +- .../lib/Model/GoalCreateRequestCustomEventGoal.php | 2 +- src/Client/lib/Model/GoalCreateRequestPageview.php | 2 +- src/Client/lib/Model/GoalCreateRequestPageviewGoal.php | 2 +- src/Client/lib/Model/GoalCreateRequestRevenue.php | 2 +- src/Client/lib/Model/GoalCreateRequestRevenueGoal.php | 2 +- src/Client/lib/Model/GoalCustomEvent.php | 2 +- src/Client/lib/Model/GoalCustomEventAllOfGoal.php | 2 +- src/Client/lib/Model/GoalDeleteBulkRequest.php | 2 +- src/Client/lib/Model/GoalListResponse.php | 2 +- src/Client/lib/Model/GoalListResponseMeta.php | 2 +- src/Client/lib/Model/GoalPageview.php | 2 +- src/Client/lib/Model/GoalPageviewAllOfGoal.php | 2 +- src/Client/lib/Model/GoalRevenue.php | 2 +- src/Client/lib/Model/GoalRevenueAllOfGoal.php | 2 +- src/Client/lib/Model/GoalType.php | 2 +- src/Client/lib/Model/Link.php | 2 +- src/Client/lib/Model/NotFoundError.php | 2 +- src/Client/lib/Model/PaginationMetadata.php | 2 +- src/Client/lib/Model/PaginationMetadataLinks.php | 2 +- src/Client/lib/Model/PaymentRequiredError.php | 2 +- ...eWebPluginsAPIControllersGoalsCreate201Response.php | 2 +- src/Client/lib/Model/SharedLink.php | 2 +- src/Client/lib/Model/SharedLinkCreateRequest.php | 2 +- .../lib/Model/SharedLinkCreateRequestSharedLink.php | 2 +- src/Client/lib/Model/SharedLinkListResponse.php | 2 +- src/Client/lib/Model/SharedLinkSharedLink.php | 2 +- src/Client/lib/Model/UnauthorizedError.php | 2 +- src/Client/lib/Model/UnprocessableEntityError.php | 2 +- 84 files changed, 115 insertions(+), 115 deletions(-) diff --git a/src/Client/lib/Api/DefaultApi.php b/src/Client/lib/Api/DefaultApi.php index 5468ae39..47d777ad 100644 --- a/src/Client/lib/Api/DefaultApi.php +++ b/src/Client/lib/Api/DefaultApi.php @@ -121,9 +121,9 @@ class DefaultApi { * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/src/Client/lib/Configuration.php b/src/Client/lib/Configuration.php index fa84b7ba..033efb18 100644 --- a/src/Client/lib/Configuration.php +++ b/src/Client/lib/Configuration.php @@ -467,7 +467,7 @@ public function getHostFromSettings( $index, $variables = null ) { * * @return string URL based on host settings */ - public static function getHostString( array $hostsSettings, $hostIndex, array $variables = null ) { + public static function getHostString( array $hostsSettings, $hostIndex, ?array $variables = null ) { if ( null === $variables ) { $variables = []; } diff --git a/src/Client/lib/Lib/GuzzleHttp/BodySummarizer.php b/src/Client/lib/Lib/GuzzleHttp/BodySummarizer.php index a7b39061..e5c4ae89 100644 --- a/src/Client/lib/Lib/GuzzleHttp/BodySummarizer.php +++ b/src/Client/lib/Lib/GuzzleHttp/BodySummarizer.php @@ -11,7 +11,7 @@ final class BodySummarizer implements BodySummarizerInterface */ private $truncateAt; - public function __construct(int $truncateAt = null) + public function __construct(?int $truncateAt = null) { $this->truncateAt = $truncateAt; } diff --git a/src/Client/lib/Lib/GuzzleHttp/Client.php b/src/Client/lib/Lib/GuzzleHttp/Client.php index b3eb513b..2601aa9a 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Client.php +++ b/src/Client/lib/Lib/GuzzleHttp/Client.php @@ -447,7 +447,7 @@ public function sendRequest( RequestInterface $request ): ResponseInterface { * @return mixed * @deprecated Client::getConfig will be removed in Plausible\Analytics\WP\Client\Lib\GuzzleHttp/guzzle:8.0. */ - public function getConfig( string $option = null ) { + public function getConfig( ?string $option = null ) { return $option === null ? $this->config : ( $this->config[ $option ] ?? null ); } } diff --git a/src/Client/lib/Lib/GuzzleHttp/ClientInterface.php b/src/Client/lib/Lib/GuzzleHttp/ClientInterface.php index 1e6b0b98..3d0aa3bc 100644 --- a/src/Client/lib/Lib/GuzzleHttp/ClientInterface.php +++ b/src/Client/lib/Lib/GuzzleHttp/ClientInterface.php @@ -80,5 +80,5 @@ public function requestAsync(string $method, $uri, array $options = []): Promise * * @deprecated ClientInterface::getConfig will be removed in Plausible\Analytics\WP\Client\Lib\GuzzleHttp/guzzle:8.0. */ - public function getConfig(string $option = null); + public function getConfig(?string $option = null); } diff --git a/src/Client/lib/Lib/GuzzleHttp/Cookie/CookieJar.php b/src/Client/lib/Lib/GuzzleHttp/Cookie/CookieJar.php index 73690c26..cbb16e16 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Cookie/CookieJar.php +++ b/src/Client/lib/Lib/GuzzleHttp/Cookie/CookieJar.php @@ -103,7 +103,7 @@ public function toArray(): array }, $this->getIterator()->getArrayCopy()); } - public function clear(string $domain = null, string $path = null, string $name = null): void + public function clear( ?string $domain = null, ?string $path = null, ?string $name = null ): void { if (!$domain) { $this->cookies = []; diff --git a/src/Client/lib/Lib/GuzzleHttp/Cookie/CookieJarInterface.php b/src/Client/lib/Lib/GuzzleHttp/Cookie/CookieJarInterface.php index bd0fe93f..e1061eff 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Cookie/CookieJarInterface.php +++ b/src/Client/lib/Lib/GuzzleHttp/Cookie/CookieJarInterface.php @@ -62,7 +62,7 @@ public function setCookie(SetCookie $cookie): bool; * @param string|null $path Clears cookies matching a domain and path * @param string|null $name Clears cookies matching a domain, path, and name */ - public function clear(string $domain = null, string $path = null, string $name = null): void; + public function clear( ?string $domain = null, ?string $path = null, ?string $name = null ): void; /** * Discard all sessions cookies. diff --git a/src/Client/lib/Lib/GuzzleHttp/Exception/BadResponseException.php b/src/Client/lib/Lib/GuzzleHttp/Exception/BadResponseException.php index 8b197486..884c9c3b 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Exception/BadResponseException.php +++ b/src/Client/lib/Lib/GuzzleHttp/Exception/BadResponseException.php @@ -14,7 +14,7 @@ public function __construct( string $message, RequestInterface $request, ResponseInterface $response, - \Throwable $previous = null, + ?\Throwable $previous = null, array $handlerContext = [] ) { parent::__construct($message, $request, $response, $previous, $handlerContext); diff --git a/src/Client/lib/Lib/GuzzleHttp/Exception/ConnectException.php b/src/Client/lib/Lib/GuzzleHttp/Exception/ConnectException.php index d59a46f0..ee4e99f8 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Exception/ConnectException.php +++ b/src/Client/lib/Lib/GuzzleHttp/Exception/ConnectException.php @@ -25,7 +25,7 @@ class ConnectException extends TransferException implements NetworkExceptionInte public function __construct( string $message, RequestInterface $request, - \Throwable $previous = null, + ?\Throwable $previous = null, array $handlerContext = [] ) { parent::__construct($message, 0, $previous); diff --git a/src/Client/lib/Lib/GuzzleHttp/Exception/RequestException.php b/src/Client/lib/Lib/GuzzleHttp/Exception/RequestException.php index 2410b704..38f4a477 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Exception/RequestException.php +++ b/src/Client/lib/Lib/GuzzleHttp/Exception/RequestException.php @@ -32,8 +32,8 @@ class RequestException extends TransferException implements RequestExceptionInte public function __construct( string $message, RequestInterface $request, - ResponseInterface $response = null, - \Throwable $previous = null, + ?ResponseInterface $response = null, + ?\Throwable $previous = null, array $handlerContext = [] ) { // Set the code of the exception if the response is set and not future. @@ -63,10 +63,10 @@ public static function wrapException(RequestInterface $request, \Throwable $e): */ public static function create( RequestInterface $request, - ResponseInterface $response = null, - \Throwable $previous = null, + ?ResponseInterface $response = null, + ?\Throwable $previous = null, array $handlerContext = [], - BodySummarizerInterface $bodySummarizer = null + ?BodySummarizerInterface $bodySummarizer = null ): self { if (!$response) { return new self( diff --git a/src/Client/lib/Lib/GuzzleHttp/Handler/MockHandler.php b/src/Client/lib/Lib/GuzzleHttp/Handler/MockHandler.php index 674699c4..5cc0fa54 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Handler/MockHandler.php +++ b/src/Client/lib/Lib/GuzzleHttp/Handler/MockHandler.php @@ -52,7 +52,7 @@ class MockHandler implements \Countable * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled. * @param callable|null $onRejected Callback to invoke when the return value is rejected. */ - public static function createWithMiddleware(array $queue = null, callable $onFulfilled = null, callable $onRejected = null): HandlerStack + public static function createWithMiddleware( ?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null ): HandlerStack { return HandlerStack::create(new self($queue, $onFulfilled, $onRejected)); } @@ -66,7 +66,7 @@ public static function createWithMiddleware(array $queue = null, callable $onFul * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled. * @param callable|null $onRejected Callback to invoke when the return value is rejected. */ - public function __construct(array $queue = null, callable $onFulfilled = null, callable $onRejected = null) + public function __construct( ?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null ) { $this->onFulfilled = $onFulfilled; $this->onRejected = $onRejected; @@ -200,7 +200,7 @@ public function reset(): void private function invokeStats( RequestInterface $request, array $options, - ResponseInterface $response = null, + ?ResponseInterface $response = null, $reason = null ): void { if (isset($options['on_stats'])) { diff --git a/src/Client/lib/Lib/GuzzleHttp/Handler/StreamHandler.php b/src/Client/lib/Lib/GuzzleHttp/Handler/StreamHandler.php index 03076099..3ea8b318 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Handler/StreamHandler.php +++ b/src/Client/lib/Lib/GuzzleHttp/Handler/StreamHandler.php @@ -83,8 +83,8 @@ private function invokeStats( array $options, RequestInterface $request, ?float $startTime, - ResponseInterface $response = null, - \Throwable $error = null + ?ResponseInterface $response = null, + ?\Throwable $error = null ): void { if (isset($options['on_stats'])) { $stats = new TransferStats($request, $response, Utils::currentTime() - $startTime, $error, []); diff --git a/src/Client/lib/Lib/GuzzleHttp/HandlerStack.php b/src/Client/lib/Lib/GuzzleHttp/HandlerStack.php index 33c484ac..8a659bc0 100644 --- a/src/Client/lib/Lib/GuzzleHttp/HandlerStack.php +++ b/src/Client/lib/Lib/GuzzleHttp/HandlerStack.php @@ -44,7 +44,7 @@ class HandlerStack * handler is provided, the best handler for your * system will be utilized. */ - public static function create(callable $handler = null): self + public static function create( ?callable $handler = null ): self { $stack = new self($handler ?: Utils::chooseHandler()); $stack->push(Middleware::httpErrors(), 'http_errors'); @@ -58,7 +58,7 @@ public static function create(callable $handler = null): self /** * @param (callable(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler. */ - public function __construct(callable $handler = null) + public function __construct( ?callable $handler = null ) { $this->handler = $handler; } @@ -131,7 +131,7 @@ public function hasHandler(): bool * @param callable(callable): callable $middleware Middleware function * @param string $name Name to register for this middleware. */ - public function unshift(callable $middleware, string $name = null): void + public function unshift( callable $middleware, ?string $name = null ): void { \array_unshift($this->stack, [$middleware, $name]); $this->cached = null; diff --git a/src/Client/lib/Lib/GuzzleHttp/MessageFormatter.php b/src/Client/lib/Lib/GuzzleHttp/MessageFormatter.php index ebfe1304..77ae28bf 100644 --- a/src/Client/lib/Lib/GuzzleHttp/MessageFormatter.php +++ b/src/Client/lib/Lib/GuzzleHttp/MessageFormatter.php @@ -68,7 +68,7 @@ public function __construct(?string $template = self::CLF) * @param ResponseInterface|null $response Response that was received * @param \Throwable|null $error Exception that was received */ - public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string + public function format( RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null ): string { $cache = []; diff --git a/src/Client/lib/Lib/GuzzleHttp/MessageFormatterInterface.php b/src/Client/lib/Lib/GuzzleHttp/MessageFormatterInterface.php index 6d75f01d..412d9dd2 100644 --- a/src/Client/lib/Lib/GuzzleHttp/MessageFormatterInterface.php +++ b/src/Client/lib/Lib/GuzzleHttp/MessageFormatterInterface.php @@ -14,5 +14,5 @@ interface MessageFormatterInterface * @param ResponseInterface|null $response Response that was received * @param \Throwable|null $error Exception that was received */ - public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string; + public function format( RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null ): string; } diff --git a/src/Client/lib/Lib/GuzzleHttp/Middleware.php b/src/Client/lib/Lib/GuzzleHttp/Middleware.php index 2a4aab56..8f1c5cc7 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Middleware.php +++ b/src/Client/lib/Lib/GuzzleHttp/Middleware.php @@ -55,7 +55,7 @@ static function (ResponseInterface $response) use ($cookieJar, $request): Respon * * @return callable(callable): callable Returns a function that accepts the next handler. */ - public static function httpErrors(BodySummarizerInterface $bodySummarizer = null): callable + public static function httpErrors( ?BodySummarizerInterface $bodySummarizer = null ): callable { return static function (callable $handler) use ($bodySummarizer): callable { return static function ($request, array $options) use ($handler, $bodySummarizer) { @@ -132,7 +132,7 @@ static function ($reason) use ($request, &$container, $options) { * * @return callable Returns a function that accepts the next handler. */ - public static function tap(callable $before = null, callable $after = null): callable + public static function tap( ?callable $before = null, ?callable $after = null ): callable { return static function (callable $handler) use ($before, $after): callable { return static function (RequestInterface $request, array $options) use ($handler, $before, $after) { @@ -176,7 +176,7 @@ public static function redirect(): callable * * @return callable Returns a function that accepts the next handler. */ - public static function retry(callable $decider, callable $delay = null): callable + public static function retry( callable $decider, ?callable $delay = null ): callable { return static function (callable $handler) use ($decider, $delay): RetryMiddleware { return new RetryMiddleware($decider, $handler, $delay); diff --git a/src/Client/lib/Lib/GuzzleHttp/Promise/Coroutine.php b/src/Client/lib/Lib/GuzzleHttp/Promise/Coroutine.php index 933ec876..c04cf4d7 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Promise/Coroutine.php +++ b/src/Client/lib/Lib/GuzzleHttp/Promise/Coroutine.php @@ -84,8 +84,8 @@ public static function of(callable $generatorFn): self } public function then( - callable $onFulfilled = null, - callable $onRejected = null + ?callable $onFulfilled = null, + ?callable $onRejected = null ): PromiseInterface { return $this->result->then($onFulfilled, $onRejected); } diff --git a/src/Client/lib/Lib/GuzzleHttp/Promise/Each.php b/src/Client/lib/Lib/GuzzleHttp/Promise/Each.php index 29550fa6..b29d90f2 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Promise/Each.php +++ b/src/Client/lib/Lib/GuzzleHttp/Promise/Each.php @@ -25,8 +25,8 @@ final class Each */ public static function of( $iterable, - callable $onFulfilled = null, - callable $onRejected = null + ?callable $onFulfilled = null, + ?callable $onRejected = null ): PromiseInterface { return (new EachPromise($iterable, [ 'fulfilled' => $onFulfilled, @@ -50,8 +50,8 @@ public static function of( public static function ofLimit( $iterable, $concurrency, - callable $onFulfilled = null, - callable $onRejected = null + ?callable $onFulfilled = null, + ?callable $onRejected = null ): PromiseInterface { return (new EachPromise($iterable, [ 'fulfilled' => $onFulfilled, @@ -72,7 +72,7 @@ public static function ofLimit( public static function ofLimitAll( $iterable, $concurrency, - callable $onFulfilled = null + ?callable $onFulfilled = null ): PromiseInterface { return self::ofLimit( $iterable, diff --git a/src/Client/lib/Lib/GuzzleHttp/Promise/FulfilledPromise.php b/src/Client/lib/Lib/GuzzleHttp/Promise/FulfilledPromise.php index 6ed02187..34ce3707 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Promise/FulfilledPromise.php +++ b/src/Client/lib/Lib/GuzzleHttp/Promise/FulfilledPromise.php @@ -31,8 +31,8 @@ public function __construct($value) } public function then( - callable $onFulfilled = null, - callable $onRejected = null + ?callable $onFulfilled = null, + ?callable $onRejected = null ): PromiseInterface { // Return itself if there is no onFulfilled function. if (!$onFulfilled) { diff --git a/src/Client/lib/Lib/GuzzleHttp/Promise/Promise.php b/src/Client/lib/Lib/GuzzleHttp/Promise/Promise.php index 4e93c932..3442a874 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Promise/Promise.php +++ b/src/Client/lib/Lib/GuzzleHttp/Promise/Promise.php @@ -25,16 +25,16 @@ class Promise implements PromiseInterface * @param callable $cancelFn Fn that when invoked cancels the promise. */ public function __construct( - callable $waitFn = null, - callable $cancelFn = null + ?callable $waitFn = null, + ?callable $cancelFn = null ) { $this->waitFn = $waitFn; $this->cancelFn = $cancelFn; } public function then( - callable $onFulfilled = null, - callable $onRejected = null + ?callable $onFulfilled = null, + ?callable $onRejected = null ): PromiseInterface { if ($this->state === self::PENDING) { $p = new Promise(null, [$this, 'cancel']); diff --git a/src/Client/lib/Lib/GuzzleHttp/Promise/PromiseInterface.php b/src/Client/lib/Lib/GuzzleHttp/Promise/PromiseInterface.php index 6e24bcae..34b5954d 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Promise/PromiseInterface.php +++ b/src/Client/lib/Lib/GuzzleHttp/Promise/PromiseInterface.php @@ -27,8 +27,8 @@ interface PromiseInterface * @param callable $onRejected Invoked when the promise is rejected. */ public function then( - callable $onFulfilled = null, - callable $onRejected = null + ?callable $onFulfilled = null, + ?callable $onRejected = null ): PromiseInterface; /** diff --git a/src/Client/lib/Lib/GuzzleHttp/Promise/RejectedPromise.php b/src/Client/lib/Lib/GuzzleHttp/Promise/RejectedPromise.php index 8fbe9c64..73bee048 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Promise/RejectedPromise.php +++ b/src/Client/lib/Lib/GuzzleHttp/Promise/RejectedPromise.php @@ -31,8 +31,8 @@ public function __construct($reason) } public function then( - callable $onFulfilled = null, - callable $onRejected = null + ?callable $onFulfilled = null, + ?callable $onRejected = null ): PromiseInterface { // If there's no onRejected callback then just return self. if (!$onRejected) { diff --git a/src/Client/lib/Lib/GuzzleHttp/Promise/Utils.php b/src/Client/lib/Lib/GuzzleHttp/Promise/Utils.php index 4b479a6d..6a8a8950 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Promise/Utils.php +++ b/src/Client/lib/Lib/GuzzleHttp/Promise/Utils.php @@ -21,7 +21,7 @@ final class Utils * * @param TaskQueueInterface|null $assign Optionally specify a new queue instance. */ - public static function queue(TaskQueueInterface $assign = null): TaskQueueInterface + public static function queue(?TaskQueueInterface $assign = null): TaskQueueInterface { static $queue; diff --git a/src/Client/lib/Lib/GuzzleHttp/Psr7/CachingStream.php b/src/Client/lib/Lib/GuzzleHttp/Psr7/CachingStream.php index 0e5df4d8..3a4074c9 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Psr7/CachingStream.php +++ b/src/Client/lib/Lib/GuzzleHttp/Psr7/CachingStream.php @@ -33,7 +33,7 @@ final class CachingStream implements StreamInterface */ public function __construct( StreamInterface $stream, - StreamInterface $target = null + ?StreamInterface $target = null ) { $this->remoteStream = $stream; $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+')); diff --git a/src/Client/lib/Lib/GuzzleHttp/Psr7/HttpFactory.php b/src/Client/lib/Lib/GuzzleHttp/Psr7/HttpFactory.php index bf84746b..e09be839 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Psr7/HttpFactory.php +++ b/src/Client/lib/Lib/GuzzleHttp/Psr7/HttpFactory.php @@ -27,10 +27,10 @@ final class HttpFactory implements RequestFactoryInterface, ResponseFactoryInter { public function createUploadedFile( StreamInterface $stream, - int $size = null, + ?int $size = null, int $error = \UPLOAD_ERR_OK, - string $clientFilename = null, - string $clientMediaType = null + ?string $clientFilename = null, + ?string $clientMediaType = null ): UploadedFileInterface { if ($size === null) { $size = $stream->getSize(); diff --git a/src/Client/lib/Lib/GuzzleHttp/Psr7/MultipartStream.php b/src/Client/lib/Lib/GuzzleHttp/Psr7/MultipartStream.php index 4c75de28..39db807c 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Psr7/MultipartStream.php +++ b/src/Client/lib/Lib/GuzzleHttp/Psr7/MultipartStream.php @@ -32,7 +32,7 @@ final class MultipartStream implements StreamInterface * * @throws \InvalidArgumentException */ - public function __construct(array $elements = [], string $boundary = null) + public function __construct( array $elements = [], ?string $boundary = null ) { $this->boundary = $boundary ?: bin2hex(random_bytes(20)); $this->stream = $this->createStream($elements); diff --git a/src/Client/lib/Lib/GuzzleHttp/Psr7/Response.php b/src/Client/lib/Lib/GuzzleHttp/Psr7/Response.php index 8f2e3ab6..9d1c77bd 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Psr7/Response.php +++ b/src/Client/lib/Lib/GuzzleHttp/Psr7/Response.php @@ -96,7 +96,7 @@ public function __construct( array $headers = [], $body = null, string $version = '1.1', - string $reason = null + ?string $reason = null ) { $this->assertStatusCodeRange($status); diff --git a/src/Client/lib/Lib/GuzzleHttp/Psr7/StreamWrapper.php b/src/Client/lib/Lib/GuzzleHttp/Psr7/StreamWrapper.php index 6a3a05d4..1024fd54 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Psr7/StreamWrapper.php +++ b/src/Client/lib/Lib/GuzzleHttp/Psr7/StreamWrapper.php @@ -69,7 +69,7 @@ public static function register(): void } } - public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool + public function stream_open( string $path, string $mode, int $options, ?string &$opened_path = null ): bool { $options = stream_context_get_options($this->context); diff --git a/src/Client/lib/Lib/GuzzleHttp/Psr7/UploadedFile.php b/src/Client/lib/Lib/GuzzleHttp/Psr7/UploadedFile.php index 1fccbaaa..66125740 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Psr7/UploadedFile.php +++ b/src/Client/lib/Lib/GuzzleHttp/Psr7/UploadedFile.php @@ -64,8 +64,8 @@ public function __construct( $streamOrFile, ?int $size, int $errorStatus, - string $clientFilename = null, - string $clientMediaType = null + ?string $clientFilename = null, + ?string $clientMediaType = null ) { $this->setError($errorStatus); $this->size = $size; diff --git a/src/Client/lib/Lib/GuzzleHttp/Psr7/Uri.php b/src/Client/lib/Lib/GuzzleHttp/Psr7/Uri.php index f9b1907f..8537e604 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Psr7/Uri.php +++ b/src/Client/lib/Lib/GuzzleHttp/Psr7/Uri.php @@ -279,7 +279,7 @@ public static function isRelativePathReference(UriInterface $uri): bool * * @see https://tools.ietf.org/html/rfc3986#section-4.4 */ - public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool + public static function isSameDocumentReference( UriInterface $uri, ?UriInterface $base = null ): bool { if ($base !== null) { $uri = UriResolver::resolve($base, $uri); diff --git a/src/Client/lib/Lib/GuzzleHttp/Psr7/Utils.php b/src/Client/lib/Lib/GuzzleHttp/Psr7/Utils.php index 6435bc16..05d3d59b 100644 --- a/src/Client/lib/Lib/GuzzleHttp/Psr7/Utils.php +++ b/src/Client/lib/Lib/GuzzleHttp/Psr7/Utils.php @@ -231,7 +231,7 @@ public static function modifyRequest(RequestInterface $request, array $changes): * @param StreamInterface $stream Stream to read from * @param int|null $maxLength Maximum buffer length */ - public static function readLine(StreamInterface $stream, int $maxLength = null): string + public static function readLine( StreamInterface $stream, ?int $maxLength = null ): string { $buffer = ''; $size = 0; diff --git a/src/Client/lib/Lib/GuzzleHttp/RetryMiddleware.php b/src/Client/lib/Lib/GuzzleHttp/RetryMiddleware.php index 6371d38a..6256e0c8 100644 --- a/src/Client/lib/Lib/GuzzleHttp/RetryMiddleware.php +++ b/src/Client/lib/Lib/GuzzleHttp/RetryMiddleware.php @@ -40,7 +40,7 @@ class RetryMiddleware * and returns the number of * milliseconds to delay. */ - public function __construct(callable $decider, callable $nextHandler, callable $delay = null) + public function __construct( callable $decider, callable $nextHandler, ?callable $delay = null ) { $this->decider = $decider; $this->nextHandler = $nextHandler; @@ -110,7 +110,7 @@ private function onRejected(RequestInterface $req, array $options): callable }; } - private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface + private function doRetry( RequestInterface $request, array $options, ?ResponseInterface $response = null ): PromiseInterface { $options['delay'] = ($this->delay)(++$options['retries'], $response, $request); diff --git a/src/Client/lib/Lib/GuzzleHttp/TransferStats.php b/src/Client/lib/Lib/GuzzleHttp/TransferStats.php index e9e84237..79782666 100644 --- a/src/Client/lib/Lib/GuzzleHttp/TransferStats.php +++ b/src/Client/lib/Lib/GuzzleHttp/TransferStats.php @@ -46,8 +46,8 @@ final class TransferStats */ public function __construct( RequestInterface $request, - ResponseInterface $response = null, - float $transferTime = null, + ?ResponseInterface $response = null, + ?float $transferTime = null, $handlerErrorData = null, array $handlerStats = [] ) { diff --git a/src/Client/lib/Lib/Psr/Http/Message/UploadedFileFactoryInterface.php b/src/Client/lib/Lib/Psr/Http/Message/UploadedFileFactoryInterface.php index 4e2cce39..8de0b5e5 100644 --- a/src/Client/lib/Lib/Psr/Http/Message/UploadedFileFactoryInterface.php +++ b/src/Client/lib/Lib/Psr/Http/Message/UploadedFileFactoryInterface.php @@ -26,9 +26,9 @@ interface UploadedFileFactoryInterface */ public function createUploadedFile( StreamInterface $stream, - int $size = null, + ?int $size = null, int $error = \UPLOAD_ERR_OK, - string $clientFilename = null, - string $clientMediaType = null + ?string $clientFilename = null, + ?string $clientMediaType = null ): UploadedFileInterface; } diff --git a/src/Client/lib/Model/Capabilities.php b/src/Client/lib/Model/Capabilities.php index a948c296..727b9b15 100644 --- a/src/Client/lib/Model/Capabilities.php +++ b/src/Client/lib/Model/Capabilities.php @@ -140,7 +140,7 @@ class Capabilities implements ModelInterface, ArrayAccess, \JsonSerializable { * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'authorized', $data ?? [], null ); $this->setIfExists( 'data_domain', $data ?? [], null ); $this->setIfExists( 'features', $data ?? [], null ); diff --git a/src/Client/lib/Model/CapabilitiesFeatures.php b/src/Client/lib/Model/CapabilitiesFeatures.php index 5992936d..456dfd33 100644 --- a/src/Client/lib/Model/CapabilitiesFeatures.php +++ b/src/Client/lib/Model/CapabilitiesFeatures.php @@ -151,7 +151,7 @@ class CapabilitiesFeatures implements ModelInterface, ArrayAccess, \JsonSerializ * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'funnels', $data ?? [], null ); $this->setIfExists( 'goals', $data ?? [], null ); $this->setIfExists( 'props', $data ?? [], null ); diff --git a/src/Client/lib/Model/CustomProp.php b/src/Client/lib/Model/CustomProp.php index 6b42ad04..d87b4cf0 100644 --- a/src/Client/lib/Model/CustomProp.php +++ b/src/Client/lib/Model/CustomProp.php @@ -128,7 +128,7 @@ class CustomProp implements ModelInterface, ArrayAccess, \JsonSerializable { * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'custom_prop', $data ?? [], null ); } diff --git a/src/Client/lib/Model/CustomPropCustomProp.php b/src/Client/lib/Model/CustomPropCustomProp.php index 9953269e..397f98c6 100644 --- a/src/Client/lib/Model/CustomPropCustomProp.php +++ b/src/Client/lib/Model/CustomPropCustomProp.php @@ -127,7 +127,7 @@ class CustomPropCustomProp implements ModelInterface, ArrayAccess, \JsonSerializ * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'key', $data ?? [], null ); } diff --git a/src/Client/lib/Model/CustomPropDisableRequest.php b/src/Client/lib/Model/CustomPropDisableRequest.php index b7326d22..8703cbe6 100644 --- a/src/Client/lib/Model/CustomPropDisableRequest.php +++ b/src/Client/lib/Model/CustomPropDisableRequest.php @@ -134,7 +134,7 @@ class CustomPropDisableRequest implements ModelInterface, ArrayAccess, \JsonSeri * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'custom_props', $data ?? [], null ); $this->setIfExists( 'custom_prop', $data ?? [], null ); } diff --git a/src/Client/lib/Model/CustomPropDisableRequestBulkDisable.php b/src/Client/lib/Model/CustomPropDisableRequestBulkDisable.php index 952afabb..0ae278fd 100644 --- a/src/Client/lib/Model/CustomPropDisableRequestBulkDisable.php +++ b/src/Client/lib/Model/CustomPropDisableRequestBulkDisable.php @@ -128,7 +128,7 @@ class CustomPropDisableRequestBulkDisable implements ModelInterface, ArrayAccess * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'custom_props', $data ?? [], null ); } diff --git a/src/Client/lib/Model/CustomPropEnableRequest.php b/src/Client/lib/Model/CustomPropEnableRequest.php index 5f4fe393..cb892da4 100644 --- a/src/Client/lib/Model/CustomPropEnableRequest.php +++ b/src/Client/lib/Model/CustomPropEnableRequest.php @@ -134,7 +134,7 @@ class CustomPropEnableRequest implements ModelInterface, ArrayAccess, \JsonSeria * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'custom_props', $data ?? [], null ); $this->setIfExists( 'custom_prop', $data ?? [], null ); } diff --git a/src/Client/lib/Model/CustomPropEnableRequestBulkEnable.php b/src/Client/lib/Model/CustomPropEnableRequestBulkEnable.php index aa3d7438..d76339f3 100644 --- a/src/Client/lib/Model/CustomPropEnableRequestBulkEnable.php +++ b/src/Client/lib/Model/CustomPropEnableRequestBulkEnable.php @@ -128,7 +128,7 @@ class CustomPropEnableRequestBulkEnable implements ModelInterface, ArrayAccess, * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'custom_props', $data ?? [], null ); } diff --git a/src/Client/lib/Model/CustomPropListResponse.php b/src/Client/lib/Model/CustomPropListResponse.php index f3364cc8..3bf0b87c 100644 --- a/src/Client/lib/Model/CustomPropListResponse.php +++ b/src/Client/lib/Model/CustomPropListResponse.php @@ -128,7 +128,7 @@ class CustomPropListResponse implements ModelInterface, ArrayAccess, \JsonSerial * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'custom_props', $data ?? [], null ); } diff --git a/src/Client/lib/Model/Error.php b/src/Client/lib/Model/Error.php index 72ccbe35..c6096217 100644 --- a/src/Client/lib/Model/Error.php +++ b/src/Client/lib/Model/Error.php @@ -128,7 +128,7 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable { * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'detail', $data ?? [], null ); } diff --git a/src/Client/lib/Model/Funnel.php b/src/Client/lib/Model/Funnel.php index 08a5d5d2..0d9539c4 100644 --- a/src/Client/lib/Model/Funnel.php +++ b/src/Client/lib/Model/Funnel.php @@ -243,7 +243,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('funnel', $data ?? [], null); } diff --git a/src/Client/lib/Model/FunnelCreateRequest.php b/src/Client/lib/Model/FunnelCreateRequest.php index 66e61ad8..e81aee28 100644 --- a/src/Client/lib/Model/FunnelCreateRequest.php +++ b/src/Client/lib/Model/FunnelCreateRequest.php @@ -243,7 +243,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct( ?array $data = null ) { $this->setIfExists('funnel', $data ?? [], null); } diff --git a/src/Client/lib/Model/FunnelCreateRequestFunnel.php b/src/Client/lib/Model/FunnelCreateRequestFunnel.php index f4beec22..a96d49b5 100644 --- a/src/Client/lib/Model/FunnelCreateRequestFunnel.php +++ b/src/Client/lib/Model/FunnelCreateRequestFunnel.php @@ -248,7 +248,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('steps', $data ?? [], null); diff --git a/src/Client/lib/Model/FunnelCreateRequestFunnelStepsInner.php b/src/Client/lib/Model/FunnelCreateRequestFunnelStepsInner.php index 32632324..9a13528e 100644 --- a/src/Client/lib/Model/FunnelCreateRequestFunnelStepsInner.php +++ b/src/Client/lib/Model/FunnelCreateRequestFunnelStepsInner.php @@ -261,7 +261,7 @@ public function getGoalTypeAllowableValues() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('goal', $data ?? [], null); $this->setIfExists('goal_type', $data ?? [], 'Goal.Pageview'); diff --git a/src/Client/lib/Model/FunnelFunnel.php b/src/Client/lib/Model/FunnelFunnel.php index 078c9596..8ffed94a 100644 --- a/src/Client/lib/Model/FunnelFunnel.php +++ b/src/Client/lib/Model/FunnelFunnel.php @@ -254,7 +254,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct( ?array $data = null ) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/src/Client/lib/Model/FunnelListResponse.php b/src/Client/lib/Model/FunnelListResponse.php index adeb18c4..bd19c8d5 100644 --- a/src/Client/lib/Model/FunnelListResponse.php +++ b/src/Client/lib/Model/FunnelListResponse.php @@ -249,7 +249,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct( ?array $data = null ) { $this->setIfExists('funnels', $data ?? [], null); $this->setIfExists('meta', $data ?? [], null); diff --git a/src/Client/lib/Model/FunnelListResponseMeta.php b/src/Client/lib/Model/FunnelListResponseMeta.php index 78cb7812..109b2944 100644 --- a/src/Client/lib/Model/FunnelListResponseMeta.php +++ b/src/Client/lib/Model/FunnelListResponseMeta.php @@ -242,7 +242,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('pagination', $data ?? [], null); } diff --git a/src/Client/lib/Model/Goal.php b/src/Client/lib/Model/Goal.php index 7a0ffd5c..b9d00e50 100644 --- a/src/Client/lib/Model/Goal.php +++ b/src/Client/lib/Model/Goal.php @@ -134,7 +134,7 @@ class Goal implements ModelInterface, ArrayAccess, \JsonSerializable { * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goal_type', $data ?? [], null ); $this->setIfExists( 'goal', $data ?? [], null ); diff --git a/src/Client/lib/Model/GoalCreateRequest.php b/src/Client/lib/Model/GoalCreateRequest.php index 60b93a03..a8f8bf67 100644 --- a/src/Client/lib/Model/GoalCreateRequest.php +++ b/src/Client/lib/Model/GoalCreateRequest.php @@ -142,7 +142,7 @@ class GoalCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializabl * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goals', $data ?? [], null ); $this->setIfExists( 'goal', $data ?? [], null ); $this->setIfExists( 'goal_type', $data ?? [], 'Goal.Pageview' ); diff --git a/src/Client/lib/Model/GoalCreateRequestBulkGetOrCreate.php b/src/Client/lib/Model/GoalCreateRequestBulkGetOrCreate.php index 0a051c43..00421f43 100644 --- a/src/Client/lib/Model/GoalCreateRequestBulkGetOrCreate.php +++ b/src/Client/lib/Model/GoalCreateRequestBulkGetOrCreate.php @@ -128,7 +128,7 @@ class GoalCreateRequestBulkGetOrCreate implements ModelInterface, ArrayAccess, \ * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goals', $data ?? [], null ); } diff --git a/src/Client/lib/Model/GoalCreateRequestBulkGetOrCreateGoalsInner.php b/src/Client/lib/Model/GoalCreateRequestBulkGetOrCreateGoalsInner.php index b6f1f8f9..42026606 100644 --- a/src/Client/lib/Model/GoalCreateRequestBulkGetOrCreateGoalsInner.php +++ b/src/Client/lib/Model/GoalCreateRequestBulkGetOrCreateGoalsInner.php @@ -121,7 +121,7 @@ class GoalCreateRequestBulkGetOrCreateGoalsInner implements ModelInterface, Arra * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goal', $data ?? [], null ); $this->setIfExists( 'goal_type', $data ?? [], 'Goal.Pageview' ); } diff --git a/src/Client/lib/Model/GoalCreateRequestCustomEvent.php b/src/Client/lib/Model/GoalCreateRequestCustomEvent.php index f746f3fd..f3e74247 100644 --- a/src/Client/lib/Model/GoalCreateRequestCustomEvent.php +++ b/src/Client/lib/Model/GoalCreateRequestCustomEvent.php @@ -136,7 +136,7 @@ class GoalCreateRequestCustomEvent implements ModelInterface, ArrayAccess, \Json * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goal', $data ?? [], null ); $this->setIfExists( 'goal_type', $data ?? [], 'Goal.CustomEvent' ); } diff --git a/src/Client/lib/Model/GoalCreateRequestCustomEventGoal.php b/src/Client/lib/Model/GoalCreateRequestCustomEventGoal.php index 562485c2..9633b331 100644 --- a/src/Client/lib/Model/GoalCreateRequestCustomEventGoal.php +++ b/src/Client/lib/Model/GoalCreateRequestCustomEventGoal.php @@ -127,7 +127,7 @@ class GoalCreateRequestCustomEventGoal implements ModelInterface, ArrayAccess, \ * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'event_name', $data ?? [], null ); } diff --git a/src/Client/lib/Model/GoalCreateRequestPageview.php b/src/Client/lib/Model/GoalCreateRequestPageview.php index cc1afd93..aba226ae 100644 --- a/src/Client/lib/Model/GoalCreateRequestPageview.php +++ b/src/Client/lib/Model/GoalCreateRequestPageview.php @@ -136,7 +136,7 @@ class GoalCreateRequestPageview implements ModelInterface, ArrayAccess, \JsonSer * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goal', $data ?? [], null ); $this->setIfExists( 'goal_type', $data ?? [], 'Goal.Pageview' ); } diff --git a/src/Client/lib/Model/GoalCreateRequestPageviewGoal.php b/src/Client/lib/Model/GoalCreateRequestPageviewGoal.php index 38989f39..08a15b2b 100644 --- a/src/Client/lib/Model/GoalCreateRequestPageviewGoal.php +++ b/src/Client/lib/Model/GoalCreateRequestPageviewGoal.php @@ -127,7 +127,7 @@ class GoalCreateRequestPageviewGoal implements ModelInterface, ArrayAccess, \Jso * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'path', $data ?? [], null ); } diff --git a/src/Client/lib/Model/GoalCreateRequestRevenue.php b/src/Client/lib/Model/GoalCreateRequestRevenue.php index 0fa56895..410cb7e0 100644 --- a/src/Client/lib/Model/GoalCreateRequestRevenue.php +++ b/src/Client/lib/Model/GoalCreateRequestRevenue.php @@ -136,7 +136,7 @@ class GoalCreateRequestRevenue implements ModelInterface, ArrayAccess, \JsonSeri * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goal', $data ?? [], null ); $this->setIfExists( 'goal_type', $data ?? [], 'Goal.Revenue' ); } diff --git a/src/Client/lib/Model/GoalCreateRequestRevenueGoal.php b/src/Client/lib/Model/GoalCreateRequestRevenueGoal.php index c58e8895..d6ab2157 100644 --- a/src/Client/lib/Model/GoalCreateRequestRevenueGoal.php +++ b/src/Client/lib/Model/GoalCreateRequestRevenueGoal.php @@ -133,7 +133,7 @@ class GoalCreateRequestRevenueGoal implements ModelInterface, ArrayAccess, \Json * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'currency', $data ?? [], null ); $this->setIfExists( 'event_name', $data ?? [], null ); } diff --git a/src/Client/lib/Model/GoalCustomEvent.php b/src/Client/lib/Model/GoalCustomEvent.php index 1c5df258..be3430c5 100644 --- a/src/Client/lib/Model/GoalCustomEvent.php +++ b/src/Client/lib/Model/GoalCustomEvent.php @@ -134,7 +134,7 @@ class GoalCustomEvent implements ModelInterface, ArrayAccess, \JsonSerializable * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goal_type', $data ?? [], null ); $this->setIfExists( 'goal', $data ?? [], null ); } diff --git a/src/Client/lib/Model/GoalCustomEventAllOfGoal.php b/src/Client/lib/Model/GoalCustomEventAllOfGoal.php index ad354ae0..5e618062 100644 --- a/src/Client/lib/Model/GoalCustomEventAllOfGoal.php +++ b/src/Client/lib/Model/GoalCustomEventAllOfGoal.php @@ -139,7 +139,7 @@ class GoalCustomEventAllOfGoal implements ModelInterface, ArrayAccess, \JsonSeri * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'display_name', $data ?? [], null ); $this->setIfExists( 'event_name', $data ?? [], null ); $this->setIfExists( 'id', $data ?? [], null ); diff --git a/src/Client/lib/Model/GoalDeleteBulkRequest.php b/src/Client/lib/Model/GoalDeleteBulkRequest.php index df58524a..d50f3440 100644 --- a/src/Client/lib/Model/GoalDeleteBulkRequest.php +++ b/src/Client/lib/Model/GoalDeleteBulkRequest.php @@ -128,7 +128,7 @@ class GoalDeleteBulkRequest implements ModelInterface, ArrayAccess, \JsonSeriali * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goal_ids', $data ?? [], null ); } diff --git a/src/Client/lib/Model/GoalListResponse.php b/src/Client/lib/Model/GoalListResponse.php index 8181933b..b813fdeb 100644 --- a/src/Client/lib/Model/GoalListResponse.php +++ b/src/Client/lib/Model/GoalListResponse.php @@ -134,7 +134,7 @@ class GoalListResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goals', $data ?? [], null ); $this->setIfExists( 'meta', $data ?? [], null ); } diff --git a/src/Client/lib/Model/GoalListResponseMeta.php b/src/Client/lib/Model/GoalListResponseMeta.php index 67cda5ec..e1ad60b1 100644 --- a/src/Client/lib/Model/GoalListResponseMeta.php +++ b/src/Client/lib/Model/GoalListResponseMeta.php @@ -113,7 +113,7 @@ class GoalListResponseMeta implements ModelInterface, ArrayAccess, \JsonSerializ * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'pagination', $data ?? [], null ); } diff --git a/src/Client/lib/Model/GoalPageview.php b/src/Client/lib/Model/GoalPageview.php index 7e37694c..932a1685 100644 --- a/src/Client/lib/Model/GoalPageview.php +++ b/src/Client/lib/Model/GoalPageview.php @@ -134,7 +134,7 @@ class GoalPageview implements ModelInterface, ArrayAccess, \JsonSerializable { * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goal_type', $data ?? [], null ); $this->setIfExists( 'goal', $data ?? [], null ); } diff --git a/src/Client/lib/Model/GoalPageviewAllOfGoal.php b/src/Client/lib/Model/GoalPageviewAllOfGoal.php index 79b37b78..78fd6923 100644 --- a/src/Client/lib/Model/GoalPageviewAllOfGoal.php +++ b/src/Client/lib/Model/GoalPageviewAllOfGoal.php @@ -139,7 +139,7 @@ class GoalPageviewAllOfGoal implements ModelInterface, ArrayAccess, \JsonSeriali * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'display_name', $data ?? [], null ); $this->setIfExists( 'id', $data ?? [], null ); $this->setIfExists( 'path', $data ?? [], null ); diff --git a/src/Client/lib/Model/GoalRevenue.php b/src/Client/lib/Model/GoalRevenue.php index 0e9bc0b3..44b2ab90 100644 --- a/src/Client/lib/Model/GoalRevenue.php +++ b/src/Client/lib/Model/GoalRevenue.php @@ -134,7 +134,7 @@ class GoalRevenue implements ModelInterface, ArrayAccess, \JsonSerializable { * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goal_type', $data ?? [], null ); $this->setIfExists( 'goal', $data ?? [], null ); } diff --git a/src/Client/lib/Model/GoalRevenueAllOfGoal.php b/src/Client/lib/Model/GoalRevenueAllOfGoal.php index b7d0a70f..604da7a7 100644 --- a/src/Client/lib/Model/GoalRevenueAllOfGoal.php +++ b/src/Client/lib/Model/GoalRevenueAllOfGoal.php @@ -145,7 +145,7 @@ class GoalRevenueAllOfGoal implements ModelInterface, ArrayAccess, \JsonSerializ * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'currency', $data ?? [], null ); $this->setIfExists( 'display_name', $data ?? [], null ); $this->setIfExists( 'event_name', $data ?? [], null ); diff --git a/src/Client/lib/Model/GoalType.php b/src/Client/lib/Model/GoalType.php index 94eef2f9..77bb8060 100644 --- a/src/Client/lib/Model/GoalType.php +++ b/src/Client/lib/Model/GoalType.php @@ -128,7 +128,7 @@ class GoalType implements ModelInterface, ArrayAccess, \JsonSerializable { * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'goal_type', $data ?? [], null ); } diff --git a/src/Client/lib/Model/Link.php b/src/Client/lib/Model/Link.php index e0886fe4..3272c669 100644 --- a/src/Client/lib/Model/Link.php +++ b/src/Client/lib/Model/Link.php @@ -127,7 +127,7 @@ class Link implements ModelInterface, ArrayAccess, \JsonSerializable { * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'url', $data ?? [], null ); } diff --git a/src/Client/lib/Model/NotFoundError.php b/src/Client/lib/Model/NotFoundError.php index 351e9172..b59521e0 100644 --- a/src/Client/lib/Model/NotFoundError.php +++ b/src/Client/lib/Model/NotFoundError.php @@ -128,7 +128,7 @@ class NotFoundError implements ModelInterface, ArrayAccess, \JsonSerializable { * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'errors', $data ?? [], null ); } diff --git a/src/Client/lib/Model/PaginationMetadata.php b/src/Client/lib/Model/PaginationMetadata.php index cb3a1003..21e1c716 100644 --- a/src/Client/lib/Model/PaginationMetadata.php +++ b/src/Client/lib/Model/PaginationMetadata.php @@ -140,7 +140,7 @@ class PaginationMetadata implements ModelInterface, ArrayAccess, \JsonSerializab * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'has_next_page', $data ?? [], null ); $this->setIfExists( 'has_prev_page', $data ?? [], null ); $this->setIfExists( 'links', $data ?? [], null ); diff --git a/src/Client/lib/Model/PaginationMetadataLinks.php b/src/Client/lib/Model/PaginationMetadataLinks.php index 6dd686ac..80494562 100644 --- a/src/Client/lib/Model/PaginationMetadataLinks.php +++ b/src/Client/lib/Model/PaginationMetadataLinks.php @@ -133,7 +133,7 @@ class PaginationMetadataLinks implements ModelInterface, ArrayAccess, \JsonSeria * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'next', $data ?? [], null ); $this->setIfExists( 'prev', $data ?? [], null ); } diff --git a/src/Client/lib/Model/PaymentRequiredError.php b/src/Client/lib/Model/PaymentRequiredError.php index 48312dc1..e850a9f5 100644 --- a/src/Client/lib/Model/PaymentRequiredError.php +++ b/src/Client/lib/Model/PaymentRequiredError.php @@ -128,7 +128,7 @@ class PaymentRequiredError implements ModelInterface, ArrayAccess, \JsonSerializ * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'errors', $data ?? [], null ); } diff --git a/src/Client/lib/Model/PlausibleWebPluginsAPIControllersGoalsCreate201Response.php b/src/Client/lib/Model/PlausibleWebPluginsAPIControllersGoalsCreate201Response.php index 0ea396d4..35acc65b 100644 --- a/src/Client/lib/Model/PlausibleWebPluginsAPIControllersGoalsCreate201Response.php +++ b/src/Client/lib/Model/PlausibleWebPluginsAPIControllersGoalsCreate201Response.php @@ -248,7 +248,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct( ?array $data = null ) { $this->setIfExists('goals', $data ?? [], null); $this->setIfExists('meta', $data ?? [], null); diff --git a/src/Client/lib/Model/SharedLink.php b/src/Client/lib/Model/SharedLink.php index 432084c5..8f9f1c29 100644 --- a/src/Client/lib/Model/SharedLink.php +++ b/src/Client/lib/Model/SharedLink.php @@ -128,7 +128,7 @@ class SharedLink implements ModelInterface, ArrayAccess, \JsonSerializable { * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'shared_link', $data ?? [], null ); } diff --git a/src/Client/lib/Model/SharedLinkCreateRequest.php b/src/Client/lib/Model/SharedLinkCreateRequest.php index 1fb8466a..b888a760 100644 --- a/src/Client/lib/Model/SharedLinkCreateRequest.php +++ b/src/Client/lib/Model/SharedLinkCreateRequest.php @@ -128,7 +128,7 @@ class SharedLinkCreateRequest implements ModelInterface, ArrayAccess, \JsonSeria * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'shared_link', $data ?? [], null ); } diff --git a/src/Client/lib/Model/SharedLinkCreateRequestSharedLink.php b/src/Client/lib/Model/SharedLinkCreateRequestSharedLink.php index ff0b0787..8ee1a351 100644 --- a/src/Client/lib/Model/SharedLinkCreateRequestSharedLink.php +++ b/src/Client/lib/Model/SharedLinkCreateRequestSharedLink.php @@ -133,7 +133,7 @@ class SharedLinkCreateRequestSharedLink implements ModelInterface, ArrayAccess, * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'name', $data ?? [], null ); $this->setIfExists( 'password', $data ?? [], null ); } diff --git a/src/Client/lib/Model/SharedLinkListResponse.php b/src/Client/lib/Model/SharedLinkListResponse.php index fe0eac49..70b974e3 100644 --- a/src/Client/lib/Model/SharedLinkListResponse.php +++ b/src/Client/lib/Model/SharedLinkListResponse.php @@ -134,7 +134,7 @@ class SharedLinkListResponse implements ModelInterface, ArrayAccess, \JsonSerial * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'meta', $data ?? [], null ); $this->setIfExists( 'shared_links', $data ?? [], null ); } diff --git a/src/Client/lib/Model/SharedLinkSharedLink.php b/src/Client/lib/Model/SharedLinkSharedLink.php index da800d13..1d2c8cbe 100644 --- a/src/Client/lib/Model/SharedLinkSharedLink.php +++ b/src/Client/lib/Model/SharedLinkSharedLink.php @@ -145,7 +145,7 @@ class SharedLinkSharedLink implements ModelInterface, ArrayAccess, \JsonSerializ * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'href', $data ?? [], null ); $this->setIfExists( 'id', $data ?? [], null ); $this->setIfExists( 'name', $data ?? [], null ); diff --git a/src/Client/lib/Model/UnauthorizedError.php b/src/Client/lib/Model/UnauthorizedError.php index 66bfc71c..751b3fdc 100644 --- a/src/Client/lib/Model/UnauthorizedError.php +++ b/src/Client/lib/Model/UnauthorizedError.php @@ -128,7 +128,7 @@ class UnauthorizedError implements ModelInterface, ArrayAccess, \JsonSerializabl * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'errors', $data ?? [], null ); } diff --git a/src/Client/lib/Model/UnprocessableEntityError.php b/src/Client/lib/Model/UnprocessableEntityError.php index 71ca9cc4..642809d6 100644 --- a/src/Client/lib/Model/UnprocessableEntityError.php +++ b/src/Client/lib/Model/UnprocessableEntityError.php @@ -128,7 +128,7 @@ class UnprocessableEntityError implements ModelInterface, ArrayAccess, \JsonSeri * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct( array $data = null ) { + public function __construct( ?array $data = null ) { $this->setIfExists( 'errors', $data ?? [], null ); }