From 0302ee6d475dc20923d802e523164321e509b056 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 30 Jul 2024 21:03:49 +0300 Subject: [PATCH 01/14] refactor: introduce async method and wip inline types --- run_checks.php | 18 +++ src/Api/FingerprintApi.php | 217 +++++++++++++++++++++++++++++++++++-- template/api.mustache | 88 ++++++++++++++- 3 files changed, 308 insertions(+), 15 deletions(-) diff --git a/run_checks.php b/run_checks.php index 4f5831f2..c676c1fb 100644 --- a/run_checks.php +++ b/run_checks.php @@ -57,6 +57,24 @@ exit(1); } +$eventPromise = $client->getEventAsync($request_id); +$eventPromise->then(function ($tuple) { + list($result, $response) = $tuple; + fwrite(STDOUT, sprintf("\n\nGot async event: %s \n", $response->getBody()->getContents())); +}, function($exception) { + fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $exception->getMessage())); + exit(1); +})->wait(); + +$visitsPromise = $client->getVisitsAsync($visitor_id); +$visitsPromise->then(function($tuple) { + list($result, $response) = $tuple; + fwrite(STDOUT, sprintf("\n\nGot async visits: %s \n", $response->getBody()->getContents())); +}, function ($exception) { + fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $exception->getMessage())); + exit(1); +})->wait(); + // Enable the deprecated ArrayAccess return type warning again if needed error_reporting(error_reporting() | E_DEPRECATED); diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 31cbbb38..29118191 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -81,12 +81,11 @@ public function getConfig() * * @return array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } * - * @throws ApiException on non-2xx response * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException */ - public function getEvent($request_id) + public function getEvent($request_id): array { $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; $request = $this->getEventRequest($request_id); @@ -184,6 +183,105 @@ public function getEvent($request_id) } } + /** + * Operation getEventAsync. + * + * Get event by requestId + * + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * + * @return \GuzzleHttp\Promise\PromiseInterface< array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } > + * + * @throws \InvalidArgumentException + */ + public function getEventAsync($request_id) + { + $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; + $request = $this->getEventRequest($request_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType, $request) { + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $apiException = new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode + ); + $apiException->setResponseObject($response); + + throw $apiException; + } + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + throw new SerializationException($response, $e); + } + + return [$serialized, $response]; + }, + function ($e) { + try { + switch ($e->getCode()) { + case 200: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\EventResponse', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 403: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ErrorEvent403Response', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 404: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ErrorEvent404Response', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + } + + throw $e; + } catch (\Exception $_) { + } + } + ); + } + /** * Operation getVisits. * @@ -198,12 +296,11 @@ public function getEvent($request_id) * * @return array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } * - * @throws ApiException on non-2xx response * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException */ - public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) + public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null): array { $returnType = '\Fingerprint\ServerAPI\Model\Response'; $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); @@ -301,16 +398,118 @@ public function getVisits($visitor_id, $request_id = null, $linked_id = null, $l } } + /** + * Operation getVisitsAsync. + * + * Get visits by visitorId + * + * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) + * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) + * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) + * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) + * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) + * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) + * + * @return \GuzzleHttp\Promise\PromiseInterface< array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } > + * + * @throws \InvalidArgumentException + */ + public function getVisitsAsync($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) + { + $returnType = '\Fingerprint\ServerAPI\Model\Response'; + $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType, $request) { + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $apiException = new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode + ); + $apiException->setResponseObject($response); + + throw $apiException; + } + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + throw new SerializationException($response, $e); + } + + return [$serialized, $response]; + }, + function ($e) { + try { + switch ($e->getCode()) { + case 200: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\Response', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 403: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ErrorVisits403', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 429: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ManyRequestsResponse', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + } + + throw $e; + } catch (\Exception $_) { + } + } + ); + } + /** * Create request for operation 'getEvent'. * * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) * - * @return Request - * * @throws \InvalidArgumentException */ - protected function getEventRequest($request_id) + protected function getEventRequest(string $request_id): Request { // verify the required parameter 'request_id' is set if (null === $request_id || (is_array($request_id) && 0 === count($request_id))) { @@ -379,11 +578,9 @@ protected function getEventRequest($request_id) * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) * - * @return Request - * * @throws \InvalidArgumentException */ - protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) + protected function getVisitsRequest(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): Request { // verify the required parameter 'visitor_id' is set if (null === $visitor_id || (is_array($visitor_id) && 0 === count($visitor_id))) { diff --git a/template/api.mustache b/template/api.mustache index a47717ca..9ef0a5b0 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -82,14 +82,12 @@ use \GuzzleHttp\Exception\GuzzleException; {{#parameters}} * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/parameters}} - * - * @throws {{backSlash}}{{invokerPackage}}\ApiException on non-2xx response * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @return array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } */ - public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) + public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): array { $returnType = '{{returnType}}'; $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); @@ -164,6 +162,87 @@ use \GuzzleHttp\Exception\GuzzleException; } } + /** + * Operation {{{operationId}}}Async + * + * {{{summary}}} + {{#description}} + * {{.}} + * + {{/description}} + {{#parameters}} + * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} + {{/parameters}} + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface< array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } > + */ + public function {{operationId}}Async({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Promise\PromiseInterface + { + $returnType = '{{returnType}}'; + $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType, $request) { + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $apiException = new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode + ); + $apiException->setResponseObject($response); + throw $apiException; + } + {{#returnType}} + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + throw new SerializationException($response, $e); + } + + return [$serialized, $response]; + {{/returnType}} + {{^returnType}} + return [null, $response]; + {{/returnType}} + }, + function ($e) { + try { + switch ($e->getCode()) { + {{#responses}} + {{#dataType}} + {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '{{dataType}}', + $response->getHeaders() + ); + $e->setResponseObject($data); + break; + {{/dataType}} + {{/responses}} + } + throw $e; + } catch (\Exception $_) { + } + } + ); + } + /** * Create request for operation '{{{operationId}}}' * @@ -172,9 +251,8 @@ use \GuzzleHttp\Exception\GuzzleException; {{/parameters}} * * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request */ - protected function {{operationId}}Request({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) + protected function {{operationId}}Request({{#parameters}}{{dataType}}{{^required}}|null{{/required}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Psr7\Request { {{#parameters}} {{#required}} From e74f9201b916571de2cc4fe477b63cb615c28ea1 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 31 Jul 2024 17:40:54 +0300 Subject: [PATCH 02/14] refactor: introduce inline types for methods and properties --- src/Api/FingerprintApi.php | 51 ++----- src/ApiException.php | 29 +--- src/Configuration.php | 101 +++++-------- src/Model/ASN.php | 70 +++------ src/Model/BotdDetectionResult.php | 70 +++------ src/Model/BotdResult.php | 78 ++++------ src/Model/BrowserDetails.php | 80 ++++------- src/Model/ClonedAppResult.php | 66 +++------ src/Model/Confidence.php | 66 +++------ src/Model/DataCenter.php | 68 +++------ src/Model/DeprecatedIPLocation.php | 82 ++++------- src/Model/DeprecatedIPLocationCity.php | 66 +++------ src/Model/EmulatorResult.php | 66 +++------ src/Model/ErrorEvent403Response.php | 66 +++------ src/Model/ErrorEvent403ResponseError.php | 70 +++------ src/Model/ErrorEvent404Response.php | 66 +++------ src/Model/ErrorEvent404ResponseError.php | 70 +++------ src/Model/ErrorVisits403.php | 66 +++------ src/Model/EventResponse.php | 68 +++------ src/Model/FactoryResetResult.php | 68 +++------ src/Model/FridaResult.php | 66 +++------ src/Model/HighActivityResult.php | 68 +++------ src/Model/IPLocation.php | 82 ++++------- src/Model/IPLocationCity.php | 66 +++------ src/Model/IdentificationError.php | 70 +++------ src/Model/IncognitoResult.php | 66 +++------ src/Model/IpBlockListResult.php | 68 +++------ src/Model/IpBlockListResultDetails.php | 68 +++------ src/Model/IpInfoResult.php | 68 +++------ src/Model/IpInfoResultV4.php | 72 ++++------ src/Model/IpInfoResultV6.php | 72 ++++------ src/Model/JailbrokenResult.php | 66 +++------ src/Model/Location.php | 68 +++------ src/Model/LocationSpoofingResult.php | 66 +++------ src/Model/ManyRequestsResponse.php | 66 +++------ src/Model/PrivacySettingsResult.php | 66 +++------ src/Model/ProductError.php | 70 +++------ src/Model/ProductsResponse.php | 106 ++++++-------- src/Model/ProductsResponseBotd.php | 68 +++------ src/Model/ProductsResponseIdentification.php | 68 +++------ .../ProductsResponseIdentificationData.php | 94 +++++------- src/Model/ProxyResult.php | 66 +++------ src/Model/RawDeviceAttributesResult.php | 64 +++------ src/Model/Response.php | 72 ++++------ src/Model/ResponseVisits.php | 92 +++++------- src/Model/RootAppsResult.php | 66 +++------ src/Model/SeenAt.php | 68 +++------ src/Model/SignalResponseClonedApp.php | 68 +++------ src/Model/SignalResponseEmulator.php | 68 +++------ src/Model/SignalResponseFactoryReset.php | 68 +++------ src/Model/SignalResponseFrida.php | 68 +++------ src/Model/SignalResponseHighActivity.php | 68 +++------ src/Model/SignalResponseIncognito.php | 68 +++------ src/Model/SignalResponseIpBlocklist.php | 68 +++------ src/Model/SignalResponseIpInfo.php | 68 +++------ src/Model/SignalResponseJailbroken.php | 68 +++------ src/Model/SignalResponseLocationSpoofing.php | 68 +++------ src/Model/SignalResponsePrivacySettings.php | 68 +++------ src/Model/SignalResponseProxy.php | 68 +++------ .../SignalResponseRawDeviceAttributes.php | 68 +++------ src/Model/SignalResponseRootApps.php | 68 +++------ src/Model/SignalResponseSuspectScore.php | 68 +++------ src/Model/SignalResponseTampering.php | 68 +++------ src/Model/SignalResponseTor.php | 68 +++------ src/Model/SignalResponseVirtualMachine.php | 68 +++------ src/Model/SignalResponseVpn.php | 68 +++------ src/Model/Subdivision.php | 68 +++------ src/Model/SuspectScoreResult.php | 66 +++------ src/Model/TamperingResult.php | 68 +++------ src/Model/TorResult.php | 66 +++------ src/Model/VirtualMachineResult.php | 66 +++------ src/Model/Visit.php | 92 +++++------- src/Model/VpnResult.php | 72 ++++------ src/Model/VpnResultMethods.php | 70 +++------ src/Model/WebhookVisit.php | 136 ++++++++---------- src/ObjectSerializer.php | 51 +++---- template/ApiException.mustache | 36 +---- template/Configuration.mustache | 95 +++++------- template/api.mustache | 28 +--- template/model_generic.mustache | 69 +++------ 80 files changed, 1836 insertions(+), 3738 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 29118191..d3b451ef 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -36,6 +36,7 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Promise\PromiseInterface; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use Psr\Http\Message\ResponseInterface; @@ -54,7 +55,7 @@ class FingerprintApi protected ClientInterface $client; protected Configuration $config; - protected $integration_info = 'fingerprint-pro-server-php-sdk/4.1.0'; + protected string $integration_info = 'fingerprint-pro-server-php-sdk/4.1.0'; public function __construct( ?ClientInterface $client = null, @@ -64,10 +65,7 @@ public function __construct( $this->config = $config ?: new Configuration(); } - /** - * @return Configuration - */ - public function getConfig() + public function getConfig(): Configuration { return $this->config; } @@ -77,15 +75,13 @@ public function getConfig() * * Get event by requestId * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * * @return array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } * * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException */ - public function getEvent($request_id): array + public function getEvent(string $request_id): array { $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; $request = $this->getEventRequest($request_id); @@ -188,13 +184,9 @@ public function getEvent($request_id): array * * Get event by requestId * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * - * @return \GuzzleHttp\Promise\PromiseInterface< array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } > - * * @throws \InvalidArgumentException */ - public function getEventAsync($request_id) + public function getEventAsync(string $request_id): PromiseInterface { $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; $request = $this->getEventRequest($request_id); @@ -287,20 +279,13 @@ function ($e) { * * Get visits by visitorId * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * * @return array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } * * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException */ - public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null): array + public function getVisits(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): array { $returnType = '\Fingerprint\ServerAPI\Model\Response'; $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); @@ -403,18 +388,9 @@ public function getVisits($visitor_id, $request_id = null, $linked_id = null, $l * * Get visits by visitorId * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @return \GuzzleHttp\Promise\PromiseInterface< array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } > - * * @throws \InvalidArgumentException */ - public function getVisitsAsync($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) + public function getVisitsAsync(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): PromiseInterface { $returnType = '\Fingerprint\ServerAPI\Model\Response'; $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); @@ -505,8 +481,6 @@ function ($e) { /** * Create request for operation 'getEvent'. * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) - * * @throws \InvalidArgumentException */ protected function getEventRequest(string $request_id): Request @@ -571,13 +545,6 @@ protected function getEventRequest(string $request_id): Request /** * Create request for operation 'getVisits'. * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * * @throws \InvalidArgumentException */ protected function getVisitsRequest(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): Request @@ -663,11 +630,9 @@ protected function getVisitsRequest(string $visitor_id, ?string $request_id = nu /** * Create http client option. * - * @return array of http client options - * * @throws \RuntimeException on file opening failure */ - protected function createHttpClientOption() + protected function createHttpClientOption(): array { $options = []; if ($this->config->getDebug()) { diff --git a/src/ApiException.php b/src/ApiException.php index 846ec390..8d5e8d70 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -28,6 +28,8 @@ namespace Fingerprint\ServerAPI; +use Psr\Http\Message\ResponseInterface; + /** * ApiException Class Doc Comment. * @@ -39,38 +41,19 @@ */ class ApiException extends \Exception { - /** - * The deserialized response object. - */ - protected $responseObject; + protected ResponseInterface $responseObject; - /** - * Constructor. - * - * @param string $message Error message - * @param int $code HTTP status code - */ - public function __construct($message = '', $code = 0) + public function __construct(?string $message = '', ?int $code = 0) { parent::__construct($message, $code); } - /** - * Sets the deseralized response object (during deserialization). - * - * @param mixed $obj Deserialized response object - */ - public function setResponseObject($obj) + public function setResponseObject(ResponseInterface $obj): void { $this->responseObject = $obj; } - /** - * Gets the deseralized response object (during deserialization). - * - * @return mixed the deserialized response object - */ - public function getResponseObject() + public function getResponseObject(): ResponseInterface { return $this->responseObject; } diff --git a/src/Configuration.php b/src/Configuration.php index c605ebd1..54098a4c 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -49,75 +49,56 @@ class Configuration * * @var string[] */ - protected $apiKeys = []; + protected array $apiKeys = []; /** * Associate array to store API prefix (e.g. Bearer). * * @var string[] */ - protected $apiKeyPrefixes = []; + protected array $apiKeyPrefixes = []; /** * Access token for OAuth. - * - * @var string */ - protected $accessToken = ''; + protected string $accessToken = ''; /** * Username for HTTP basic authentication. - * - * @var string */ - protected $username = ''; + protected string $username = ''; /** * Password for HTTP basic authentication. - * - * @var string */ - protected $password = ''; + protected string $password = ''; /** * The host. - * - * @var string */ - protected $host = 'https://api.fpjs.io'; + protected string $host = 'https://api.fpjs.io'; /** * User agent of the HTTP request, set to "PHP-Swagger" by default. - * - * @var string */ - protected $userAgent = 'Swagger-Codegen/4.1.0/php'; + protected string $userAgent = 'Swagger-Codegen/4.1.0/php'; /** * Debug switch (default set to false). - * - * @var bool */ - protected $debug = false; + protected bool $debug = false; /** * Debug file location (log to STDOUT by default). - * - * @var string */ - protected $debugFile = 'php://output'; + protected string $debugFile = 'php://output'; /** * Debug file location (log to STDOUT by default). - * - * @var string */ - protected $tempFolderPath; + protected string $tempFolderPath; private static $defaultConfiguration; - /** - * Constructor. - */ public function __construct() { $this->tempFolderPath = sys_get_temp_dir(); @@ -131,7 +112,7 @@ public function __construct() * * @return $this */ - public function setApiKey($apiKeyIdentifier, $key) + public function setApiKey(string $apiKeyIdentifier, string $key): self { $this->apiKeys[$apiKeyIdentifier] = $key; @@ -143,9 +124,9 @@ public function setApiKey($apiKeyIdentifier, $key) * * @param string $apiKeyIdentifier API key identifier (authentication scheme) * - * @return string API key or token + * @return null|string API key or token */ - public function getApiKey($apiKeyIdentifier) + public function getApiKey($apiKeyIdentifier): ?string { return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; } @@ -158,7 +139,7 @@ public function getApiKey($apiKeyIdentifier) * * @return $this */ - public function setApiKeyPrefix($apiKeyIdentifier, $prefix) + public function setApiKeyPrefix(string $apiKeyIdentifier, string $prefix): self { $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; @@ -169,10 +150,8 @@ public function setApiKeyPrefix($apiKeyIdentifier, $prefix) * Gets API key prefix. * * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * - * @return string */ - public function getApiKeyPrefix($apiKeyIdentifier) + public function getApiKeyPrefix(string $apiKeyIdentifier): ?string { return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null; } @@ -184,7 +163,7 @@ public function getApiKeyPrefix($apiKeyIdentifier) * * @return $this */ - public function setAccessToken($accessToken) + public function setAccessToken(string $accessToken): self { $this->accessToken = $accessToken; @@ -196,7 +175,7 @@ public function setAccessToken($accessToken) * * @return string Access token for OAuth */ - public function getAccessToken() + public function getAccessToken(): string { return $this->accessToken; } @@ -208,7 +187,7 @@ public function getAccessToken() * * @return $this */ - public function setUsername($username) + public function setUsername(string $username): self { $this->username = $username; @@ -220,7 +199,7 @@ public function setUsername($username) * * @return string Username for HTTP basic authentication */ - public function getUsername() + public function getUsername(): string { return $this->username; } @@ -232,7 +211,7 @@ public function getUsername() * * @return $this */ - public function setPassword($password) + public function setPassword(string $password): self { $this->password = $password; @@ -244,7 +223,7 @@ public function setPassword($password) * * @return string Password for HTTP basic authentication */ - public function getPassword() + public function getPassword(): string { return $this->password; } @@ -256,7 +235,7 @@ public function getPassword() * * @return $this */ - public function setHost($host) + public function setHost(string $host): self { $this->host = $host; @@ -268,7 +247,7 @@ public function setHost($host) * * @return string Host */ - public function getHost() + public function getHost(): string { return $this->host; } @@ -276,7 +255,7 @@ public function getHost() /** * @return $this */ - public function setRegion($region = self::REGION_GLOBAL) + public function setRegion(?string $region = self::REGION_GLOBAL): self { switch (trim(strtolower($region))) { case self::REGION_ASIA: @@ -313,7 +292,7 @@ public function setRegion($region = self::REGION_GLOBAL) * * @throws \InvalidArgumentException */ - public function setUserAgent($userAgent) + public function setUserAgent(string $userAgent): self { if (!is_string($userAgent)) { throw new \InvalidArgumentException('User-agent must be a string.'); @@ -329,7 +308,7 @@ public function setUserAgent($userAgent) * * @return string user agent */ - public function getUserAgent() + public function getUserAgent(): string { return $this->userAgent; } @@ -341,7 +320,7 @@ public function getUserAgent() * * @return $this */ - public function setDebug($debug) + public function setDebug(bool $debug): self { $this->debug = $debug; @@ -350,10 +329,8 @@ public function setDebug($debug) /** * Gets the debug flag. - * - * @return bool */ - public function getDebug() + public function getDebug(): bool { return $this->debug; } @@ -365,7 +342,7 @@ public function getDebug() * * @return $this */ - public function setDebugFile($debugFile) + public function setDebugFile(string $debugFile): self { $this->debugFile = $debugFile; @@ -374,10 +351,8 @@ public function setDebugFile($debugFile) /** * Gets the debug file. - * - * @return string */ - public function getDebugFile() + public function getDebugFile(): string { return $this->debugFile; } @@ -389,7 +364,7 @@ public function getDebugFile() * * @return $this */ - public function setTempFolderPath($tempFolderPath) + public function setTempFolderPath(string $tempFolderPath): self { $this->tempFolderPath = $tempFolderPath; @@ -401,17 +376,15 @@ public function setTempFolderPath($tempFolderPath) * * @return string Temp folder path */ - public function getTempFolderPath() + public function getTempFolderPath(): string { return $this->tempFolderPath; } /** * Gets the default configuration instance, with apiKey and host params. - * - * @return Configuration */ - public static function getDefaultConfiguration($api_key = null, $region = self::REGION_GLOBAL) + public static function getDefaultConfiguration(?string $api_key = null, ?string $region = self::REGION_GLOBAL): self { if (null === self::$defaultConfiguration) { self::$defaultConfiguration = new Configuration(); @@ -428,7 +401,7 @@ public static function getDefaultConfiguration($api_key = null, $region = self:: * * @param Configuration $config An instance of the Configuration Object */ - public static function setDefaultConfiguration(Configuration $config) + public static function setDefaultConfiguration(Configuration $config): void { self::$defaultConfiguration = $config; } @@ -438,7 +411,7 @@ public static function setDefaultConfiguration(Configuration $config) * * @return string The report for debugging */ - public static function toDebugReport() + public static function toDebugReport(): string { $report = 'PHP SDK (Fingerprint\ServerAPI) Debug Report:'.PHP_EOL; $report .= ' OS: '.php_uname().PHP_EOL; @@ -455,9 +428,9 @@ public static function toDebugReport() * * @param string $apiKeyIdentifier name of apikey * - * @return string API key with the prefix + * @return null|string API key with the prefix */ - public function getApiKeyWithPrefix($apiKeyIdentifier) + public function getApiKeyWithPrefix(string $apiKeyIdentifier): ?string { $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); $apiKey = $this->getApiKey($apiKeyIdentifier); diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 850ad69d..39b08230 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -42,17 +42,15 @@ class ASN implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ASN'; + protected static string $swaggerModelName = 'ASN'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'asn' => 'string', 'network' => 'string', 'name' => 'string']; @@ -62,7 +60,7 @@ class ASN implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'asn' => null, 'network' => null, 'name' => null]; @@ -73,7 +71,7 @@ class ASN implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'asn' => 'asn', 'network' => 'network', 'name' => 'name']; @@ -83,7 +81,7 @@ class ASN implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'asn' => 'setAsn', 'network' => 'setNetwork', 'name' => 'setName']; @@ -93,7 +91,7 @@ class ASN implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'asn' => 'getAsn', 'network' => 'getNetwork', 'name' => 'getName']; @@ -103,7 +101,7 @@ class ASN implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -120,10 +118,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -137,20 +133,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -158,40 +150,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -201,7 +185,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -221,7 +205,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -243,7 +227,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn) + public function setAsn($asn): self { $this->container['asn'] = $asn; @@ -267,7 +251,7 @@ public function getNetwork() * * @return $this */ - public function setNetwork($network) + public function setNetwork($network): self { $this->container['network'] = $network; @@ -291,7 +275,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName($name): self { $this->container['name'] = $name; @@ -302,11 +286,8 @@ public function setName($name) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -315,11 +296,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -330,8 +308,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -345,8 +322,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index 1e02803a..e04a377a 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -48,17 +48,15 @@ class BotdDetectionResult implements ModelInterface, \ArrayAccess /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'BotdDetectionResult'; + protected static string $swaggerModelName = 'BotdDetectionResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'string', 'type' => 'string']; @@ -67,7 +65,7 @@ class BotdDetectionResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null, 'type' => null]; @@ -77,7 +75,7 @@ class BotdDetectionResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result', 'type' => 'type']; @@ -86,7 +84,7 @@ class BotdDetectionResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult', 'type' => 'setType']; @@ -95,7 +93,7 @@ class BotdDetectionResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult', 'type' => 'getType']; @@ -104,7 +102,7 @@ class BotdDetectionResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -120,10 +118,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -137,20 +133,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -158,40 +150,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -201,7 +185,7 @@ public function getModelName() * * @return string[] */ - public function getResultAllowableValues() + public function getResultAllowableValues(): array { return [ self::RESULT_NOT_DETECTED, @@ -214,7 +198,7 @@ public function getResultAllowableValues() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -238,7 +222,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -260,7 +244,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $allowedValues = $this->getResultAllowableValues(); if (!in_array($result, $allowedValues, true)) { @@ -293,7 +277,7 @@ public function getType() * * @return $this */ - public function setType($type) + public function setType($type): self { $this->container['type'] = $type; @@ -304,11 +288,8 @@ public function setType($type) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -317,11 +298,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -332,8 +310,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -347,8 +324,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index 24083d55..b0d054a6 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -44,17 +44,15 @@ class BotdResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'BotdResult'; + protected static string $swaggerModelName = 'BotdResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'ip' => 'string', 'time' => '\DateTime', 'url' => 'string', @@ -68,7 +66,7 @@ class BotdResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'ip' => 'ipv4', 'time' => 'date-time', 'url' => null, @@ -83,7 +81,7 @@ class BotdResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'ip' => 'ip', 'time' => 'time', 'url' => 'url', @@ -97,7 +95,7 @@ class BotdResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'ip' => 'setIp', 'time' => 'setTime', 'url' => 'setUrl', @@ -111,7 +109,7 @@ class BotdResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'ip' => 'getIp', 'time' => 'getTime', 'url' => 'getUrl', @@ -125,7 +123,7 @@ class BotdResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -146,10 +144,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -163,20 +159,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -184,40 +176,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -227,7 +211,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -259,7 +243,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -281,7 +265,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp($ip): self { $this->container['ip'] = $ip; @@ -305,7 +289,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime($time): self { $this->container['time'] = $time; @@ -329,7 +313,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl($url): self { $this->container['url'] = $url; @@ -353,7 +337,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent) + public function setUserAgent($user_agent): self { $this->container['user_agent'] = $user_agent; @@ -377,7 +361,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId($request_id): self { $this->container['request_id'] = $request_id; @@ -401,7 +385,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id) + public function setLinkedId($linked_id): self { $this->container['linked_id'] = $linked_id; @@ -425,7 +409,7 @@ public function getBot() * * @return $this */ - public function setBot($bot) + public function setBot($bot): self { $this->container['bot'] = $bot; @@ -436,11 +420,8 @@ public function setBot($bot) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -449,11 +430,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -464,8 +442,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -479,8 +456,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index 2c49a252..4c6436be 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -42,17 +42,15 @@ class BrowserDetails implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'BrowserDetails'; + protected static string $swaggerModelName = 'BrowserDetails'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'browser_name' => 'string', 'browser_major_version' => 'string', 'browser_full_version' => 'string', @@ -67,7 +65,7 @@ class BrowserDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'browser_name' => null, 'browser_major_version' => null, 'browser_full_version' => null, @@ -83,7 +81,7 @@ class BrowserDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'browser_name' => 'browserName', 'browser_major_version' => 'browserMajorVersion', 'browser_full_version' => 'browserFullVersion', @@ -98,7 +96,7 @@ class BrowserDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'browser_name' => 'setBrowserName', 'browser_major_version' => 'setBrowserMajorVersion', 'browser_full_version' => 'setBrowserFullVersion', @@ -113,7 +111,7 @@ class BrowserDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'browser_name' => 'getBrowserName', 'browser_major_version' => 'getBrowserMajorVersion', 'browser_full_version' => 'getBrowserFullVersion', @@ -128,7 +126,7 @@ class BrowserDetails implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -150,10 +148,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -167,20 +163,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -188,40 +180,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -231,7 +215,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -266,7 +250,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -288,7 +272,7 @@ public function getBrowserName() * * @return $this */ - public function setBrowserName($browser_name) + public function setBrowserName($browser_name): self { $this->container['browser_name'] = $browser_name; @@ -312,7 +296,7 @@ public function getBrowserMajorVersion() * * @return $this */ - public function setBrowserMajorVersion($browser_major_version) + public function setBrowserMajorVersion($browser_major_version): self { $this->container['browser_major_version'] = $browser_major_version; @@ -336,7 +320,7 @@ public function getBrowserFullVersion() * * @return $this */ - public function setBrowserFullVersion($browser_full_version) + public function setBrowserFullVersion($browser_full_version): self { $this->container['browser_full_version'] = $browser_full_version; @@ -360,7 +344,7 @@ public function getOs() * * @return $this */ - public function setOs($os) + public function setOs($os): self { $this->container['os'] = $os; @@ -384,7 +368,7 @@ public function getOsVersion() * * @return $this */ - public function setOsVersion($os_version) + public function setOsVersion($os_version): self { $this->container['os_version'] = $os_version; @@ -408,7 +392,7 @@ public function getDevice() * * @return $this */ - public function setDevice($device) + public function setDevice($device): self { $this->container['device'] = $device; @@ -432,7 +416,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent) + public function setUserAgent($user_agent): self { $this->container['user_agent'] = $user_agent; @@ -456,7 +440,7 @@ public function getBotProbability() * * @return $this */ - public function setBotProbability($bot_probability) + public function setBotProbability($bot_probability): self { $this->container['bot_probability'] = $bot_probability; @@ -467,11 +451,8 @@ public function setBotProbability($bot_probability) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -480,11 +461,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -495,8 +473,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -510,8 +487,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index f0b84ebe..15fae901 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -42,17 +42,15 @@ class ClonedAppResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ClonedAppResult'; + protected static string $swaggerModelName = 'ClonedAppResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class ClonedAppResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class ClonedAppResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class ClonedAppResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class ClonedAppResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class ClonedAppResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index 4156b5c9..84db4fd0 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -42,17 +42,15 @@ class Confidence implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'Confidence'; + protected static string $swaggerModelName = 'Confidence'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'score' => 'float']; /** @@ -60,7 +58,7 @@ class Confidence implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'score' => 'float']; /** @@ -69,7 +67,7 @@ class Confidence implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'score' => 'score']; /** @@ -77,7 +75,7 @@ class Confidence implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'score' => 'setScore']; /** @@ -85,7 +83,7 @@ class Confidence implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'score' => 'getScore']; /** @@ -93,7 +91,7 @@ class Confidence implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getScore() * * @return $this */ - public function setScore($score) + public function setScore($score): self { $this->container['score'] = $score; @@ -239,11 +223,8 @@ public function setScore($score) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index e2f62094..e44d4ced 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -42,17 +42,15 @@ class DataCenter implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'DataCenter'; + protected static string $swaggerModelName = 'DataCenter'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool', 'name' => 'string']; @@ -61,7 +59,7 @@ class DataCenter implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null, 'name' => null]; @@ -71,7 +69,7 @@ class DataCenter implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result', 'name' => 'name']; @@ -80,7 +78,7 @@ class DataCenter implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult', 'name' => 'setName']; @@ -89,7 +87,7 @@ class DataCenter implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult', 'name' => 'getName']; @@ -98,7 +96,7 @@ class DataCenter implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -212,7 +196,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -234,7 +218,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -258,7 +242,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName($name): self { $this->container['name'] = $name; @@ -269,11 +253,8 @@ public function setName($name) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -282,11 +263,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -297,8 +275,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -312,8 +289,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index 3b5d8507..7ea9beb2 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -44,17 +44,15 @@ class DeprecatedIPLocation implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'DeprecatedIPLocation'; + protected static string $swaggerModelName = 'DeprecatedIPLocation'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'accuracy_radius' => 'int', 'latitude' => 'double', 'longitude' => 'double', @@ -70,7 +68,7 @@ class DeprecatedIPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'accuracy_radius' => null, 'latitude' => 'double', 'longitude' => 'double', @@ -87,7 +85,7 @@ class DeprecatedIPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'accuracy_radius' => 'accuracyRadius', 'latitude' => 'latitude', 'longitude' => 'longitude', @@ -103,7 +101,7 @@ class DeprecatedIPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'accuracy_radius' => 'setAccuracyRadius', 'latitude' => 'setLatitude', 'longitude' => 'setLongitude', @@ -119,7 +117,7 @@ class DeprecatedIPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'accuracy_radius' => 'getAccuracyRadius', 'latitude' => 'getLatitude', 'longitude' => 'getLongitude', @@ -135,7 +133,7 @@ class DeprecatedIPLocation implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -158,10 +156,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -175,20 +171,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -196,40 +188,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -239,7 +223,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -250,7 +234,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -272,7 +256,7 @@ public function getAccuracyRadius() * * @return $this */ - public function setAccuracyRadius($accuracy_radius) + public function setAccuracyRadius($accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -296,7 +280,7 @@ public function getLatitude() * * @return $this */ - public function setLatitude($latitude) + public function setLatitude($latitude): self { $this->container['latitude'] = $latitude; @@ -320,7 +304,7 @@ public function getLongitude() * * @return $this */ - public function setLongitude($longitude) + public function setLongitude($longitude): self { $this->container['longitude'] = $longitude; @@ -344,7 +328,7 @@ public function getPostalCode() * * @return $this */ - public function setPostalCode($postal_code) + public function setPostalCode($postal_code): self { $this->container['postal_code'] = $postal_code; @@ -368,7 +352,7 @@ public function getTimezone() * * @return $this */ - public function setTimezone($timezone) + public function setTimezone($timezone): self { $this->container['timezone'] = $timezone; @@ -392,7 +376,7 @@ public function getCity() * * @return $this */ - public function setCity($city) + public function setCity($city): self { $this->container['city'] = $city; @@ -416,7 +400,7 @@ public function getCountry() * * @return $this */ - public function setCountry($country) + public function setCountry($country): self { $this->container['country'] = $country; @@ -440,7 +424,7 @@ public function getContinent() * * @return $this */ - public function setContinent($continent) + public function setContinent($continent): self { $this->container['continent'] = $continent; @@ -464,7 +448,7 @@ public function getSubdivisions() * * @return $this */ - public function setSubdivisions($subdivisions) + public function setSubdivisions($subdivisions): self { $this->container['subdivisions'] = $subdivisions; @@ -475,11 +459,8 @@ public function setSubdivisions($subdivisions) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -488,11 +469,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -503,8 +481,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -518,8 +495,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index fdb8ccf1..7025cd42 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -42,17 +42,15 @@ class DeprecatedIPLocationCity implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'DeprecatedIPLocationCity'; + protected static string $swaggerModelName = 'DeprecatedIPLocationCity'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'name' => 'string']; /** @@ -60,7 +58,7 @@ class DeprecatedIPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'name' => null]; /** @@ -69,7 +67,7 @@ class DeprecatedIPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'name' => 'name']; /** @@ -77,7 +75,7 @@ class DeprecatedIPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'name' => 'setName']; /** @@ -85,7 +83,7 @@ class DeprecatedIPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'name' => 'getName']; /** @@ -93,7 +91,7 @@ class DeprecatedIPLocationCity implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -200,7 +184,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -222,7 +206,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName($name): self { $this->container['name'] = $name; @@ -233,11 +217,8 @@ public function setName($name) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -246,11 +227,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -261,8 +239,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,8 +253,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index 337177a2..f6bb7ed7 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -42,17 +42,15 @@ class EmulatorResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'EmulatorResult'; + protected static string $swaggerModelName = 'EmulatorResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class EmulatorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class EmulatorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class EmulatorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class EmulatorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class EmulatorResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index f2f059d7..ba116f62 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -42,17 +42,15 @@ class ErrorEvent403Response implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ErrorEvent403Response'; + protected static string $swaggerModelName = 'ErrorEvent403Response'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'error' => '\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError']; /** @@ -60,7 +58,7 @@ class ErrorEvent403Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'error' => null]; /** @@ -69,7 +67,7 @@ class ErrorEvent403Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'error' => 'error']; /** @@ -77,7 +75,7 @@ class ErrorEvent403Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'error' => 'setError']; /** @@ -85,7 +83,7 @@ class ErrorEvent403Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'error' => 'getError']; /** @@ -93,7 +91,7 @@ class ErrorEvent403Response implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -200,7 +184,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -222,7 +206,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -233,11 +217,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -246,11 +227,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -261,8 +239,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,8 +253,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index 155f99fe..aea1a345 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -47,17 +47,15 @@ class ErrorEvent403ResponseError implements ModelInterface, \ArrayAccess /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ErrorEvent403ResponseError'; + protected static string $swaggerModelName = 'ErrorEvent403ResponseError'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'code' => 'string', 'message' => 'string']; @@ -66,7 +64,7 @@ class ErrorEvent403ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'code' => null, 'message' => null]; @@ -76,7 +74,7 @@ class ErrorEvent403ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'code' => 'code', 'message' => 'message']; @@ -85,7 +83,7 @@ class ErrorEvent403ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'code' => 'setCode', 'message' => 'setMessage']; @@ -94,7 +92,7 @@ class ErrorEvent403ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'code' => 'getCode', 'message' => 'getMessage']; @@ -103,7 +101,7 @@ class ErrorEvent403ResponseError implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -119,10 +117,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -136,20 +132,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -157,40 +149,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -200,7 +184,7 @@ public function getModelName() * * @return string[] */ - public function getCodeAllowableValues() + public function getCodeAllowableValues(): array { return [ self::CODE_TOKEN_REQUIRED, @@ -214,7 +198,7 @@ public function getCodeAllowableValues() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -242,7 +226,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -264,7 +248,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode($code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -297,7 +281,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message) + public function setMessage($message): self { $this->container['message'] = $message; @@ -308,11 +292,8 @@ public function setMessage($message) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -321,11 +302,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -336,8 +314,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -351,8 +328,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index 7c7da1d0..b3358e43 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -42,17 +42,15 @@ class ErrorEvent404Response implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ErrorEvent404Response'; + protected static string $swaggerModelName = 'ErrorEvent404Response'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'error' => '\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError']; /** @@ -60,7 +58,7 @@ class ErrorEvent404Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'error' => null]; /** @@ -69,7 +67,7 @@ class ErrorEvent404Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'error' => 'error']; /** @@ -77,7 +75,7 @@ class ErrorEvent404Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'error' => 'setError']; /** @@ -85,7 +83,7 @@ class ErrorEvent404Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'error' => 'getError']; /** @@ -93,7 +91,7 @@ class ErrorEvent404Response implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -200,7 +184,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -222,7 +206,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -233,11 +217,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -246,11 +227,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -261,8 +239,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,8 +253,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index f1f83b7f..88142d91 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -44,17 +44,15 @@ class ErrorEvent404ResponseError implements ModelInterface, \ArrayAccess /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ErrorEvent404ResponseError'; + protected static string $swaggerModelName = 'ErrorEvent404ResponseError'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'code' => 'string', 'message' => 'string']; @@ -63,7 +61,7 @@ class ErrorEvent404ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'code' => null, 'message' => null]; @@ -73,7 +71,7 @@ class ErrorEvent404ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'code' => 'code', 'message' => 'message']; @@ -82,7 +80,7 @@ class ErrorEvent404ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'code' => 'setCode', 'message' => 'setMessage']; @@ -91,7 +89,7 @@ class ErrorEvent404ResponseError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'code' => 'getCode', 'message' => 'getMessage']; @@ -100,7 +98,7 @@ class ErrorEvent404ResponseError implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -116,10 +114,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -133,20 +129,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -154,40 +146,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -197,7 +181,7 @@ public function getModelName() * * @return string[] */ - public function getCodeAllowableValues() + public function getCodeAllowableValues(): array { return [ self::CODE_REQUEST_NOT_FOUND, ]; @@ -208,7 +192,7 @@ public function getCodeAllowableValues() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -236,7 +220,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -258,7 +242,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode($code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -291,7 +275,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message) + public function setMessage($message): self { $this->container['message'] = $message; @@ -302,11 +286,8 @@ public function setMessage($message) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -315,11 +296,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -330,8 +308,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -345,8 +322,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index f5a15bb5..318c8060 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -42,17 +42,15 @@ class ErrorVisits403 implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ErrorVisits403'; + protected static string $swaggerModelName = 'ErrorVisits403'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'error' => 'string']; /** @@ -60,7 +58,7 @@ class ErrorVisits403 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'error' => null]; /** @@ -69,7 +67,7 @@ class ErrorVisits403 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'error' => 'error']; /** @@ -77,7 +75,7 @@ class ErrorVisits403 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'error' => 'setError']; /** @@ -85,7 +83,7 @@ class ErrorVisits403 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'error' => 'getError']; /** @@ -93,7 +91,7 @@ class ErrorVisits403 implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -239,11 +223,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 09c7e3c5..243ef3dc 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -44,17 +44,15 @@ class EventResponse implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'EventResponse'; + protected static string $swaggerModelName = 'EventResponse'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'products' => '\Fingerprint\ServerAPI\Model\ProductsResponse', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -63,7 +61,7 @@ class EventResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'products' => null, 'error' => null]; @@ -73,7 +71,7 @@ class EventResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'products' => 'products', 'error' => 'error']; @@ -82,7 +80,7 @@ class EventResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'products' => 'setProducts', 'error' => 'setError']; @@ -91,7 +89,7 @@ class EventResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'products' => 'getProducts', 'error' => 'getError']; @@ -100,7 +98,7 @@ class EventResponse implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -116,10 +114,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -133,20 +129,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -154,40 +146,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -197,7 +181,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -214,7 +198,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -236,7 +220,7 @@ public function getProducts() * * @return $this */ - public function setProducts($products) + public function setProducts($products): self { $this->container['products'] = $products; @@ -260,7 +244,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -271,11 +255,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -284,11 +265,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -299,8 +277,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -314,8 +291,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 7329208d..83f8617a 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -42,17 +42,15 @@ class FactoryResetResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'FactoryResetResult'; + protected static string $swaggerModelName = 'FactoryResetResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'time' => '\DateTime', 'timestamp' => 'int']; @@ -61,7 +59,7 @@ class FactoryResetResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'time' => 'date-time', 'timestamp' => 'int64']; @@ -71,7 +69,7 @@ class FactoryResetResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'time' => 'time', 'timestamp' => 'timestamp']; @@ -80,7 +78,7 @@ class FactoryResetResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'time' => 'setTime', 'timestamp' => 'setTimestamp']; @@ -89,7 +87,7 @@ class FactoryResetResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'time' => 'getTime', 'timestamp' => 'getTimestamp']; @@ -98,7 +96,7 @@ class FactoryResetResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -215,7 +199,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -237,7 +221,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime($time): self { $this->container['time'] = $time; @@ -261,7 +245,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp($timestamp): self { $this->container['timestamp'] = $timestamp; @@ -272,11 +256,8 @@ public function setTimestamp($timestamp) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -285,11 +266,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -300,8 +278,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -315,8 +292,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index b879047f..32b5887f 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -42,17 +42,15 @@ class FridaResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'FridaResult'; + protected static string $swaggerModelName = 'FridaResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class FridaResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class FridaResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class FridaResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class FridaResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class FridaResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index af56699e..9047bc79 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -42,17 +42,15 @@ class HighActivityResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'HighActivityResult'; + protected static string $swaggerModelName = 'HighActivityResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool', 'daily_requests' => 'float']; @@ -61,7 +59,7 @@ class HighActivityResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null, 'daily_requests' => null]; @@ -71,7 +69,7 @@ class HighActivityResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result', 'daily_requests' => 'dailyRequests']; @@ -80,7 +78,7 @@ class HighActivityResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult', 'daily_requests' => 'setDailyRequests']; @@ -89,7 +87,7 @@ class HighActivityResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult', 'daily_requests' => 'getDailyRequests']; @@ -98,7 +96,7 @@ class HighActivityResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -212,7 +196,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -234,7 +218,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -258,7 +242,7 @@ public function getDailyRequests() * * @return $this */ - public function setDailyRequests($daily_requests) + public function setDailyRequests($daily_requests): self { $this->container['daily_requests'] = $daily_requests; @@ -269,11 +253,8 @@ public function setDailyRequests($daily_requests) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -282,11 +263,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -297,8 +275,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -312,8 +289,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index b6586802..5310c895 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -42,17 +42,15 @@ class IPLocation implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IPLocation'; + protected static string $swaggerModelName = 'IPLocation'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'accuracy_radius' => 'int', 'latitude' => 'double', 'longitude' => 'double', @@ -68,7 +66,7 @@ class IPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'accuracy_radius' => null, 'latitude' => 'double', 'longitude' => 'double', @@ -85,7 +83,7 @@ class IPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'accuracy_radius' => 'accuracyRadius', 'latitude' => 'latitude', 'longitude' => 'longitude', @@ -101,7 +99,7 @@ class IPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'accuracy_radius' => 'setAccuracyRadius', 'latitude' => 'setLatitude', 'longitude' => 'setLongitude', @@ -117,7 +115,7 @@ class IPLocation implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'accuracy_radius' => 'getAccuracyRadius', 'latitude' => 'getLatitude', 'longitude' => 'getLongitude', @@ -133,7 +131,7 @@ class IPLocation implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -156,10 +154,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -173,20 +169,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -194,40 +186,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -237,7 +221,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -248,7 +232,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -270,7 +254,7 @@ public function getAccuracyRadius() * * @return $this */ - public function setAccuracyRadius($accuracy_radius) + public function setAccuracyRadius($accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -294,7 +278,7 @@ public function getLatitude() * * @return $this */ - public function setLatitude($latitude) + public function setLatitude($latitude): self { $this->container['latitude'] = $latitude; @@ -318,7 +302,7 @@ public function getLongitude() * * @return $this */ - public function setLongitude($longitude) + public function setLongitude($longitude): self { $this->container['longitude'] = $longitude; @@ -342,7 +326,7 @@ public function getPostalCode() * * @return $this */ - public function setPostalCode($postal_code) + public function setPostalCode($postal_code): self { $this->container['postal_code'] = $postal_code; @@ -366,7 +350,7 @@ public function getTimezone() * * @return $this */ - public function setTimezone($timezone) + public function setTimezone($timezone): self { $this->container['timezone'] = $timezone; @@ -390,7 +374,7 @@ public function getCity() * * @return $this */ - public function setCity($city) + public function setCity($city): self { $this->container['city'] = $city; @@ -414,7 +398,7 @@ public function getCountry() * * @return $this */ - public function setCountry($country) + public function setCountry($country): self { $this->container['country'] = $country; @@ -438,7 +422,7 @@ public function getContinent() * * @return $this */ - public function setContinent($continent) + public function setContinent($continent): self { $this->container['continent'] = $continent; @@ -462,7 +446,7 @@ public function getSubdivisions() * * @return $this */ - public function setSubdivisions($subdivisions) + public function setSubdivisions($subdivisions): self { $this->container['subdivisions'] = $subdivisions; @@ -473,11 +457,8 @@ public function setSubdivisions($subdivisions) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -486,11 +467,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -501,8 +479,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -516,8 +493,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index 82c30ead..be5c2707 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -42,17 +42,15 @@ class IPLocationCity implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IPLocationCity'; + protected static string $swaggerModelName = 'IPLocationCity'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'name' => 'string']; /** @@ -60,7 +58,7 @@ class IPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'name' => null]; /** @@ -69,7 +67,7 @@ class IPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'name' => 'name']; /** @@ -77,7 +75,7 @@ class IPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'name' => 'setName']; /** @@ -85,7 +83,7 @@ class IPLocationCity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'name' => 'getName']; /** @@ -93,7 +91,7 @@ class IPLocationCity implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -200,7 +184,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -222,7 +206,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName($name): self { $this->container['name'] = $name; @@ -233,11 +217,8 @@ public function setName($name) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -246,11 +227,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -261,8 +239,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -276,8 +253,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index c925b7d8..a100c8b3 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -45,17 +45,15 @@ class IdentificationError implements ModelInterface, \ArrayAccess /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IdentificationError'; + protected static string $swaggerModelName = 'IdentificationError'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'code' => 'string', 'message' => 'string']; @@ -64,7 +62,7 @@ class IdentificationError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'code' => null, 'message' => null]; @@ -74,7 +72,7 @@ class IdentificationError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'code' => 'code', 'message' => 'message']; @@ -83,7 +81,7 @@ class IdentificationError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'code' => 'setCode', 'message' => 'setMessage']; @@ -92,7 +90,7 @@ class IdentificationError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'code' => 'getCode', 'message' => 'getMessage']; @@ -101,7 +99,7 @@ class IdentificationError implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -117,10 +115,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -134,20 +130,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -155,40 +147,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -198,7 +182,7 @@ public function getModelName() * * @return string[] */ - public function getCodeAllowableValues() + public function getCodeAllowableValues(): array { return [ self::CODE__429_TOO_MANY_REQUESTS, @@ -210,7 +194,7 @@ public function getCodeAllowableValues() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -238,7 +222,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -260,7 +244,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode($code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -293,7 +277,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message) + public function setMessage($message): self { $this->container['message'] = $message; @@ -304,11 +288,8 @@ public function setMessage($message) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -317,11 +298,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -332,8 +310,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -347,8 +324,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index 33286e0d..15325b69 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -42,17 +42,15 @@ class IncognitoResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IncognitoResult'; + protected static string $swaggerModelName = 'IncognitoResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class IncognitoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class IncognitoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class IncognitoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class IncognitoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class IncognitoResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index 7674a616..e16568b2 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -42,17 +42,15 @@ class IpBlockListResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IpBlockListResult'; + protected static string $swaggerModelName = 'IpBlockListResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool', 'details' => '\Fingerprint\ServerAPI\Model\IpBlockListResultDetails']; @@ -61,7 +59,7 @@ class IpBlockListResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null, 'details' => null]; @@ -71,7 +69,7 @@ class IpBlockListResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result', 'details' => 'details']; @@ -80,7 +78,7 @@ class IpBlockListResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult', 'details' => 'setDetails']; @@ -89,7 +87,7 @@ class IpBlockListResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult', 'details' => 'getDetails']; @@ -98,7 +96,7 @@ class IpBlockListResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -215,7 +199,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -237,7 +221,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -261,7 +245,7 @@ public function getDetails() * * @return $this */ - public function setDetails($details) + public function setDetails($details): self { $this->container['details'] = $details; @@ -272,11 +256,8 @@ public function setDetails($details) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -285,11 +266,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -300,8 +278,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -315,8 +292,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 4ee07f8b..15427c7b 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -42,17 +42,15 @@ class IpBlockListResultDetails implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IpBlockListResult_details'; + protected static string $swaggerModelName = 'IpBlockListResult_details'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'email_spam' => 'bool', 'attack_source' => 'bool']; @@ -61,7 +59,7 @@ class IpBlockListResultDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'email_spam' => null, 'attack_source' => null]; @@ -71,7 +69,7 @@ class IpBlockListResultDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'email_spam' => 'emailSpam', 'attack_source' => 'attackSource']; @@ -80,7 +78,7 @@ class IpBlockListResultDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'email_spam' => 'setEmailSpam', 'attack_source' => 'setAttackSource']; @@ -89,7 +87,7 @@ class IpBlockListResultDetails implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'email_spam' => 'getEmailSpam', 'attack_source' => 'getAttackSource']; @@ -98,7 +96,7 @@ class IpBlockListResultDetails implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -215,7 +199,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -237,7 +221,7 @@ public function getEmailSpam() * * @return $this */ - public function setEmailSpam($email_spam) + public function setEmailSpam($email_spam): self { $this->container['email_spam'] = $email_spam; @@ -261,7 +245,7 @@ public function getAttackSource() * * @return $this */ - public function setAttackSource($attack_source) + public function setAttackSource($attack_source): self { $this->container['attack_source'] = $attack_source; @@ -272,11 +256,8 @@ public function setAttackSource($attack_source) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -285,11 +266,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -300,8 +278,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -315,8 +292,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index 56464e4d..5b7130ec 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -44,17 +44,15 @@ class IpInfoResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IpInfoResult'; + protected static string $swaggerModelName = 'IpInfoResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'v4' => '\Fingerprint\ServerAPI\Model\IpInfoResultV4', 'v6' => '\Fingerprint\ServerAPI\Model\IpInfoResultV6']; @@ -63,7 +61,7 @@ class IpInfoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'v4' => null, 'v6' => null]; @@ -73,7 +71,7 @@ class IpInfoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'v4' => 'v4', 'v6' => 'v6']; @@ -82,7 +80,7 @@ class IpInfoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'v4' => 'setV4', 'v6' => 'setV6']; @@ -91,7 +89,7 @@ class IpInfoResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'v4' => 'getV4', 'v6' => 'getV6']; @@ -100,7 +98,7 @@ class IpInfoResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -116,10 +114,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -133,20 +129,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -154,40 +146,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -197,7 +181,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -208,7 +192,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -230,7 +214,7 @@ public function getV4() * * @return $this */ - public function setV4($v4) + public function setV4($v4): self { $this->container['v4'] = $v4; @@ -254,7 +238,7 @@ public function getV6() * * @return $this */ - public function setV6($v6) + public function setV6($v6): self { $this->container['v6'] = $v6; @@ -265,11 +249,8 @@ public function setV6($v6) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -278,11 +259,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -293,8 +271,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -308,8 +285,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 1090ed91..f26007c1 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -42,17 +42,15 @@ class IpInfoResultV4 implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IpInfoResult_v4'; + protected static string $swaggerModelName = 'IpInfoResult_v4'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'address' => 'string', 'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', 'asn' => '\Fingerprint\ServerAPI\Model\ASN', @@ -63,7 +61,7 @@ class IpInfoResultV4 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'address' => 'ipv4', 'geolocation' => null, 'asn' => null, @@ -75,7 +73,7 @@ class IpInfoResultV4 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'address' => 'address', 'geolocation' => 'geolocation', 'asn' => 'asn', @@ -86,7 +84,7 @@ class IpInfoResultV4 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'address' => 'setAddress', 'geolocation' => 'setGeolocation', 'asn' => 'setAsn', @@ -97,7 +95,7 @@ class IpInfoResultV4 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'address' => 'getAddress', 'geolocation' => 'getGeolocation', 'asn' => 'getAsn', @@ -108,7 +106,7 @@ class IpInfoResultV4 implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -126,10 +124,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -143,20 +139,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -164,40 +156,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -207,7 +191,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -227,7 +211,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -249,7 +233,7 @@ public function getAddress() * * @return $this */ - public function setAddress($address) + public function setAddress($address): self { $this->container['address'] = $address; @@ -273,7 +257,7 @@ public function getGeolocation() * * @return $this */ - public function setGeolocation($geolocation) + public function setGeolocation($geolocation): self { $this->container['geolocation'] = $geolocation; @@ -297,7 +281,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn) + public function setAsn($asn): self { $this->container['asn'] = $asn; @@ -321,7 +305,7 @@ public function getDatacenter() * * @return $this */ - public function setDatacenter($datacenter) + public function setDatacenter($datacenter): self { $this->container['datacenter'] = $datacenter; @@ -332,11 +316,8 @@ public function setDatacenter($datacenter) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -345,11 +326,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -360,8 +338,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -375,8 +352,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index daa674c9..f4ce13f9 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -42,17 +42,15 @@ class IpInfoResultV6 implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'IpInfoResult_v6'; + protected static string $swaggerModelName = 'IpInfoResult_v6'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'address' => 'string', 'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', 'asn' => '\Fingerprint\ServerAPI\Model\ASN', @@ -63,7 +61,7 @@ class IpInfoResultV6 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'address' => 'ipv6', 'geolocation' => null, 'asn' => null, @@ -75,7 +73,7 @@ class IpInfoResultV6 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'address' => 'address', 'geolocation' => 'geolocation', 'asn' => 'asn', @@ -86,7 +84,7 @@ class IpInfoResultV6 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'address' => 'setAddress', 'geolocation' => 'setGeolocation', 'asn' => 'setAsn', @@ -97,7 +95,7 @@ class IpInfoResultV6 implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'address' => 'getAddress', 'geolocation' => 'getGeolocation', 'asn' => 'getAsn', @@ -108,7 +106,7 @@ class IpInfoResultV6 implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -126,10 +124,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -143,20 +139,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -164,40 +156,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -207,7 +191,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -227,7 +211,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -249,7 +233,7 @@ public function getAddress() * * @return $this */ - public function setAddress($address) + public function setAddress($address): self { $this->container['address'] = $address; @@ -273,7 +257,7 @@ public function getGeolocation() * * @return $this */ - public function setGeolocation($geolocation) + public function setGeolocation($geolocation): self { $this->container['geolocation'] = $geolocation; @@ -297,7 +281,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn) + public function setAsn($asn): self { $this->container['asn'] = $asn; @@ -321,7 +305,7 @@ public function getDatacenter() * * @return $this */ - public function setDatacenter($datacenter) + public function setDatacenter($datacenter): self { $this->container['datacenter'] = $datacenter; @@ -332,11 +316,8 @@ public function setDatacenter($datacenter) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -345,11 +326,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -360,8 +338,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -375,8 +352,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 6fe4347d..acee0e24 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -42,17 +42,15 @@ class JailbrokenResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'JailbrokenResult'; + protected static string $swaggerModelName = 'JailbrokenResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class JailbrokenResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class JailbrokenResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class JailbrokenResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class JailbrokenResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class JailbrokenResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/Location.php b/src/Model/Location.php index 7945b367..f544a828 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -42,17 +42,15 @@ class Location implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'Location'; + protected static string $swaggerModelName = 'Location'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'code' => 'string', 'name' => 'string']; @@ -61,7 +59,7 @@ class Location implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'code' => null, 'name' => null]; @@ -71,7 +69,7 @@ class Location implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'code' => 'code', 'name' => 'name']; @@ -80,7 +78,7 @@ class Location implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'code' => 'setCode', 'name' => 'setName']; @@ -89,7 +87,7 @@ class Location implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'code' => 'getCode', 'name' => 'getName']; @@ -98,7 +96,7 @@ class Location implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -215,7 +199,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -237,7 +221,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode($code): self { $this->container['code'] = $code; @@ -261,7 +245,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName($name): self { $this->container['name'] = $name; @@ -272,11 +256,8 @@ public function setName($name) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -285,11 +266,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -300,8 +278,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -315,8 +292,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index f45f1cce..e74b634a 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -42,17 +42,15 @@ class LocationSpoofingResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'LocationSpoofingResult'; + protected static string $swaggerModelName = 'LocationSpoofingResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class LocationSpoofingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class LocationSpoofingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class LocationSpoofingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class LocationSpoofingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class LocationSpoofingResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 7ccc9158..7e8b0608 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -42,17 +42,15 @@ class ManyRequestsResponse implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ManyRequestsResponse'; + protected static string $swaggerModelName = 'ManyRequestsResponse'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'error' => 'string']; /** @@ -60,7 +58,7 @@ class ManyRequestsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'error' => null]; /** @@ -69,7 +67,7 @@ class ManyRequestsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'error' => 'error']; /** @@ -77,7 +75,7 @@ class ManyRequestsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'error' => 'setError']; /** @@ -85,7 +83,7 @@ class ManyRequestsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'error' => 'getError']; /** @@ -93,7 +91,7 @@ class ManyRequestsResponse implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -239,11 +223,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index 90f305b9..b0867854 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -42,17 +42,15 @@ class PrivacySettingsResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'PrivacySettingsResult'; + protected static string $swaggerModelName = 'PrivacySettingsResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class PrivacySettingsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class PrivacySettingsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class PrivacySettingsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class PrivacySettingsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class PrivacySettingsResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 84c226fd..c5f19ab3 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -45,17 +45,15 @@ class ProductError implements ModelInterface, \ArrayAccess /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ProductError'; + protected static string $swaggerModelName = 'ProductError'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'code' => 'string', 'message' => 'string']; @@ -64,7 +62,7 @@ class ProductError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'code' => null, 'message' => null]; @@ -74,7 +72,7 @@ class ProductError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'code' => 'code', 'message' => 'message']; @@ -83,7 +81,7 @@ class ProductError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'code' => 'setCode', 'message' => 'setMessage']; @@ -92,7 +90,7 @@ class ProductError implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'code' => 'getCode', 'message' => 'getMessage']; @@ -101,7 +99,7 @@ class ProductError implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -117,10 +115,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -134,20 +130,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -155,40 +147,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -198,7 +182,7 @@ public function getModelName() * * @return string[] */ - public function getCodeAllowableValues() + public function getCodeAllowableValues(): array { return [ self::CODE_TOO_MANY_REQUESTS, @@ -210,7 +194,7 @@ public function getCodeAllowableValues() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -238,7 +222,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -260,7 +244,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode($code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -293,7 +277,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message) + public function setMessage($message): self { $this->container['message'] = $message; @@ -304,11 +288,8 @@ public function setMessage($message) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -317,11 +298,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -332,8 +310,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -347,8 +324,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index eaecc677..8a98ff3e 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -44,17 +44,15 @@ class ProductsResponse implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ProductsResponse'; + protected static string $swaggerModelName = 'ProductsResponse'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'identification' => '\Fingerprint\ServerAPI\Model\ProductsResponseIdentification', 'botd' => '\Fingerprint\ServerAPI\Model\ProductsResponseBotd', 'ip_info' => '\Fingerprint\ServerAPI\Model\SignalResponseIpInfo', @@ -82,7 +80,7 @@ class ProductsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'identification' => null, 'botd' => null, 'ip_info' => null, @@ -111,7 +109,7 @@ class ProductsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'identification' => 'identification', 'botd' => 'botd', 'ip_info' => 'ipInfo', @@ -139,7 +137,7 @@ class ProductsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'identification' => 'setIdentification', 'botd' => 'setBotd', 'ip_info' => 'setIpInfo', @@ -167,7 +165,7 @@ class ProductsResponse implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'identification' => 'getIdentification', 'botd' => 'getBotd', 'ip_info' => 'getIpInfo', @@ -195,7 +193,7 @@ class ProductsResponse implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -230,10 +228,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -247,20 +243,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -268,40 +260,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -311,7 +295,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -322,7 +306,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -344,7 +328,7 @@ public function getIdentification() * * @return $this */ - public function setIdentification($identification) + public function setIdentification($identification): self { $this->container['identification'] = $identification; @@ -368,7 +352,7 @@ public function getBotd() * * @return $this */ - public function setBotd($botd) + public function setBotd($botd): self { $this->container['botd'] = $botd; @@ -392,7 +376,7 @@ public function getIpInfo() * * @return $this */ - public function setIpInfo($ip_info) + public function setIpInfo($ip_info): self { $this->container['ip_info'] = $ip_info; @@ -416,7 +400,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito($incognito): self { $this->container['incognito'] = $incognito; @@ -440,7 +424,7 @@ public function getRootApps() * * @return $this */ - public function setRootApps($root_apps) + public function setRootApps($root_apps): self { $this->container['root_apps'] = $root_apps; @@ -464,7 +448,7 @@ public function getEmulator() * * @return $this */ - public function setEmulator($emulator) + public function setEmulator($emulator): self { $this->container['emulator'] = $emulator; @@ -488,7 +472,7 @@ public function getClonedApp() * * @return $this */ - public function setClonedApp($cloned_app) + public function setClonedApp($cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -512,7 +496,7 @@ public function getFactoryReset() * * @return $this */ - public function setFactoryReset($factory_reset) + public function setFactoryReset($factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -536,7 +520,7 @@ public function getJailbroken() * * @return $this */ - public function setJailbroken($jailbroken) + public function setJailbroken($jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -560,7 +544,7 @@ public function getFrida() * * @return $this */ - public function setFrida($frida) + public function setFrida($frida): self { $this->container['frida'] = $frida; @@ -584,7 +568,7 @@ public function getIpBlocklist() * * @return $this */ - public function setIpBlocklist($ip_blocklist) + public function setIpBlocklist($ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -608,7 +592,7 @@ public function getTor() * * @return $this */ - public function setTor($tor) + public function setTor($tor): self { $this->container['tor'] = $tor; @@ -632,7 +616,7 @@ public function getPrivacySettings() * * @return $this */ - public function setPrivacySettings($privacy_settings) + public function setPrivacySettings($privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -656,7 +640,7 @@ public function getVirtualMachine() * * @return $this */ - public function setVirtualMachine($virtual_machine) + public function setVirtualMachine($virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -680,7 +664,7 @@ public function getVpn() * * @return $this */ - public function setVpn($vpn) + public function setVpn($vpn): self { $this->container['vpn'] = $vpn; @@ -704,7 +688,7 @@ public function getProxy() * * @return $this */ - public function setProxy($proxy) + public function setProxy($proxy): self { $this->container['proxy'] = $proxy; @@ -728,7 +712,7 @@ public function getTampering() * * @return $this */ - public function setTampering($tampering) + public function setTampering($tampering): self { $this->container['tampering'] = $tampering; @@ -752,7 +736,7 @@ public function getHighActivity() * * @return $this */ - public function setHighActivity($high_activity) + public function setHighActivity($high_activity): self { $this->container['high_activity'] = $high_activity; @@ -776,7 +760,7 @@ public function getLocationSpoofing() * * @return $this */ - public function setLocationSpoofing($location_spoofing) + public function setLocationSpoofing($location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -800,7 +784,7 @@ public function getSuspectScore() * * @return $this */ - public function setSuspectScore($suspect_score) + public function setSuspectScore($suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -824,7 +808,7 @@ public function getRawDeviceAttributes() * * @return $this */ - public function setRawDeviceAttributes($raw_device_attributes) + public function setRawDeviceAttributes($raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -835,11 +819,8 @@ public function setRawDeviceAttributes($raw_device_attributes) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -848,11 +829,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -863,8 +841,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -878,8 +855,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 3897e44a..1a5cca7a 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -42,17 +42,15 @@ class ProductsResponseBotd implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ProductsResponseBotd'; + protected static string $swaggerModelName = 'ProductsResponseBotd'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\BotdResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class ProductsResponseBotd implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class ProductsResponseBotd implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class ProductsResponseBotd implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class ProductsResponseBotd implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class ProductsResponseBotd implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index 11480f1c..47ef4eab 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -42,17 +42,15 @@ class ProductsResponseIdentification implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ProductsResponseIdentification'; + protected static string $swaggerModelName = 'ProductsResponseIdentification'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData', 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; @@ -61,7 +59,7 @@ class ProductsResponseIdentification implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class ProductsResponseIdentification implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class ProductsResponseIdentification implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class ProductsResponseIdentification implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class ProductsResponseIdentification implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 179e9557..825798c3 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -42,17 +42,15 @@ class ProductsResponseIdentificationData implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ProductsResponseIdentificationData'; + protected static string $swaggerModelName = 'ProductsResponseIdentificationData'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'request_id' => 'string', 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', 'incognito' => 'bool', @@ -74,7 +72,7 @@ class ProductsResponseIdentificationData implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'request_id' => null, 'browser_details' => null, 'incognito' => null, @@ -97,7 +95,7 @@ class ProductsResponseIdentificationData implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'request_id' => 'requestId', 'browser_details' => 'browserDetails', 'incognito' => 'incognito', @@ -119,7 +117,7 @@ class ProductsResponseIdentificationData implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'request_id' => 'setRequestId', 'browser_details' => 'setBrowserDetails', 'incognito' => 'setIncognito', @@ -141,7 +139,7 @@ class ProductsResponseIdentificationData implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'request_id' => 'getRequestId', 'browser_details' => 'getBrowserDetails', 'incognito' => 'getIncognito', @@ -163,7 +161,7 @@ class ProductsResponseIdentificationData implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -192,10 +190,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -209,20 +205,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -230,40 +222,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -273,7 +257,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -323,7 +307,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -345,7 +329,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId($request_id): self { $this->container['request_id'] = $request_id; @@ -369,7 +353,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details) + public function setBrowserDetails($browser_details): self { $this->container['browser_details'] = $browser_details; @@ -393,7 +377,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito($incognito): self { $this->container['incognito'] = $incognito; @@ -417,7 +401,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp($ip): self { $this->container['ip'] = $ip; @@ -441,7 +425,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location) + public function setIpLocation($ip_location): self { $this->container['ip_location'] = $ip_location; @@ -465,7 +449,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp($timestamp): self { $this->container['timestamp'] = $timestamp; @@ -489,7 +473,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime($time): self { $this->container['time'] = $time; @@ -513,7 +497,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl($url): self { $this->container['url'] = $url; @@ -537,7 +521,7 @@ public function getTag() * * @return $this */ - public function setTag($tag) + public function setTag($tag): self { $this->container['tag'] = $tag; @@ -561,7 +545,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id) + public function setLinkedId($linked_id): self { $this->container['linked_id'] = $linked_id; @@ -585,7 +569,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence) + public function setConfidence($confidence): self { $this->container['confidence'] = $confidence; @@ -609,7 +593,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found) + public function setVisitorFound($visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -633,7 +617,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at) + public function setFirstSeenAt($first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -657,7 +641,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at) + public function setLastSeenAt($last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -681,7 +665,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id) + public function setVisitorId($visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -692,11 +676,8 @@ public function setVisitorId($visitor_id) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -705,11 +686,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -720,8 +698,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -735,8 +712,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 68db9d14..7f55eabd 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -42,17 +42,15 @@ class ProxyResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ProxyResult'; + protected static string $swaggerModelName = 'ProxyResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class ProxyResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class ProxyResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class ProxyResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class ProxyResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class ProxyResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 18c9ecd7..1e560cb3 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -44,17 +44,15 @@ class RawDeviceAttributesResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'RawDeviceAttributesResult'; + protected static string $swaggerModelName = 'RawDeviceAttributesResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ ]; /** @@ -62,7 +60,7 @@ class RawDeviceAttributesResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ ]; /** @@ -71,7 +69,7 @@ class RawDeviceAttributesResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ ]; /** @@ -79,7 +77,7 @@ class RawDeviceAttributesResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ ]; /** @@ -87,7 +85,7 @@ class RawDeviceAttributesResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ ]; /** @@ -95,7 +93,7 @@ class RawDeviceAttributesResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -107,10 +105,8 @@ public function __construct(?array $data = null) {} /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -124,20 +120,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -145,40 +137,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -188,7 +172,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -199,7 +183,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -208,11 +192,8 @@ public function valid() * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -221,11 +202,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -236,8 +214,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -251,8 +228,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/Response.php b/src/Model/Response.php index 1bb0e2e8..ba28cde0 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -44,17 +44,15 @@ class Response implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'Response'; + protected static string $swaggerModelName = 'Response'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'visitor_id' => 'string', 'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', 'last_timestamp' => 'int', @@ -65,7 +63,7 @@ class Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'visitor_id' => null, 'visits' => null, 'last_timestamp' => 'int64', @@ -77,7 +75,7 @@ class Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'visitor_id' => 'visitorId', 'visits' => 'visits', 'last_timestamp' => 'lastTimestamp', @@ -88,7 +86,7 @@ class Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'visitor_id' => 'setVisitorId', 'visits' => 'setVisits', 'last_timestamp' => 'setLastTimestamp', @@ -99,7 +97,7 @@ class Response implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'visitor_id' => 'getVisitorId', 'visits' => 'getVisits', 'last_timestamp' => 'getLastTimestamp', @@ -110,7 +108,7 @@ class Response implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -128,10 +126,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -145,20 +141,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -166,40 +158,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -209,7 +193,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -229,7 +213,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -251,7 +235,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id) + public function setVisitorId($visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -275,7 +259,7 @@ public function getVisits() * * @return $this */ - public function setVisits($visits) + public function setVisits($visits): self { $this->container['visits'] = $visits; @@ -299,7 +283,7 @@ public function getLastTimestamp() * * @return $this */ - public function setLastTimestamp($last_timestamp) + public function setLastTimestamp($last_timestamp): self { $this->container['last_timestamp'] = $last_timestamp; @@ -323,7 +307,7 @@ public function getPaginationKey() * * @return $this */ - public function setPaginationKey($pagination_key) + public function setPaginationKey($pagination_key): self { $this->container['pagination_key'] = $pagination_key; @@ -334,11 +318,8 @@ public function setPaginationKey($pagination_key) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -347,11 +328,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -362,8 +340,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -377,8 +354,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 36789502..883abe97 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -42,17 +42,15 @@ class ResponseVisits implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'ResponseVisits'; + protected static string $swaggerModelName = 'ResponseVisits'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'request_id' => 'string', 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', 'incognito' => 'bool', @@ -73,7 +71,7 @@ class ResponseVisits implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'request_id' => null, 'browser_details' => null, 'incognito' => null, @@ -95,7 +93,7 @@ class ResponseVisits implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'request_id' => 'requestId', 'browser_details' => 'browserDetails', 'incognito' => 'incognito', @@ -116,7 +114,7 @@ class ResponseVisits implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'request_id' => 'setRequestId', 'browser_details' => 'setBrowserDetails', 'incognito' => 'setIncognito', @@ -137,7 +135,7 @@ class ResponseVisits implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'request_id' => 'getRequestId', 'browser_details' => 'getBrowserDetails', 'incognito' => 'getIncognito', @@ -158,7 +156,7 @@ class ResponseVisits implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -186,10 +184,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -203,20 +199,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -224,40 +216,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -267,7 +251,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -314,7 +298,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -336,7 +320,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId($request_id): self { $this->container['request_id'] = $request_id; @@ -360,7 +344,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details) + public function setBrowserDetails($browser_details): self { $this->container['browser_details'] = $browser_details; @@ -384,7 +368,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito($incognito): self { $this->container['incognito'] = $incognito; @@ -408,7 +392,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp($ip): self { $this->container['ip'] = $ip; @@ -432,7 +416,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location) + public function setIpLocation($ip_location): self { $this->container['ip_location'] = $ip_location; @@ -456,7 +440,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp($timestamp): self { $this->container['timestamp'] = $timestamp; @@ -480,7 +464,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime($time): self { $this->container['time'] = $time; @@ -504,7 +488,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl($url): self { $this->container['url'] = $url; @@ -528,7 +512,7 @@ public function getTag() * * @return $this */ - public function setTag($tag) + public function setTag($tag): self { $this->container['tag'] = $tag; @@ -552,7 +536,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id) + public function setLinkedId($linked_id): self { $this->container['linked_id'] = $linked_id; @@ -576,7 +560,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence) + public function setConfidence($confidence): self { $this->container['confidence'] = $confidence; @@ -600,7 +584,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found) + public function setVisitorFound($visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -624,7 +608,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at) + public function setFirstSeenAt($first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -648,7 +632,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at) + public function setLastSeenAt($last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -659,11 +643,8 @@ public function setLastSeenAt($last_seen_at) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -672,11 +653,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -687,8 +665,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -702,8 +679,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index b886abf7..dc3a61c4 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -42,17 +42,15 @@ class RootAppsResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'RootAppsResult'; + protected static string $swaggerModelName = 'RootAppsResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class RootAppsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class RootAppsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class RootAppsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class RootAppsResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class RootAppsResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 0e26bd5a..9084fead 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -42,17 +42,15 @@ class SeenAt implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SeenAt'; + protected static string $swaggerModelName = 'SeenAt'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'global' => '\DateTime', 'subscription' => '\DateTime']; @@ -61,7 +59,7 @@ class SeenAt implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'global' => 'date-time', 'subscription' => 'date-time']; @@ -71,7 +69,7 @@ class SeenAt implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'global' => 'global', 'subscription' => 'subscription']; @@ -80,7 +78,7 @@ class SeenAt implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'global' => 'setGlobal', 'subscription' => 'setSubscription']; @@ -89,7 +87,7 @@ class SeenAt implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'global' => 'getGlobal', 'subscription' => 'getSubscription']; @@ -98,7 +96,7 @@ class SeenAt implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -215,7 +199,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -237,7 +221,7 @@ public function getGlobal() * * @return $this */ - public function setGlobal($global) + public function setGlobal($global): self { $this->container['global'] = $global; @@ -261,7 +245,7 @@ public function getSubscription() * * @return $this */ - public function setSubscription($subscription) + public function setSubscription($subscription): self { $this->container['subscription'] = $subscription; @@ -272,11 +256,8 @@ public function setSubscription($subscription) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -285,11 +266,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -300,8 +278,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -315,8 +292,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index bab0095a..95f27ffe 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -42,17 +42,15 @@ class SignalResponseClonedApp implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseClonedApp'; + protected static string $swaggerModelName = 'SignalResponseClonedApp'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\ClonedAppResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseClonedApp implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseClonedApp implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseClonedApp implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseClonedApp implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseClonedApp implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 3a985b4b..22fe1763 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -42,17 +42,15 @@ class SignalResponseEmulator implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseEmulator'; + protected static string $swaggerModelName = 'SignalResponseEmulator'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\EmulatorResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseEmulator implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseEmulator implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseEmulator implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseEmulator implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseEmulator implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 773d3c59..6be91f8f 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -42,17 +42,15 @@ class SignalResponseFactoryReset implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseFactoryReset'; + protected static string $swaggerModelName = 'SignalResponseFactoryReset'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\FactoryResetResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseFactoryReset implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseFactoryReset implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseFactoryReset implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseFactoryReset implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseFactoryReset implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index 944505f5..fa3d624a 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -42,17 +42,15 @@ class SignalResponseFrida implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseFrida'; + protected static string $swaggerModelName = 'SignalResponseFrida'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\FridaResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseFrida implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseFrida implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseFrida implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseFrida implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseFrida implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 8f59aac2..3efa9c30 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -42,17 +42,15 @@ class SignalResponseHighActivity implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseHighActivity'; + protected static string $swaggerModelName = 'SignalResponseHighActivity'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\HighActivityResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseHighActivity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseHighActivity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseHighActivity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseHighActivity implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseHighActivity implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 402abf6d..76d265e1 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -42,17 +42,15 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseIncognito'; + protected static string $swaggerModelName = 'SignalResponseIncognito'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\IncognitoResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseIncognito implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index 0106c05a..7716218d 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -42,17 +42,15 @@ class SignalResponseIpBlocklist implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseIpBlocklist'; + protected static string $swaggerModelName = 'SignalResponseIpBlocklist'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\IpBlockListResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseIpBlocklist implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseIpBlocklist implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseIpBlocklist implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseIpBlocklist implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseIpBlocklist implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 360fa531..9fad6670 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -42,17 +42,15 @@ class SignalResponseIpInfo implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseIpInfo'; + protected static string $swaggerModelName = 'SignalResponseIpInfo'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\IpInfoResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseIpInfo implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseIpInfo implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseIpInfo implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseIpInfo implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseIpInfo implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index 287bd034..64882ebe 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -42,17 +42,15 @@ class SignalResponseJailbroken implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseJailbroken'; + protected static string $swaggerModelName = 'SignalResponseJailbroken'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\JailbrokenResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseJailbroken implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseJailbroken implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseJailbroken implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseJailbroken implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseJailbroken implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index 8e84399e..c09e19a8 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -42,17 +42,15 @@ class SignalResponseLocationSpoofing implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseLocationSpoofing'; + protected static string $swaggerModelName = 'SignalResponseLocationSpoofing'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseLocationSpoofing implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseLocationSpoofing implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseLocationSpoofing implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseLocationSpoofing implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseLocationSpoofing implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index eaa80457..79378ceb 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -42,17 +42,15 @@ class SignalResponsePrivacySettings implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponsePrivacySettings'; + protected static string $swaggerModelName = 'SignalResponsePrivacySettings'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponsePrivacySettings implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponsePrivacySettings implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponsePrivacySettings implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponsePrivacySettings implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponsePrivacySettings implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index 2a86019e..779c7d5e 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -42,17 +42,15 @@ class SignalResponseProxy implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseProxy'; + protected static string $swaggerModelName = 'SignalResponseProxy'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\ProxyResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseProxy implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseProxy implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseProxy implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseProxy implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseProxy implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 18a15574..85457227 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -42,17 +42,15 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseRawDeviceAttributes'; + protected static string $swaggerModelName = 'SignalResponseRawDeviceAttributes'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseRawDeviceAttributes implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index bfaacc84..a89406e5 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -42,17 +42,15 @@ class SignalResponseRootApps implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseRootApps'; + protected static string $swaggerModelName = 'SignalResponseRootApps'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\RootAppsResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseRootApps implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseRootApps implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseRootApps implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseRootApps implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseRootApps implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index 470c7989..8497b239 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -42,17 +42,15 @@ class SignalResponseSuspectScore implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseSuspectScore'; + protected static string $swaggerModelName = 'SignalResponseSuspectScore'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseSuspectScore implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseSuspectScore implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseSuspectScore implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseSuspectScore implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseSuspectScore implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 4c529e74..37b2b0cb 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -42,17 +42,15 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseTampering'; + protected static string $swaggerModelName = 'SignalResponseTampering'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\TamperingResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseTampering implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 70b27080..7bfacdff 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -42,17 +42,15 @@ class SignalResponseTor implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseTor'; + protected static string $swaggerModelName = 'SignalResponseTor'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\TorResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseTor implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseTor implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseTor implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseTor implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseTor implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index ca6c2e45..9fa479e9 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -42,17 +42,15 @@ class SignalResponseVirtualMachine implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseVirtualMachine'; + protected static string $swaggerModelName = 'SignalResponseVirtualMachine'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\VirtualMachineResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseVirtualMachine implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseVirtualMachine implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseVirtualMachine implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseVirtualMachine implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseVirtualMachine implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index cb22f0e4..76eb851d 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -42,17 +42,15 @@ class SignalResponseVpn implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SignalResponseVpn'; + protected static string $swaggerModelName = 'SignalResponseVpn'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'data' => '\Fingerprint\ServerAPI\Model\VpnResult', 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; @@ -61,7 +59,7 @@ class SignalResponseVpn implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'data' => null, 'error' => null]; @@ -71,7 +69,7 @@ class SignalResponseVpn implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'data' => 'data', 'error' => 'error']; @@ -80,7 +78,7 @@ class SignalResponseVpn implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'data' => 'setData', 'error' => 'setError']; @@ -89,7 +87,7 @@ class SignalResponseVpn implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'data' => 'getData', 'error' => 'getError']; @@ -98,7 +96,7 @@ class SignalResponseVpn implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getData() * * @return $this */ - public function setData($data) + public function setData($data): self { $this->container['data'] = $data; @@ -252,7 +236,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError($error): self { $this->container['error'] = $error; @@ -263,11 +247,8 @@ public function setError($error) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index 616a1e6d..78887fc4 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -42,17 +42,15 @@ class Subdivision implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'Subdivision'; + protected static string $swaggerModelName = 'Subdivision'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'iso_code' => 'string', 'name' => 'string']; @@ -61,7 +59,7 @@ class Subdivision implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'iso_code' => null, 'name' => null]; @@ -71,7 +69,7 @@ class Subdivision implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'iso_code' => 'isoCode', 'name' => 'name']; @@ -80,7 +78,7 @@ class Subdivision implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'iso_code' => 'setIsoCode', 'name' => 'setName']; @@ -89,7 +87,7 @@ class Subdivision implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'iso_code' => 'getIsoCode', 'name' => 'getName']; @@ -98,7 +96,7 @@ class Subdivision implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { return []; } @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getIsoCode() * * @return $this */ - public function setIsoCode($iso_code) + public function setIsoCode($iso_code): self { $this->container['iso_code'] = $iso_code; @@ -252,7 +236,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName($name): self { $this->container['name'] = $name; @@ -263,11 +247,8 @@ public function setName($name) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -276,11 +257,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -291,8 +269,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -306,8 +283,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index 1b55d36c..78a40f5d 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -42,17 +42,15 @@ class SuspectScoreResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'SuspectScoreResult'; + protected static string $swaggerModelName = 'SuspectScoreResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'int']; /** @@ -60,7 +58,7 @@ class SuspectScoreResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class SuspectScoreResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class SuspectScoreResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class SuspectScoreResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class SuspectScoreResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index c48b0f18..74a2ac26 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -42,17 +42,15 @@ class TamperingResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'TamperingResult'; + protected static string $swaggerModelName = 'TamperingResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool', 'anomaly_score' => 'float']; @@ -61,7 +59,7 @@ class TamperingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null, 'anomaly_score' => null]; @@ -71,7 +69,7 @@ class TamperingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result', 'anomaly_score' => 'anomalyScore']; @@ -80,7 +78,7 @@ class TamperingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult', 'anomaly_score' => 'setAnomalyScore']; @@ -89,7 +87,7 @@ class TamperingResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult', 'anomaly_score' => 'getAnomalyScore']; @@ -98,7 +96,7 @@ class TamperingResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -114,10 +112,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -131,20 +127,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -152,40 +144,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -195,7 +179,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -215,7 +199,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -237,7 +221,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -261,7 +245,7 @@ public function getAnomalyScore() * * @return $this */ - public function setAnomalyScore($anomaly_score) + public function setAnomalyScore($anomaly_score): self { $this->container['anomaly_score'] = $anomaly_score; @@ -272,11 +256,8 @@ public function setAnomalyScore($anomaly_score) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -285,11 +266,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -300,8 +278,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -315,8 +292,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index 4a5cd84f..1f1fdfd0 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -42,17 +42,15 @@ class TorResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'TorResult'; + protected static string $swaggerModelName = 'TorResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class TorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class TorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class TorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class TorResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class TorResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index fda99fb1..9d457f1a 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -42,17 +42,15 @@ class VirtualMachineResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'VirtualMachineResult'; + protected static string $swaggerModelName = 'VirtualMachineResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool']; /** @@ -60,7 +58,7 @@ class VirtualMachineResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null]; /** @@ -69,7 +67,7 @@ class VirtualMachineResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result']; /** @@ -77,7 +75,7 @@ class VirtualMachineResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult']; /** @@ -85,7 +83,7 @@ class VirtualMachineResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult']; /** @@ -93,7 +91,7 @@ class VirtualMachineResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -108,10 +106,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -125,20 +121,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -146,40 +138,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -189,7 +173,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -206,7 +190,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -228,7 +212,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -239,11 +223,8 @@ public function setResult($result) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -252,11 +233,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -267,8 +245,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -282,8 +259,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/Visit.php b/src/Model/Visit.php index f308038d..60889bbe 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -42,17 +42,15 @@ class Visit implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'Visit'; + protected static string $swaggerModelName = 'Visit'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'request_id' => 'string', 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', 'incognito' => 'bool', @@ -73,7 +71,7 @@ class Visit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'request_id' => null, 'browser_details' => null, 'incognito' => null, @@ -95,7 +93,7 @@ class Visit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'request_id' => 'requestId', 'browser_details' => 'browserDetails', 'incognito' => 'incognito', @@ -116,7 +114,7 @@ class Visit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'request_id' => 'setRequestId', 'browser_details' => 'setBrowserDetails', 'incognito' => 'setIncognito', @@ -137,7 +135,7 @@ class Visit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'request_id' => 'getRequestId', 'browser_details' => 'getBrowserDetails', 'incognito' => 'getIncognito', @@ -158,7 +156,7 @@ class Visit implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -186,10 +184,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -203,20 +199,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -224,40 +216,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -267,7 +251,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -314,7 +298,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -336,7 +320,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId($request_id): self { $this->container['request_id'] = $request_id; @@ -360,7 +344,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details) + public function setBrowserDetails($browser_details): self { $this->container['browser_details'] = $browser_details; @@ -384,7 +368,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito($incognito): self { $this->container['incognito'] = $incognito; @@ -408,7 +392,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp($ip): self { $this->container['ip'] = $ip; @@ -432,7 +416,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location) + public function setIpLocation($ip_location): self { $this->container['ip_location'] = $ip_location; @@ -456,7 +440,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp($timestamp): self { $this->container['timestamp'] = $timestamp; @@ -480,7 +464,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime($time): self { $this->container['time'] = $time; @@ -504,7 +488,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl($url): self { $this->container['url'] = $url; @@ -528,7 +512,7 @@ public function getTag() * * @return $this */ - public function setTag($tag) + public function setTag($tag): self { $this->container['tag'] = $tag; @@ -552,7 +536,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id) + public function setLinkedId($linked_id): self { $this->container['linked_id'] = $linked_id; @@ -576,7 +560,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence) + public function setConfidence($confidence): self { $this->container['confidence'] = $confidence; @@ -600,7 +584,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found) + public function setVisitorFound($visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -624,7 +608,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at) + public function setFirstSeenAt($first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -648,7 +632,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at) + public function setLastSeenAt($last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -659,11 +643,8 @@ public function setLastSeenAt($last_seen_at) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -672,11 +653,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -687,8 +665,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -702,8 +679,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index b318d1e7..aaeeecfe 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -42,17 +42,15 @@ class VpnResult implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'VpnResult'; + protected static string $swaggerModelName = 'VpnResult'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'result' => 'bool', 'origin_timezone' => 'string', 'origin_country' => 'string', @@ -63,7 +61,7 @@ class VpnResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'result' => null, 'origin_timezone' => null, 'origin_country' => null, @@ -75,7 +73,7 @@ class VpnResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'result' => 'result', 'origin_timezone' => 'originTimezone', 'origin_country' => 'originCountry', @@ -86,7 +84,7 @@ class VpnResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'result' => 'setResult', 'origin_timezone' => 'setOriginTimezone', 'origin_country' => 'setOriginCountry', @@ -97,7 +95,7 @@ class VpnResult implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'result' => 'getResult', 'origin_timezone' => 'getOriginTimezone', 'origin_country' => 'getOriginCountry', @@ -108,7 +106,7 @@ class VpnResult implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -126,10 +124,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -143,20 +139,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -164,40 +156,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -207,7 +191,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -230,7 +214,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -252,7 +236,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult($result): self { $this->container['result'] = $result; @@ -276,7 +260,7 @@ public function getOriginTimezone() * * @return $this */ - public function setOriginTimezone($origin_timezone) + public function setOriginTimezone($origin_timezone): self { $this->container['origin_timezone'] = $origin_timezone; @@ -300,7 +284,7 @@ public function getOriginCountry() * * @return $this */ - public function setOriginCountry($origin_country) + public function setOriginCountry($origin_country): self { $this->container['origin_country'] = $origin_country; @@ -324,7 +308,7 @@ public function getMethods() * * @return $this */ - public function setMethods($methods) + public function setMethods($methods): self { $this->container['methods'] = $methods; @@ -335,11 +319,8 @@ public function setMethods($methods) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -348,11 +329,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -363,8 +341,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -378,8 +355,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 50cb6c9a..7b341fec 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -42,17 +42,15 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'VpnResult_methods'; + protected static string $swaggerModelName = 'VpnResult_methods'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'timezone_mismatch' => 'bool', 'public_vpn' => 'bool', 'auxiliary_mobile' => 'bool']; @@ -62,7 +60,7 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'timezone_mismatch' => null, 'public_vpn' => null, 'auxiliary_mobile' => null]; @@ -73,7 +71,7 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'timezone_mismatch' => 'timezoneMismatch', 'public_vpn' => 'publicVPN', 'auxiliary_mobile' => 'auxiliaryMobile']; @@ -83,7 +81,7 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'timezone_mismatch' => 'setTimezoneMismatch', 'public_vpn' => 'setPublicVpn', 'auxiliary_mobile' => 'setAuxiliaryMobile']; @@ -93,7 +91,7 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'timezone_mismatch' => 'getTimezoneMismatch', 'public_vpn' => 'getPublicVpn', 'auxiliary_mobile' => 'getAuxiliaryMobile']; @@ -103,7 +101,7 @@ class VpnResultMethods implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -120,10 +118,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -137,20 +133,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -158,40 +150,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -201,7 +185,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -224,7 +208,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -246,7 +230,7 @@ public function getTimezoneMismatch() * * @return $this */ - public function setTimezoneMismatch($timezone_mismatch) + public function setTimezoneMismatch($timezone_mismatch): self { $this->container['timezone_mismatch'] = $timezone_mismatch; @@ -270,7 +254,7 @@ public function getPublicVpn() * * @return $this */ - public function setPublicVpn($public_vpn) + public function setPublicVpn($public_vpn): self { $this->container['public_vpn'] = $public_vpn; @@ -294,7 +278,7 @@ public function getAuxiliaryMobile() * * @return $this */ - public function setAuxiliaryMobile($auxiliary_mobile) + public function setAuxiliaryMobile($auxiliary_mobile): self { $this->container['auxiliary_mobile'] = $auxiliary_mobile; @@ -305,11 +289,8 @@ public function setAuxiliaryMobile($auxiliary_mobile) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -318,11 +299,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -333,8 +311,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -348,8 +325,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 843ba581..57e00ed5 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -42,17 +42,15 @@ class WebhookVisit implements ModelInterface, \ArrayAccess { /** * The original name of the model. - * - * @var string */ - protected static $swaggerModelName = 'WebhookVisit'; + protected static string $swaggerModelName = 'WebhookVisit'; /** * Array of property to type mappings. Used for (de)serialization. * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ 'visitor_id' => 'string', 'client_referrer' => 'string', 'user_agent' => 'string', @@ -95,7 +93,7 @@ class WebhookVisit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ 'visitor_id' => null, 'client_referrer' => null, 'user_agent' => null, @@ -139,7 +137,7 @@ class WebhookVisit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ 'visitor_id' => 'visitorId', 'client_referrer' => 'clientReferrer', 'user_agent' => 'userAgent', @@ -182,7 +180,7 @@ class WebhookVisit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ 'visitor_id' => 'setVisitorId', 'client_referrer' => 'setClientReferrer', 'user_agent' => 'setUserAgent', @@ -225,7 +223,7 @@ class WebhookVisit implements ModelInterface, \ArrayAccess * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ 'visitor_id' => 'getVisitorId', 'client_referrer' => 'getClientReferrer', 'user_agent' => 'getUserAgent', @@ -268,7 +266,7 @@ class WebhookVisit implements ModelInterface, \ArrayAccess * * @var mixed[] */ - protected $container = []; + protected array $container = []; /** * Constructor. @@ -318,10 +316,8 @@ public function __construct(?array $data = null) /** * Gets the string presentation of the object. - * - * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( @@ -335,20 +331,16 @@ public function __toString() /** * Array of property to type mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization. - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats; } @@ -356,40 +348,32 @@ public static function swaggerFormats() /** * Array of attributes where the key is the local name, * and the value is the original name. - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses). - * - * @return array */ - public static function setters() + public static function setters(): array { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests). - * - * @return array */ - public static function getters() + public static function getters(): array { return self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -399,7 +383,7 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { $invalidProperties = []; @@ -449,7 +433,7 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } @@ -471,7 +455,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id) + public function setVisitorId($visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -495,7 +479,7 @@ public function getClientReferrer() * * @return $this */ - public function setClientReferrer($client_referrer) + public function setClientReferrer($client_referrer): self { $this->container['client_referrer'] = $client_referrer; @@ -519,7 +503,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent) + public function setUserAgent($user_agent): self { $this->container['user_agent'] = $user_agent; @@ -543,7 +527,7 @@ public function getBot() * * @return $this */ - public function setBot($bot) + public function setBot($bot): self { $this->container['bot'] = $bot; @@ -567,7 +551,7 @@ public function getIpInfo() * * @return $this */ - public function setIpInfo($ip_info) + public function setIpInfo($ip_info): self { $this->container['ip_info'] = $ip_info; @@ -591,7 +575,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito($incognito): self { $this->container['incognito'] = $incognito; @@ -615,7 +599,7 @@ public function getRootApps() * * @return $this */ - public function setRootApps($root_apps) + public function setRootApps($root_apps): self { $this->container['root_apps'] = $root_apps; @@ -639,7 +623,7 @@ public function getEmulator() * * @return $this */ - public function setEmulator($emulator) + public function setEmulator($emulator): self { $this->container['emulator'] = $emulator; @@ -663,7 +647,7 @@ public function getClonedApp() * * @return $this */ - public function setClonedApp($cloned_app) + public function setClonedApp($cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -687,7 +671,7 @@ public function getFactoryReset() * * @return $this */ - public function setFactoryReset($factory_reset) + public function setFactoryReset($factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -711,7 +695,7 @@ public function getJailbroken() * * @return $this */ - public function setJailbroken($jailbroken) + public function setJailbroken($jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -735,7 +719,7 @@ public function getFrida() * * @return $this */ - public function setFrida($frida) + public function setFrida($frida): self { $this->container['frida'] = $frida; @@ -759,7 +743,7 @@ public function getIpBlocklist() * * @return $this */ - public function setIpBlocklist($ip_blocklist) + public function setIpBlocklist($ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -783,7 +767,7 @@ public function getTor() * * @return $this */ - public function setTor($tor) + public function setTor($tor): self { $this->container['tor'] = $tor; @@ -807,7 +791,7 @@ public function getPrivacySettings() * * @return $this */ - public function setPrivacySettings($privacy_settings) + public function setPrivacySettings($privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -831,7 +815,7 @@ public function getVirtualMachine() * * @return $this */ - public function setVirtualMachine($virtual_machine) + public function setVirtualMachine($virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -855,7 +839,7 @@ public function getVpn() * * @return $this */ - public function setVpn($vpn) + public function setVpn($vpn): self { $this->container['vpn'] = $vpn; @@ -879,7 +863,7 @@ public function getProxy() * * @return $this */ - public function setProxy($proxy) + public function setProxy($proxy): self { $this->container['proxy'] = $proxy; @@ -903,7 +887,7 @@ public function getTampering() * * @return $this */ - public function setTampering($tampering) + public function setTampering($tampering): self { $this->container['tampering'] = $tampering; @@ -927,7 +911,7 @@ public function getRawDeviceAttributes() * * @return $this */ - public function setRawDeviceAttributes($raw_device_attributes) + public function setRawDeviceAttributes($raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -951,7 +935,7 @@ public function getHighActivity() * * @return $this */ - public function setHighActivity($high_activity) + public function setHighActivity($high_activity): self { $this->container['high_activity'] = $high_activity; @@ -975,7 +959,7 @@ public function getLocationSpoofing() * * @return $this */ - public function setLocationSpoofing($location_spoofing) + public function setLocationSpoofing($location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -999,7 +983,7 @@ public function getSuspectScore() * * @return $this */ - public function setSuspectScore($suspect_score) + public function setSuspectScore($suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -1023,7 +1007,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId($request_id): self { $this->container['request_id'] = $request_id; @@ -1047,7 +1031,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details) + public function setBrowserDetails($browser_details): self { $this->container['browser_details'] = $browser_details; @@ -1071,7 +1055,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp($ip): self { $this->container['ip'] = $ip; @@ -1095,7 +1079,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location) + public function setIpLocation($ip_location): self { $this->container['ip_location'] = $ip_location; @@ -1119,7 +1103,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp($timestamp): self { $this->container['timestamp'] = $timestamp; @@ -1143,7 +1127,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime($time): self { $this->container['time'] = $time; @@ -1167,7 +1151,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl($url): self { $this->container['url'] = $url; @@ -1191,7 +1175,7 @@ public function getTag() * * @return $this */ - public function setTag($tag) + public function setTag($tag): self { $this->container['tag'] = $tag; @@ -1215,7 +1199,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id) + public function setLinkedId($linked_id): self { $this->container['linked_id'] = $linked_id; @@ -1239,7 +1223,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence) + public function setConfidence($confidence): self { $this->container['confidence'] = $confidence; @@ -1263,7 +1247,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found) + public function setVisitorFound($visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -1287,7 +1271,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at) + public function setFirstSeenAt($first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -1311,7 +1295,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at) + public function setLastSeenAt($last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -1322,11 +1306,8 @@ public function setLastSeenAt($last_seen_at) * Returns true if offset exists. False otherwise. * * @param int $offset Offset - * - * @return bool */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -1335,11 +1316,8 @@ public function offsetExists($offset) * Gets offset. * * @param int $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -1350,8 +1328,7 @@ public function offsetGet($offset) * @param int $offset Offset * @param mixed $value Value to be set */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -1365,8 +1342,7 @@ public function offsetSet($offset, $value) * * @param int $offset Offset */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 214bb57a..5cd215b3 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -29,6 +29,8 @@ namespace Fingerprint\ServerAPI; +use DateTime; + /** * ObjectSerializer Class Doc Comment. * @@ -43,12 +45,12 @@ class ObjectSerializer /** * Serialize data. * - * @param mixed $data the data to serialize - * @param string $format the format of the Swagger type of the data + * @param mixed $data the data to serialize + * @param null|string $format the format of the Swagger type of the data * - * @return object|string serialized form of $data + * @return array|object|string serialized form of $data */ - public static function sanitizeForSerialization($data, $format = null) + public static function sanitizeForSerialization(mixed $data, ?string $format = null): array|object|string { if (is_scalar($data) || null === $data) { return $data; @@ -103,7 +105,7 @@ public static function sanitizeForSerialization($data, $format = null) * * @return string the sanitized filename */ - public static function sanitizeFilename($filename) + public static function sanitizeFilename(string $filename): string { if (preg_match('/.*[\/\\\](.*)$/', $filename, $match)) { return $match[1]; @@ -120,7 +122,7 @@ public static function sanitizeFilename($filename) * * @return string the serialized object */ - public static function toPathValue($value) + public static function toPathValue(string $value): string { return rawurlencode(self::toString($value)); } @@ -136,7 +138,7 @@ public static function toPathValue($value) * * @return string the serialized object */ - public static function toQueryValue($object, $format = null) + public static function toQueryValue(array|\DateTime|string $object, ?string $format = null): string { if (is_array($object)) { return implode(',', $object); @@ -154,7 +156,7 @@ public static function toQueryValue($object, $format = null) * * @return string the header string */ - public static function toHeaderValue($value) + public static function toHeaderValue(string $value): string { return self::toString($value); } @@ -168,7 +170,7 @@ public static function toHeaderValue($value) * * @return string the form string */ - public static function toFormValue($value) + public static function toFormValue(\SplFileObject|string $value): string { if ($value instanceof \SplFileObject) { return $value->getRealPath(); @@ -188,7 +190,7 @@ public static function toFormValue($value) * * @return string the header string */ - public static function toString($value, $format = null) + public static function toString(\DateTime|string $value, ?string $format = null): string { if ($value instanceof \DateTime) { return ('date' === $format) ? $value->format('Y-m-d') : $value->format(\DateTime::ATOM); @@ -204,10 +206,8 @@ public static function toString($value, $format = null) * @param string $collectionFormat the format use for serialization (csv, * ssv, tsv, pipes, multi) * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array - * - * @return string */ - public static function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false) + public static function serializeCollection(array $collection, string $collectionFormat, ?bool $allowCollectionFormatMulti = false): string { if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) { // http_build_query() almost does the job for us. We just @@ -215,21 +215,12 @@ public static function serializeCollection(array $collection, $collectionFormat, return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); } - switch ($collectionFormat) { - case 'pipes': - return implode('|', $collection); - - case 'tsv': - return implode("\t", $collection); - - case 'ssv': - return implode(' ', $collection); - - case 'csv': - // Deliberate fall through. CSV is default format. - default: - return implode(',', $collection); - } + return match ($collectionFormat) { + 'pipes' => implode('|', $collection), + 'tsv' => implode("\t", $collection), + 'ssv' => implode(' ', $collection), + default => implode(',', $collection), + }; } /** @@ -241,12 +232,12 @@ public static function serializeCollection(array $collection, $collectionFormat, * * @throws \Exception */ - public static function deserialize($data, $class, $httpHeaders = null): mixed + public static function deserialize(mixed $data, string $class, ?array $httpHeaders = null): mixed { if (null === $data) { return null; } - if ('map[' === substr($class, 0, 4)) { // for associative array e.g. map[string,int] + if (str_starts_with($class, 'map[')) { // for associative array e.g. map[string,int] $inner = substr($class, 4, -1); $deserialized = []; if (false !== strrpos($inner, ',')) { diff --git a/template/ApiException.mustache b/template/ApiException.mustache index d8b983c9..091803f8 100644 --- a/template/ApiException.mustache +++ b/template/ApiException.mustache @@ -19,6 +19,7 @@ namespace {{invokerPackage}}; use \Exception; +use Psr\Http\Message\ResponseInterface; /** * ApiException Class Doc Comment @@ -30,45 +31,20 @@ use \Exception; */ class ApiException extends Exception { + protected ResponseInterface $responseObject; - /** - * The deserialized response object - * - * @var $responseObject; - */ - protected $responseObject; - - /** - * Constructor - * - * @param string $message Error message - * @param int $code HTTP status code - * @param string[]|null $responseHeaders HTTP response header - * @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string - */ - public function __construct($message = "", $code = 0) + public function __construct(?string $message = "", ?int $code = 0) { parent::__construct($message, $code); } - /** - * Sets the deseralized response object (during deserialization) - * - * @param mixed $obj Deserialized response object - * - * @return void - */ - public function setResponseObject($obj) + + public function setResponseObject(ResponseInterface $obj): void { $this->responseObject = $obj; } - /** - * Gets the deseralized response object (during deserialization) - * - * @return mixed the deserialized response object - */ - public function getResponseObject() + public function getResponseObject(): ResponseInterface { return $this->responseObject; } diff --git a/template/Configuration.mustache b/template/Configuration.mustache index a4249245..d5a6215a 100644 --- a/template/Configuration.mustache +++ b/template/Configuration.mustache @@ -39,74 +39,55 @@ class Configuration * * @var string[] */ - protected $apiKeys = []; + protected array $apiKeys = []; /** * Associate array to store API prefix (e.g. Bearer) * * @var string[] */ - protected $apiKeyPrefixes = []; + protected array $apiKeyPrefixes = []; /** * Access token for OAuth - * - * @var string */ - protected $accessToken = '{{#x-token-example}}{{x-token-example}}{{/x-token-example}}'; + protected string $accessToken = '{{#x-token-example}}{{x-token-example}}{{/x-token-example}}'; /** * Username for HTTP basic authentication - * - * @var string */ - protected $username = ''; + protected string $username = ''; /** * Password for HTTP basic authentication - * - * @var string */ - protected $password = ''; + protected string $password = ''; /** * The host - * - * @var string */ - protected $host = '{{basePath}}'; + protected string $host = '{{basePath}}'; /** * User agent of the HTTP request, set to "PHP-Swagger" by default - * - * @var string */ - protected $userAgent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/{{#artifactVersion}}{{{.}}}{{/artifactVersion}}{{^artifactVersion}}1.0.0{{/artifactVersion}}/php{{/httpUserAgent}}'; + protected string $userAgent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/{{#artifactVersion}}{{{.}}}{{/artifactVersion}}{{^artifactVersion}}1.0.0{{/artifactVersion}}/php{{/httpUserAgent}}'; /** * Debug switch (default set to false) - * - * @var bool */ - protected $debug = false; + protected bool $debug = false; /** * Debug file location (log to STDOUT by default) - * - * @var string */ - protected $debugFile = 'php://output'; + protected string $debugFile = 'php://output'; /** * Debug file location (log to STDOUT by default) - * - * @var string */ - protected $tempFolderPath; + protected string $tempFolderPath; - /** - * Constructor - */ public function __construct() { $this->tempFolderPath = sys_get_temp_dir(); @@ -120,7 +101,7 @@ class Configuration * * @return $this */ - public function setApiKey($apiKeyIdentifier, $key) + public function setApiKey(string $apiKeyIdentifier, string $key): self { $this->apiKeys[$apiKeyIdentifier] = $key; return $this; @@ -131,9 +112,9 @@ class Configuration * * @param string $apiKeyIdentifier API key identifier (authentication scheme) * - * @return string API key or token + * @return string|null API key or token */ - public function getApiKey($apiKeyIdentifier) + public function getApiKey($apiKeyIdentifier): ?string { return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; } @@ -146,7 +127,7 @@ class Configuration * * @return $this */ - public function setApiKeyPrefix($apiKeyIdentifier, $prefix) + public function setApiKeyPrefix(string $apiKeyIdentifier, string $prefix): self { $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; return $this; @@ -157,9 +138,9 @@ class Configuration * * @param string $apiKeyIdentifier API key identifier (authentication scheme) * - * @return string + * @return string|null */ - public function getApiKeyPrefix($apiKeyIdentifier) + public function getApiKeyPrefix(string $apiKeyIdentifier): ?string { return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null; } @@ -171,7 +152,7 @@ class Configuration * * @return $this */ - public function setAccessToken($accessToken) + public function setAccessToken(string $accessToken): self { $this->accessToken = $accessToken; return $this; @@ -182,7 +163,7 @@ class Configuration * * @return string Access token for OAuth */ - public function getAccessToken() + public function getAccessToken(): string { return $this->accessToken; } @@ -194,7 +175,7 @@ class Configuration * * @return $this */ - public function setUsername($username) + public function setUsername(string $username): self { $this->username = $username; return $this; @@ -205,7 +186,7 @@ class Configuration * * @return string Username for HTTP basic authentication */ - public function getUsername() + public function getUsername(): string { return $this->username; } @@ -217,7 +198,7 @@ class Configuration * * @return $this */ - public function setPassword($password) + public function setPassword(string $password): self { $this->password = $password; return $this; @@ -228,7 +209,7 @@ class Configuration * * @return string Password for HTTP basic authentication */ - public function getPassword() + public function getPassword(): string { return $this->password; } @@ -240,7 +221,7 @@ class Configuration * * @return $this */ - public function setHost($host) + public function setHost(string $host): self { $this->host = $host; return $this; @@ -251,7 +232,7 @@ class Configuration * * @return string Host */ - public function getHost() + public function getHost(): string { return $this->host; } @@ -260,7 +241,7 @@ class Configuration * @param $region * @return $this */ - public function setRegion($region = self::REGION_GLOBAL) + public function setRegion(?string $region = self::REGION_GLOBAL): self { switch (trim(strtolower($region))) { case self::REGION_ASIA: @@ -291,7 +272,7 @@ class Configuration * @return $this * @throws \InvalidArgumentException */ - public function setUserAgent($userAgent) + public function setUserAgent(string $userAgent): self { if (!is_string($userAgent)) { throw new \InvalidArgumentException('User-agent must be a string.'); @@ -306,7 +287,7 @@ class Configuration * * @return string user agent */ - public function getUserAgent() + public function getUserAgent(): string { return $this->userAgent; } @@ -318,7 +299,7 @@ class Configuration * * @return $this */ - public function setDebug($debug) + public function setDebug(bool $debug): self { $this->debug = $debug; return $this; @@ -329,7 +310,7 @@ class Configuration * * @return bool */ - public function getDebug() + public function getDebug(): bool { return $this->debug; } @@ -341,7 +322,7 @@ class Configuration * * @return $this */ - public function setDebugFile($debugFile) + public function setDebugFile(string $debugFile): self { $this->debugFile = $debugFile; return $this; @@ -352,7 +333,7 @@ class Configuration * * @return string */ - public function getDebugFile() + public function getDebugFile(): string { return $this->debugFile; } @@ -364,7 +345,7 @@ class Configuration * * @return $this */ - public function setTempFolderPath($tempFolderPath) + public function setTempFolderPath(string $tempFolderPath): self { $this->tempFolderPath = $tempFolderPath; return $this; @@ -375,7 +356,7 @@ class Configuration * * @return string Temp folder path */ - public function getTempFolderPath() + public function getTempFolderPath(): string { return $this->tempFolderPath; } @@ -387,7 +368,7 @@ class Configuration * @param $region * @return Configuration */ - public static function getDefaultConfiguration($api_key = null, $region = self::REGION_GLOBAL) + public static function getDefaultConfiguration(?string $api_key = null, ?string $region = self::REGION_GLOBAL): self { if (self::$defaultConfiguration === null) { self::$defaultConfiguration = new Configuration(); @@ -406,7 +387,7 @@ class Configuration * * @return void */ - public static function setDefaultConfiguration(Configuration $config) + public static function setDefaultConfiguration(Configuration $config): void { self::$defaultConfiguration = $config; } @@ -416,7 +397,7 @@ class Configuration * * @return string The report for debugging */ - public static function toDebugReport() + public static function toDebugReport(): string { $report = 'PHP SDK ({{invokerPackage}}) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; @@ -435,9 +416,9 @@ class Configuration * * @param string $apiKeyIdentifier name of apikey * - * @return string API key with the prefix + * @return string|null API key with the prefix */ - public function getApiKeyWithPrefix($apiKeyIdentifier) + public function getApiKeyWithPrefix(string $apiKeyIdentifier): ?string { $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); $apiKey = $this->getApiKey($apiKeyIdentifier); diff --git a/template/api.mustache b/template/api.mustache index 9ef0a5b0..796b5652 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -43,12 +43,8 @@ use \GuzzleHttp\Exception\GuzzleException; protected ClientInterface $client; protected Configuration $config; - protected $integration_info = 'fingerprint-pro-server-php-sdk/{{artifactVersion}}'; + protected string $integration_info = 'fingerprint-pro-server-php-sdk/{{artifactVersion}}'; - /** - * @param ClientInterface $client - * @param Configuration $config - */ public function __construct( ClientInterface $client = null, Configuration $config = null @@ -57,10 +53,7 @@ use \GuzzleHttp\Exception\GuzzleException; $this->config = $config ?: new Configuration(); } - /** - * @return Configuration - */ - public function getConfig() + public function getConfig(): Configuration { return $this->config; } @@ -79,15 +72,12 @@ use \GuzzleHttp\Exception\GuzzleException; * {{.}} * {{/description}} -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException * @return array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } */ - public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): array + public function {{operationId}}({{#parameters}}{{dataType}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): array { $returnType = '{{returnType}}'; $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); @@ -170,14 +160,10 @@ use \GuzzleHttp\Exception\GuzzleException; * {{.}} * {{/description}} - {{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} - {{/parameters}} * * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface< array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } > */ - public function {{operationId}}Async({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Promise\PromiseInterface + public function {{operationId}}Async({{#parameters}}{{dataType}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Promise\PromiseInterface { $returnType = '{{returnType}}'; $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); @@ -246,9 +232,6 @@ use \GuzzleHttp\Exception\GuzzleException; /** * Create request for operation '{{{operationId}}}' * -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} * * @throws \InvalidArgumentException */ @@ -418,9 +401,8 @@ use \GuzzleHttp\Exception\GuzzleException; * Create http client option * * @throws \RuntimeException on file opening failure - * @return array of http client options */ - protected function createHttpClientOption() + protected function createHttpClientOption(): array { $options = []; if ($this->config->getDebug()) { diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 4604ec01..0f1a1d61 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -5,14 +5,14 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @var string */ - protected static $swaggerModelName = '{{name}}'; + protected static string $swaggerModelName = '{{name}}'; /** * Array of property to type mappings. Used for (de)serialization * * @var string[] */ - protected static $swaggerTypes = [ + protected static array $swaggerTypes = [ {{#vars}}'{{name}}' => '{{{datatype}}}'{{#hasMore}}, {{/hasMore}}{{/vars}} ]; @@ -22,27 +22,23 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @var string[] */ - protected static $swaggerFormats = [ + protected static array $swaggerFormats = [ {{#vars}}'{{name}}' => {{#dataFormat}}'{{{dataFormat}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}{{#hasMore}}, {{/hasMore}}{{/vars}} ]; /** * Array of property to type mappings. Used for (de)serialization - * - * @return array */ - public static function swaggerTypes() + public static function swaggerTypes(): array { return self::$swaggerTypes{{#parentSchema}} + parent::swaggerTypes(){{/parentSchema}}; } /** * Array of property to format mappings. Used for (de)serialization - * - * @return array */ - public static function swaggerFormats() + public static function swaggerFormats(): array { return self::$swaggerFormats{{#parentSchema}} + parent::swaggerFormats(){{/parentSchema}}; } @@ -53,7 +49,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @var string[] */ - protected static $attributeMap = [ + protected static array $attributeMap = [ {{#vars}}'{{name}}' => '{{baseName}}'{{#hasMore}}, {{/hasMore}}{{/vars}} ]; @@ -63,7 +59,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @var string[] */ - protected static $setters = [ + protected static array $setters = [ {{#vars}}'{{name}}' => '{{setter}}'{{#hasMore}}, {{/hasMore}}{{/vars}} ]; @@ -73,7 +69,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @var string[] */ - protected static $getters = [ + protected static array $getters = [ {{#vars}}'{{name}}' => '{{getter}}'{{#hasMore}}, {{/hasMore}}{{/vars}} ]; @@ -81,40 +77,32 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Array of attributes where the key is the local name, * and the value is the original name - * - * @return array */ - public static function attributeMap() + public static function attributeMap(): array { return {{#parentSchema}}parent::attributeMap() + {{/parentSchema}}self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses) - * - * @return array */ - public static function setters() + public static function setters(): array { return {{#parentSchema}}parent::setters() + {{/parentSchema}}self::$setters; } /** * Array of attributes to getter functions (for serialization of requests) - * - * @return array */ - public static function getters() + public static function getters(): array { return {{#parentSchema}}parent::getters() + {{/parentSchema}}self::$getters; } /** * The original name of the model. - * - * @return string */ - public function getModelName() + public function getModelName(): string { return self::$swaggerModelName; } @@ -128,7 +116,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return string[] */ - public function {{getter}}AllowableValues() + public function {{getter}}AllowableValues(): array { return [ {{#allowableValues}}{{#enumVars}}self::{{enumName}}_{{{name}}},{{^@last}} @@ -143,7 +131,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @var mixed[] */ - protected $container = []; + protected array $container = []; {{/parentSchema}} /** @@ -168,7 +156,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { {{#parent}} $invalidProperties = parent::listInvalidProperties(); @@ -249,7 +237,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return count($this->listInvalidProperties()) === 0; } @@ -258,7 +246,6 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Gets {{name}} - * * @return {{datatype}} */ public function {{getter}}() @@ -273,7 +260,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return $this */ - public function {{setter}}(${{name}}) + public function {{setter}}(${{name}}): self { {{#isEnum}} $allowedValues = $this->{{getter}}AllowableValues(); @@ -342,11 +329,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * Returns true if offset exists. False otherwise. * * @param integer $offset Offset - * - * @return boolean */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->container[$offset]); } @@ -355,11 +339,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * Gets offset. * * @param integer $offset Offset - * - * @return mixed */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet($offset): mixed { return isset($this->container[$offset]) ? $this->container[$offset] : null; } @@ -369,11 +350,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @param integer $offset Offset * @param mixed $value Value to be set - * - * @return void */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) + public function offsetSet($offset, mixed $value): void { if (is_null($offset)) { $this->container[] = $value; @@ -386,11 +364,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * Unsets offset. * * @param integer $offset Offset - * - * @return void */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) + public function offsetUnset($offset): void { unset($this->container[$offset]); } @@ -400,7 +375,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return string */ - public function __toString() + public function __toString(): string { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( From ee54f5bf787ccbb3c3493bfe8ccc2a5590c557dc Mon Sep 17 00:00:00 2001 From: Orkun Date: Sun, 4 Aug 2024 13:44:38 +0300 Subject: [PATCH 03/14] refactor: throw serialization exception from object serializer --- src/Api/FingerprintApi.php | 44 ++++++++++++++++++++++++---------- src/ObjectSerializer.php | 4 ++-- src/SerializationException.php | 13 ++++++---- template/api.mustache | 18 +++++++++----- 4 files changed, 55 insertions(+), 24 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index d3b451ef..fd799616 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -122,8 +122,10 @@ public function getEvent(string $request_id): array try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); + } catch (SerializationException $e) { + $e->setResponse($response); + + throw $e; } return [$serialized, $response]; @@ -174,7 +176,10 @@ public function getEvent(string $request_id): array } throw $e; - } catch (\Exception $_) { + } catch (SerializationException $exception) { + $exception->setResponse($e->getResponseObject()); + + throw $exception; } } } @@ -215,8 +220,10 @@ function ($response) use ($returnType, $request) { try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); + } catch (SerializationException $e) { + $e->setResponse($response); + + throw $e; } return [$serialized, $response]; @@ -268,7 +275,10 @@ function ($e) { } throw $e; - } catch (\Exception $_) { + } catch (SerializationException $exception) { + $exception->setResponse($e->getResponseObject()); + + throw $e; } } ); @@ -326,8 +336,10 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); + } catch (SerializationException $e) { + $e->setResponse($response); + + throw $e; } return [$serialized, $response]; @@ -378,7 +390,10 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin } throw $e; - } catch (\Exception $_) { + } catch (SerializationException $exception) { + $exception->setResponse($e->getResponseObject()); + + throw $exception; } } } @@ -419,8 +434,10 @@ function ($response) use ($returnType, $request) { try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); + } catch (SerializationException $e) { + $e->setResponse($response); + + throw $e; } return [$serialized, $response]; @@ -472,7 +489,10 @@ function ($e) { } throw $e; - } catch (\Exception $_) { + } catch (SerializationException $exception) { + $exception->setResponse($e->getResponseObject()); + + throw $e; } } ); diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 5cd215b3..adcb378a 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -296,7 +296,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade return (float) $originalData; } if ('string' === $normalizedClass && is_object($data)) { - throw new \Exception('Cannot convert object to string'); + throw new SerializationException(); } settype($data, $class); @@ -304,7 +304,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade return $data; } - throw new \Exception('Serialization error: Could not convert '.gettype($originalData).' to '.$class); + throw new SerializationException(); } elseif (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues())) { $imploded = implode("', '", $class::getAllowableEnumValues()); diff --git a/src/SerializationException.php b/src/SerializationException.php index 9c0fe867..51049575 100644 --- a/src/SerializationException.php +++ b/src/SerializationException.php @@ -6,15 +6,20 @@ final class SerializationException extends \Exception { - protected readonly ResponseInterface $response; + protected ?ResponseInterface $response; - public function __construct(ResponseInterface $response, \Exception $prev) + public function __construct(?ResponseInterface $response = null, ?\Exception $prev = null) { - parent::__construct("Response from the server couldn't be serialized", $prev->getCode(), $prev); + parent::__construct("Response from the server couldn't be serialized", $prev ? $prev->getCode() : 0, $prev); $this->response = $response; } - public function getResponse(): ResponseInterface + public function setResponse(ResponseInterface $response): void + { + $this->response = $response; + } + + public function getResponse(): ?ResponseInterface { return $this->response; } diff --git a/template/api.mustache b/template/api.mustache index 796b5652..2b9556f2 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -116,8 +116,9 @@ use \GuzzleHttp\Exception\GuzzleException; try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); + } catch (SerializationException $e) { + $e->setResponse($response); + throw $e; } return [$serialized, $response]; @@ -147,7 +148,9 @@ use \GuzzleHttp\Exception\GuzzleException; {{/responses}} } throw $e; - } catch (\Exception $_) { + } catch(SerializationException $exception) { + $exception->setResponse($e->getResponseObject()); + throw $exception; } } } @@ -192,8 +195,9 @@ use \GuzzleHttp\Exception\GuzzleException; try { $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); + } catch (SerializationException $e) { + $e->setResponse($response); + throw $e; } return [$serialized, $response]; @@ -223,7 +227,9 @@ use \GuzzleHttp\Exception\GuzzleException; {{/responses}} } throw $e; - } catch (\Exception $_) { + } catch(SerializationException $exception) { + $exception->setResponse($e->getResponseObject()); + throw $e; } } ); From 1840ba64888b20a203f2cf824f565dcc11ce33f1 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 9 Aug 2024 11:56:06 +0300 Subject: [PATCH 04/14] refactor: new logic for serializer --- run_checks.php | 17 +- src/Api/FingerprintApi.php | 374 +++++++++++++----------------------- src/ObjectSerializer.php | 61 +++--- template/api.mustache | 90 +++------ test/FingerprintApiTest.php | 7 +- 5 files changed, 223 insertions(+), 326 deletions(-) diff --git a/run_checks.php b/run_checks.php index c676c1fb..689abfbe 100644 --- a/run_checks.php +++ b/run_checks.php @@ -43,6 +43,9 @@ try { list($result, $response) = $client->getVisits($visitor_id); + if($result->getVisitorId() !== $visitor_id) { + throw new Exception('Argument visitorId is not equal to deserialized getVisitorId'); + } fwrite(STDOUT, sprintf("Got visits: %s \n", $response->getBody()->getContents())); } catch (Exception $e) { fwrite(STDERR, sprintf("Exception when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); @@ -50,7 +53,11 @@ } try { + /** @var $result \Fingerprint\ServerAPI\Model\EventResponse */ list($result, $response) = $client->getEvent($request_id); + if($result->getProducts()->getIdentification()->getData()->getRequestId() !== $request_id) { + throw new Exception('Argument requestId is not equal to deserialized getRequestId'); + } fwrite(STDOUT, sprintf("\n\nGot event: %s \n", $response->getBody()->getContents())); } catch (Exception $e) { fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); @@ -58,8 +65,11 @@ } $eventPromise = $client->getEventAsync($request_id); -$eventPromise->then(function ($tuple) { +$eventPromise->then(function ($tuple) use($request_id) { list($result, $response) = $tuple; + if($result->getProducts()->getIdentification()->getData()->getRequestId() !== $request_id) { + throw new Exception('Argument requestId is not equal to deserialized getRequestId'); + } fwrite(STDOUT, sprintf("\n\nGot async event: %s \n", $response->getBody()->getContents())); }, function($exception) { fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $exception->getMessage())); @@ -67,8 +77,11 @@ })->wait(); $visitsPromise = $client->getVisitsAsync($visitor_id); -$visitsPromise->then(function($tuple) { +$visitsPromise->then(function($tuple) use($visitor_id) { list($result, $response) = $tuple; + if($result->getVisitorId() !== $visitor_id) { + throw new Exception('Argument visitorId is not equal to deserialized getVisitorId'); + } fwrite(STDOUT, sprintf("\n\nGot async visits: %s \n", $response->getBody()->getContents())); }, function ($exception) { fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $exception->getMessage())); diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index fd799616..d0597565 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -117,70 +117,43 @@ public function getEvent(string $request_id): array throw $apiException; } - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (SerializationException $e) { - $e->setResponse($response); - - throw $e; - } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; } catch (ApiException $e) { - try { - switch ($e->getCode()) { - case 200: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\EventResponse', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 403: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorEvent403Response', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 404: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorEvent404Response', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - } - - throw $e; - } catch (SerializationException $exception) { - $exception->setResponse($e->getResponseObject()); - - throw $exception; + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\EventResponse' + ); + $e->setResponseObject($data); + + break; + + case 403: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ErrorEvent403Response' + ); + $e->setResponseObject($data); + + break; + + case 404: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ErrorEvent404Response' + ); + $e->setResponseObject($data); + + break; } + + throw $e; } } @@ -190,6 +163,7 @@ public function getEvent(string $request_id): array * Get event by requestId * * @throws \InvalidArgumentException + * @throws SerializationException */ public function getEventAsync(string $request_id): PromiseInterface { @@ -215,71 +189,45 @@ function ($response) use ($returnType, $request) { throw $apiException; } - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (SerializationException $e) { - $e->setResponse($response); - - throw $e; - } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; }, function ($e) { - try { - switch ($e->getCode()) { - case 200: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\EventResponse', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 403: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorEvent403Response', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 404: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorEvent404Response', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - } - - throw $e; - } catch (SerializationException $exception) { - $exception->setResponse($e->getResponseObject()); - - throw $e; + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\EventResponse' + ); + $e->setResponseObject($data); + + break; + + case 403: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ErrorEvent403Response' + ); + $e->setResponseObject($data); + + break; + + case 404: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ErrorEvent404Response' + ); + $e->setResponseObject($data); + + break; } + + throw $e; } ); } @@ -331,70 +279,43 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin throw $apiException; } - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (SerializationException $e) { - $e->setResponse($response); - - throw $e; - } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; } catch (ApiException $e) { - try { - switch ($e->getCode()) { - case 200: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\Response', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 403: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorVisits403', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 429: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ManyRequestsResponse', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - } - - throw $e; - } catch (SerializationException $exception) { - $exception->setResponse($e->getResponseObject()); - - throw $exception; + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\Response' + ); + $e->setResponseObject($data); + + break; + + case 403: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ErrorVisits403' + ); + $e->setResponseObject($data); + + break; + + case 429: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ManyRequestsResponse' + ); + $e->setResponseObject($data); + + break; } + + throw $e; } } @@ -404,6 +325,7 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin * Get visits by visitorId * * @throws \InvalidArgumentException + * @throws SerializationException */ public function getVisitsAsync(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): PromiseInterface { @@ -429,71 +351,45 @@ function ($response) use ($returnType, $request) { throw $apiException; } - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (SerializationException $e) { - $e->setResponse($response); - - throw $e; - } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; }, function ($e) { - try { - switch ($e->getCode()) { - case 200: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\Response', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 403: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ErrorVisits403', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - - case 429: - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '\Fingerprint\ServerAPI\Model\ManyRequestsResponse', - $response->getHeaders() - ); - $e->setResponseObject($data); - - break; - } - - throw $e; - } catch (SerializationException $exception) { - $exception->setResponse($e->getResponseObject()); - - throw $e; + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\Response' + ); + $e->setResponseObject($data); + + break; + + case 403: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ErrorVisits403' + ); + $e->setResponseObject($data); + + break; + + case 429: + $data = ObjectSerializer::deserialize( + $response, + '\Fingerprint\ServerAPI\Model\ManyRequestsResponse' + ); + $e->setResponseObject($data); + + break; } + + throw $e; } ); } @@ -502,6 +398,7 @@ function ($e) { * Create request for operation 'getEvent'. * * @throws \InvalidArgumentException + * @throws SerializationException */ protected function getEventRequest(string $request_id): Request { @@ -566,6 +463,7 @@ protected function getEventRequest(string $request_id): Request * Create request for operation 'getVisits'. * * @throws \InvalidArgumentException + * @throws SerializationException */ protected function getVisitsRequest(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): Request { diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index adcb378a..1bed1992 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -30,6 +30,7 @@ namespace Fingerprint\ServerAPI; use DateTime; +use Psr\Http\Message\ResponseInterface; /** * ObjectSerializer Class Doc Comment. @@ -226,13 +227,41 @@ public static function serializeCollection(array $collection, string $collection /** * Deserialize a JSON string into an object. * - * @param mixed $data object or primitive to be deserialized - * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers + * @param string $class class name is passed as a string * * @throws \Exception */ - public static function deserialize(mixed $data, string $class, ?array $httpHeaders = null): mixed + public static function deserialize(ResponseInterface $response, string $class): mixed + { + $data = $response->getBody()->getContents(); + $response->getBody()->rewind(); + + return self::mapToClass($data, $class, $response); + } + + protected static function mapToClass(mixed $data, string $class, ResponseInterface $response): mixed + { + if ('string' === gettype($data)) { + $data = json_decode($data, false); + } + $instance = new $class(); + foreach ($instance::swaggerTypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { + continue; + } + + $propertyValue = $data->{$instance::attributeMap()[$property]}; + if (isset($propertyValue)) { + $instance->{$propertySetter}(self::castData($propertyValue, $type, $response)); + } + } + + return $instance; + } + + protected static function castData(mixed $data, string $class, ResponseInterface $response): mixed { if (null === $data) { return null; @@ -244,7 +273,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade $subClass_array = explode(',', $inner, 2); $subClass = $subClass_array[1]; foreach ($data as $key => $value) { - $deserialized[$key] = self::deserialize($value, $subClass, null); + $deserialized[$key] = self::castData($value, $subClass, $response); } } @@ -254,7 +283,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade $subClass = substr($class, 0, -2); $values = []; foreach ($data as $key => $value) { - $values[] = self::deserialize($value, $subClass, null); + $values[] = self::castData($value, $subClass, $response); } return $values; @@ -296,7 +325,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade return (float) $originalData; } if ('string' === $normalizedClass && is_object($data)) { - throw new SerializationException(); + throw new SerializationException($response); } settype($data, $class); @@ -304,7 +333,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade return $data; } - throw new SerializationException(); + throw new SerializationException($response); } elseif (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues())) { $imploded = implode("', '", $class::getAllowableEnumValues()); @@ -315,20 +344,6 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade return $data; } - $instance = new $class(); - foreach ($instance::swaggerTypes() as $property => $type) { - $propertySetter = $instance::setters()[$property]; - - if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { - continue; - } - - $propertyValue = $data->{$instance::attributeMap()[$property]}; - if (isset($propertyValue)) { - $instance->{$propertySetter}(self::deserialize($propertyValue, $type, null)); - } - } - - return $instance; + return self::mapToClass($data, $class, $response); } } diff --git a/template/api.mustache b/template/api.mustache index 2b9556f2..3238a89d 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -111,15 +111,8 @@ use \GuzzleHttp\Exception\GuzzleException; } {{#returnType}} - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (SerializationException $e) { - $e->setResponse($response); - throw $e; - } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; {{/returnType}} @@ -128,30 +121,22 @@ use \GuzzleHttp\Exception\GuzzleException; {{/returnType}} } catch (ApiException $e) { - try { - switch ($e->getCode()) { + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + switch ($e->getCode()) { {{#responses}} {{#dataType}} - {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '{{dataType}}', - $response->getHeaders() - ); - $e->setResponseObject($data); - break; + {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + $data = ObjectSerializer::deserialize( + $response, + '{{dataType}}' + ); + $e->setResponseObject($data); + break; {{/dataType}} {{/responses}} - } - throw $e; - } catch(SerializationException $exception) { - $exception->setResponse($e->getResponseObject()); - throw $exception; } + throw $e; } } @@ -165,6 +150,7 @@ use \GuzzleHttp\Exception\GuzzleException; {{/description}} * * @throws \InvalidArgumentException + * @throws SerializationException */ public function {{operationId}}Async({{#parameters}}{{dataType}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Promise\PromiseInterface { @@ -190,15 +176,8 @@ use \GuzzleHttp\Exception\GuzzleException; throw $apiException; } {{#returnType}} - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (SerializationException $e) { - $e->setResponse($response); - throw $e; - } + + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; {{/returnType}} @@ -207,30 +186,22 @@ use \GuzzleHttp\Exception\GuzzleException; {{/returnType}} }, function ($e) { - try { - switch ($e->getCode()) { - {{#responses}} - {{#dataType}} - {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - /** @var ResponseInterface $response */ - $response = $e->getResponseObject(); - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - $data = ObjectSerializer::deserialize( - $responseBody, - '{{dataType}}', - $response->getHeaders() - ); - $e->setResponseObject($data); - break; - {{/dataType}} - {{/responses}} - } - throw $e; - } catch(SerializationException $exception) { - $exception->setResponse($e->getResponseObject()); - throw $e; + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + switch ($e->getCode()) { + {{#responses}} + {{#dataType}} + {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + $data = ObjectSerializer::deserialize( + $response, + '{{dataType}}' + ); + $e->setResponseObject($data); + break; + {{/dataType}} + {{/responses}} } + throw $e; } ); } @@ -240,6 +211,7 @@ use \GuzzleHttp\Exception\GuzzleException; * * * @throws \InvalidArgumentException + * @throws SerializationException */ protected function {{operationId}}Request({{#parameters}}{{dataType}}{{^required}}|null{{/required}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Psr7\Request { diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index 3ee91f78..e498b7d7 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -84,11 +84,10 @@ public function getEventWithHttpInfoMock($request_id): array } $file = file_get_contents(__DIR__ . "/mocks/$mock_name"); - $events_mock_data = \GuzzleHttp\json_decode($file); $response = new \GuzzleHttp\Psr7\Response(200, [], $file); try { - $serialized = ObjectSerializer::deserialize($events_mock_data, EventResponse::class); + $serialized = ObjectSerializer::deserialize($response, EventResponse::class); } catch (Exception $exception) { throw new SerializationException($response, $exception); } @@ -113,9 +112,9 @@ public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $link $visits_mock_data->visits = array_slice($visits_mock_data->visits, 0, $limit); } - $response = new \GuzzleHttp\Psr7\Response(200, [], $file); + $response = new \GuzzleHttp\Psr7\Response(200, [], json_encode($visits_mock_data)); try { - $serialized = ObjectSerializer::deserialize($visits_mock_data, Response::class); + $serialized = ObjectSerializer::deserialize($response, Response::class); } catch (Exception $exception) { throw new SerializationException($response, $exception); } From 7a209f8063cbadaa22ccf89887f58c3c80f28183 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 9 Aug 2024 19:10:23 +0300 Subject: [PATCH 05/14] refactor: add descriptions to methods and properties --- src/Api/FingerprintApi.php | 18 ++++++++++++++++++ src/ApiException.php | 3 +++ src/Configuration.php | 2 +- template/ApiException.mustache | 3 +++ template/Configuration.mustache | 2 +- template/api.mustache | 6 ++++++ 6 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index d0597565..f04e8ce6 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -75,6 +75,8 @@ public function getConfig(): Configuration * * Get event by requestId * + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * * @return array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } * * @throws \InvalidArgumentException @@ -162,6 +164,8 @@ public function getEvent(string $request_id): array * * Get event by requestId * + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * * @throws \InvalidArgumentException * @throws SerializationException */ @@ -237,6 +241,13 @@ function ($e) { * * Get visits by visitorId * + * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) + * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) + * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) + * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) + * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) + * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) + * * @return array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } * * @throws \InvalidArgumentException @@ -324,6 +335,13 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin * * Get visits by visitorId * + * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) + * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) + * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) + * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) + * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) + * @param int $before ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) + * * @throws \InvalidArgumentException * @throws SerializationException */ diff --git a/src/ApiException.php b/src/ApiException.php index 8d5e8d70..fa79afad 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -48,6 +48,9 @@ public function __construct(?string $message = '', ?int $code = 0) parent::__construct($message, $code); } + /** + * Sets the deseralized response object (during deserialization). + */ public function setResponseObject(ResponseInterface $obj): void { $this->responseObject = $obj; diff --git a/src/Configuration.php b/src/Configuration.php index 54098a4c..0cf80b52 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -126,7 +126,7 @@ public function setApiKey(string $apiKeyIdentifier, string $key): self * * @return null|string API key or token */ - public function getApiKey($apiKeyIdentifier): ?string + public function getApiKey(string $apiKeyIdentifier): ?string { return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; } diff --git a/template/ApiException.mustache b/template/ApiException.mustache index 091803f8..31872493 100644 --- a/template/ApiException.mustache +++ b/template/ApiException.mustache @@ -39,6 +39,9 @@ class ApiException extends Exception } + /** + * Sets the deseralized response object (during deserialization) + */ public function setResponseObject(ResponseInterface $obj): void { $this->responseObject = $obj; diff --git a/template/Configuration.mustache b/template/Configuration.mustache index d5a6215a..f2690a18 100644 --- a/template/Configuration.mustache +++ b/template/Configuration.mustache @@ -114,7 +114,7 @@ class Configuration * * @return string|null API key or token */ - public function getApiKey($apiKeyIdentifier): ?string + public function getApiKey(string $apiKeyIdentifier): ?string { return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; } diff --git a/template/api.mustache b/template/api.mustache index 3238a89d..d5c2cd5d 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -72,6 +72,9 @@ use \GuzzleHttp\Exception\GuzzleException; * {{.}} * {{/description}} +{{#parameters}} + * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} +{{/parameters}} * @throws \InvalidArgumentException * @throws SerializationException * @throws GuzzleException @@ -148,6 +151,9 @@ use \GuzzleHttp\Exception\GuzzleException; * {{.}} * {{/description}} + {{#parameters}} + * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} + {{/parameters}} * * @throws \InvalidArgumentException * @throws SerializationException From 5b821b65ce75a3fad9dead5710181ac9d52cf6ad Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 12 Aug 2024 12:59:52 +0300 Subject: [PATCH 06/14] refactor: remove redundant methods from object serializer --- src/ObjectSerializer.php | 74 ---------------------------------------- 1 file changed, 74 deletions(-) diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 1bed1992..6eaa1a32 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -29,7 +29,6 @@ namespace Fingerprint\ServerAPI; -use DateTime; use Psr\Http\Message\ResponseInterface; /** @@ -98,23 +97,6 @@ public static function sanitizeForSerialization(mixed $data, ?string $format = n return (string) $data; } - /** - * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif. - * - * @param string $filename filename to be sanitized - * - * @return string the sanitized filename - */ - public static function sanitizeFilename(string $filename): string - { - if (preg_match('/.*[\/\\\](.*)$/', $filename, $match)) { - return $match[1]; - } - - return $filename; - } - /** * Take value and turn it into a string suitable for inclusion in * the path, by url-encoding. @@ -148,38 +130,6 @@ public static function toQueryValue(array|\DateTime|string $object, ?string $for return self::toString($object, $format); } - /** - * Take value and turn it into a string suitable for inclusion in - * the header. If it's a string, pass through unchanged - * If it's a datetime object, format it in RFC3339. - * - * @param string $value a string which will be part of the header - * - * @return string the header string - */ - public static function toHeaderValue(string $value): string - { - return self::toString($value); - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the http body (form parameter). If it's a string, pass through unchanged - * If it's a datetime object, format it in RFC3339. - * - * @param \SplFileObject|string $value the value of the form parameter - * - * @return string the form string - */ - public static function toFormValue(\SplFileObject|string $value): string - { - if ($value instanceof \SplFileObject) { - return $value->getRealPath(); - } - - return self::toString($value); - } - /** * Take value and turn it into a string suitable for inclusion in * the parameter. If it's a string, pass through unchanged @@ -200,30 +150,6 @@ public static function toString(\DateTime|string $value, ?string $format = null) return $value; } - /** - * Serialize an array to a string. - * - * @param array $collection collection to serialize to a string - * @param string $collectionFormat the format use for serialization (csv, - * ssv, tsv, pipes, multi) - * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array - */ - public static function serializeCollection(array $collection, string $collectionFormat, ?bool $allowCollectionFormatMulti = false): string - { - if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) { - // http_build_query() almost does the job for us. We just - // need to fix the result of multidimensional arrays. - return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); - } - - return match ($collectionFormat) { - 'pipes' => implode('|', $collection), - 'tsv' => implode("\t", $collection), - 'ssv' => implode(' ', $collection), - default => implode(',', $collection), - }; - } - /** * Deserialize a JSON string into an object. * From ec412c6dc67eae296a23416f4432fb5f8027a19a Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 12 Aug 2024 13:01:19 +0300 Subject: [PATCH 07/14] refactor: remove data from set response object --- src/Api/FingerprintApi.php | 72 +++++++------------------------------- template/api.mustache | 12 ++----- 2 files changed, 14 insertions(+), 70 deletions(-) diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index f04e8ce6..03a52e4f 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -128,29 +128,17 @@ public function getEvent(string $request_id): array switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\EventResponse' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 403: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ErrorEvent403Response' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 404: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ErrorEvent404Response' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; } @@ -204,29 +192,17 @@ function ($e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\EventResponse' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 403: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ErrorEvent403Response' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 404: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ErrorEvent404Response' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; } @@ -299,29 +275,17 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\Response' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 403: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ErrorVisits403' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 429: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ManyRequestsResponse' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; } @@ -380,29 +344,17 @@ function ($e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\Response' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 403: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ErrorVisits403' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; case 429: - $data = ObjectSerializer::deserialize( - $response, - '\Fingerprint\ServerAPI\Model\ManyRequestsResponse' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; } diff --git a/template/api.mustache b/template/api.mustache index d5c2cd5d..0577f146 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -130,11 +130,7 @@ use \GuzzleHttp\Exception\GuzzleException; {{#responses}} {{#dataType}} {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - $data = ObjectSerializer::deserialize( - $response, - '{{dataType}}' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; {{/dataType}} {{/responses}} @@ -198,11 +194,7 @@ use \GuzzleHttp\Exception\GuzzleException; {{#responses}} {{#dataType}} {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - $data = ObjectSerializer::deserialize( - $response, - '{{dataType}}' - ); - $e->setResponseObject($data); + $e->setResponseObject($response); break; {{/dataType}} {{/responses}} From 66fe10ded19d80c0e605d76e4b2ab7b27995ac3c Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 13 Aug 2024 17:30:44 +0300 Subject: [PATCH 08/14] refactor: inline types for all getters and setters and more code readability --- README.md | 4 +- run_checks.php | 3 +- scripts/generate.sh | 20 +- src/Api/FingerprintApi.php | 24 ++ src/ApiException.php | 12 + src/Model/ASN.php | 18 +- src/Model/BotdDetectionResult.php | 12 +- src/Model/BotdResult.php | 42 ++-- src/Model/BrowserDetails.php | 48 ++-- src/Model/ClonedAppResult.php | 6 +- src/Model/Confidence.php | 6 +- src/Model/DataCenter.php | 12 +- src/Model/DeprecatedIPLocation.php | 52 ++--- src/Model/DeprecatedIPLocationCity.php | 6 +- src/Model/EmulatorResult.php | 6 +- src/Model/ErrorEvent403Response.php | 6 +- src/Model/ErrorEvent403ResponseError.php | 12 +- src/Model/ErrorEvent404Response.php | 6 +- src/Model/ErrorEvent404ResponseError.php | 12 +- src/Model/ErrorVisits403.php | 6 +- src/Model/EventResponse.php | 12 +- src/Model/FactoryResetResult.php | 12 +- src/Model/FridaResult.php | 6 +- src/Model/HighActivityResult.php | 12 +- src/Model/IPLocation.php | 52 ++--- src/Model/IPLocationCity.php | 6 +- src/Model/IdentificationError.php | 12 +- src/Model/IncognitoResult.php | 6 +- src/Model/IpBlockListResult.php | 12 +- src/Model/IpBlockListResultDetails.php | 12 +- src/Model/IpInfoResult.php | 12 +- src/Model/IpInfoResultV4.php | 24 +- src/Model/IpInfoResultV6.php | 24 +- src/Model/JailbrokenResult.php | 6 +- src/Model/Location.php | 12 +- src/Model/LocationSpoofingResult.php | 6 +- src/Model/ManyRequestsResponse.php | 6 +- src/Model/PrivacySettingsResult.php | 6 +- src/Model/ProductError.php | 12 +- src/Model/ProductsResponse.php | 126 ++++------- src/Model/ProductsResponseBotd.php | 12 +- src/Model/ProductsResponseIdentification.php | 12 +- .../ProductsResponseIdentificationData.php | 88 +++---- src/Model/ProxyResult.php | 6 +- src/Model/RawDeviceAttributesResult.php | 2 +- src/Model/Response.php | 22 +- src/Model/ResponseVisits.php | 82 +++---- src/Model/RootAppsResult.php | 6 +- src/Model/SeenAt.php | 12 +- src/Model/SignalResponseClonedApp.php | 12 +- src/Model/SignalResponseEmulator.php | 12 +- src/Model/SignalResponseFactoryReset.php | 12 +- src/Model/SignalResponseFrida.php | 12 +- src/Model/SignalResponseHighActivity.php | 12 +- src/Model/SignalResponseIncognito.php | 12 +- src/Model/SignalResponseIpBlocklist.php | 12 +- src/Model/SignalResponseIpInfo.php | 12 +- src/Model/SignalResponseJailbroken.php | 12 +- src/Model/SignalResponseLocationSpoofing.php | 12 +- src/Model/SignalResponsePrivacySettings.php | 12 +- src/Model/SignalResponseProxy.php | 12 +- .../SignalResponseRawDeviceAttributes.php | 12 +- src/Model/SignalResponseRootApps.php | 12 +- src/Model/SignalResponseSuspectScore.php | 12 +- src/Model/SignalResponseTampering.php | 12 +- src/Model/SignalResponseTor.php | 12 +- src/Model/SignalResponseVirtualMachine.php | 12 +- src/Model/SignalResponseVpn.php | 12 +- src/Model/Subdivision.php | 12 +- src/Model/SuspectScoreResult.php | 6 +- src/Model/TamperingResult.php | 12 +- src/Model/TorResult.php | 6 +- src/Model/VirtualMachineResult.php | 6 +- src/Model/Visit.php | 82 +++---- src/Model/VpnResult.php | 24 +- src/Model/VpnResultMethods.php | 18 +- src/Model/WebhookVisit.php | 214 ++++++------------ template/ApiException.mustache | 12 + template/README.mustache | 4 +- template/api.mustache | 4 + template/model_generic.mustache | 4 +- 81 files changed, 575 insertions(+), 988 deletions(-) diff --git a/README.md b/README.md index f03f829e..197331ae 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,8 @@ You can use below code to verify signature: ```php getCode()) { case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\EventResponse'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent403Response'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; @@ -192,16 +198,22 @@ function ($e) { switch ($e->getCode()) { case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\EventResponse'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent403Response'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; @@ -275,16 +287,22 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin switch ($e->getCode()) { case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\Response'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisits403'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 429: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ManyRequestsResponse'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; @@ -344,16 +362,22 @@ function ($e) { switch ($e->getCode()) { case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\Response'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 403: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorVisits403'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; case 429: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ManyRequestsResponse'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; diff --git a/src/ApiException.php b/src/ApiException.php index fa79afad..a31ebdff 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -28,6 +28,7 @@ namespace Fingerprint\ServerAPI; +use Fingerprint\ServerAPI\Model\ModelInterface; use Psr\Http\Message\ResponseInterface; /** @@ -42,6 +43,7 @@ class ApiException extends \Exception { protected ResponseInterface $responseObject; + protected ModelInterface $errorDetails; public function __construct(?string $message = '', ?int $code = 0) { @@ -60,4 +62,14 @@ public function getResponseObject(): ResponseInterface { return $this->responseObject; } + + public function getErrorDetails(): ModelInterface + { + return $this->errorDetails; + } + + public function setErrorDetails(ModelInterface $errorDetails): void + { + $this->errorDetails = $errorDetails; + } } diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 39b08230..0b8b9c00 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -212,10 +212,8 @@ public function valid(): bool /** * Gets asn. - * - * @return string */ - public function getAsn() + public function getAsn(): string { return $this->container['asn']; } @@ -227,7 +225,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn): self + public function setAsn(string $asn): self { $this->container['asn'] = $asn; @@ -236,10 +234,8 @@ public function setAsn($asn): self /** * Gets network. - * - * @return string */ - public function getNetwork() + public function getNetwork(): string { return $this->container['network']; } @@ -251,7 +247,7 @@ public function getNetwork() * * @return $this */ - public function setNetwork($network): self + public function setNetwork(string $network): self { $this->container['network'] = $network; @@ -260,10 +256,8 @@ public function setNetwork($network): self /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -275,7 +269,7 @@ public function getName() * * @return $this */ - public function setName($name): self + public function setName(string $name): self { $this->container['name'] = $name; diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index e04a377a..cb5fee4b 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -229,10 +229,8 @@ public function valid(): bool /** * Gets result. - * - * @return string */ - public function getResult() + public function getResult(): string { return $this->container['result']; } @@ -244,7 +242,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(string $result): self { $allowedValues = $this->getResultAllowableValues(); if (!in_array($result, $allowedValues, true)) { @@ -262,10 +260,8 @@ public function setResult($result): self /** * Gets type. - * - * @return string */ - public function getType() + public function getType(): string { return $this->container['type']; } @@ -277,7 +273,7 @@ public function getType() * * @return $this */ - public function setType($type): self + public function setType(string $type): self { $this->container['type'] = $type; diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index b0d054a6..dd5b413a 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -250,10 +250,8 @@ public function valid(): bool /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -265,7 +263,7 @@ public function getIp() * * @return $this */ - public function setIp($ip): self + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -274,10 +272,8 @@ public function setIp($ip): self /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -289,7 +285,7 @@ public function getTime() * * @return $this */ - public function setTime($time): self + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -298,10 +294,8 @@ public function setTime($time): self /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -313,7 +307,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url): self + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -322,10 +316,8 @@ public function setUrl($url): self /** * Gets user_agent. - * - * @return string */ - public function getUserAgent() + public function getUserAgent(): string { return $this->container['user_agent']; } @@ -337,7 +329,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent): self + public function setUserAgent(string $user_agent): self { $this->container['user_agent'] = $user_agent; @@ -346,10 +338,8 @@ public function setUserAgent($user_agent): self /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -361,7 +351,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id): self + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -370,10 +360,8 @@ public function setRequestId($request_id): self /** * Gets linked_id. - * - * @return string */ - public function getLinkedId() + public function getLinkedId(): string { return $this->container['linked_id']; } @@ -385,7 +373,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id): self + public function setLinkedId(string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -394,10 +382,8 @@ public function setLinkedId($linked_id): self /** * Gets bot. - * - * @return BotdDetectionResult */ - public function getBot() + public function getBot(): BotdDetectionResult { return $this->container['bot']; } @@ -409,7 +395,7 @@ public function getBot() * * @return $this */ - public function setBot($bot): self + public function setBot(BotdDetectionResult $bot): self { $this->container['bot'] = $bot; diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index 4c6436be..818888fc 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -257,10 +257,8 @@ public function valid(): bool /** * Gets browser_name. - * - * @return string */ - public function getBrowserName() + public function getBrowserName(): string { return $this->container['browser_name']; } @@ -272,7 +270,7 @@ public function getBrowserName() * * @return $this */ - public function setBrowserName($browser_name): self + public function setBrowserName(string $browser_name): self { $this->container['browser_name'] = $browser_name; @@ -281,10 +279,8 @@ public function setBrowserName($browser_name): self /** * Gets browser_major_version. - * - * @return string */ - public function getBrowserMajorVersion() + public function getBrowserMajorVersion(): string { return $this->container['browser_major_version']; } @@ -296,7 +292,7 @@ public function getBrowserMajorVersion() * * @return $this */ - public function setBrowserMajorVersion($browser_major_version): self + public function setBrowserMajorVersion(string $browser_major_version): self { $this->container['browser_major_version'] = $browser_major_version; @@ -305,10 +301,8 @@ public function setBrowserMajorVersion($browser_major_version): self /** * Gets browser_full_version. - * - * @return string */ - public function getBrowserFullVersion() + public function getBrowserFullVersion(): string { return $this->container['browser_full_version']; } @@ -320,7 +314,7 @@ public function getBrowserFullVersion() * * @return $this */ - public function setBrowserFullVersion($browser_full_version): self + public function setBrowserFullVersion(string $browser_full_version): self { $this->container['browser_full_version'] = $browser_full_version; @@ -329,10 +323,8 @@ public function setBrowserFullVersion($browser_full_version): self /** * Gets os. - * - * @return string */ - public function getOs() + public function getOs(): string { return $this->container['os']; } @@ -344,7 +336,7 @@ public function getOs() * * @return $this */ - public function setOs($os): self + public function setOs(string $os): self { $this->container['os'] = $os; @@ -353,10 +345,8 @@ public function setOs($os): self /** * Gets os_version. - * - * @return string */ - public function getOsVersion() + public function getOsVersion(): string { return $this->container['os_version']; } @@ -368,7 +358,7 @@ public function getOsVersion() * * @return $this */ - public function setOsVersion($os_version): self + public function setOsVersion(string $os_version): self { $this->container['os_version'] = $os_version; @@ -377,10 +367,8 @@ public function setOsVersion($os_version): self /** * Gets device. - * - * @return string */ - public function getDevice() + public function getDevice(): string { return $this->container['device']; } @@ -392,7 +380,7 @@ public function getDevice() * * @return $this */ - public function setDevice($device): self + public function setDevice(string $device): self { $this->container['device'] = $device; @@ -401,10 +389,8 @@ public function setDevice($device): self /** * Gets user_agent. - * - * @return string */ - public function getUserAgent() + public function getUserAgent(): string { return $this->container['user_agent']; } @@ -416,7 +402,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent): self + public function setUserAgent(string $user_agent): self { $this->container['user_agent'] = $user_agent; @@ -425,10 +411,8 @@ public function setUserAgent($user_agent): self /** * Gets bot_probability. - * - * @return int */ - public function getBotProbability() + public function getBotProbability(): int { return $this->container['bot_probability']; } @@ -440,7 +424,7 @@ public function getBotProbability() * * @return $this */ - public function setBotProbability($bot_probability): self + public function setBotProbability(int $bot_probability): self { $this->container['bot_probability'] = $bot_probability; diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index 15fae901..61fd7c2d 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index 84db4fd0..ac489b0d 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets score. - * - * @return float */ - public function getScore() + public function getScore(): float { return $this->container['score']; } @@ -212,7 +210,7 @@ public function getScore() * * @return $this */ - public function setScore($score): self + public function setScore(float $score): self { $this->container['score'] = $score; diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index e44d4ced..ae0b650d 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -203,10 +203,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -218,7 +216,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -227,10 +225,8 @@ public function setResult($result): self /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -242,7 +238,7 @@ public function getName() * * @return $this */ - public function setName($name): self + public function setName(string $name): self { $this->container['name'] = $name; diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index 7ea9beb2..8eddef0b 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -241,10 +241,8 @@ public function valid(): bool /** * Gets accuracy_radius. - * - * @return int */ - public function getAccuracyRadius() + public function getAccuracyRadius(): int { return $this->container['accuracy_radius']; } @@ -256,7 +254,7 @@ public function getAccuracyRadius() * * @return $this */ - public function setAccuracyRadius($accuracy_radius): self + public function setAccuracyRadius(int $accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -265,10 +263,8 @@ public function setAccuracyRadius($accuracy_radius): self /** * Gets latitude. - * - * @return float */ - public function getLatitude() + public function getLatitude(): float { return $this->container['latitude']; } @@ -280,7 +276,7 @@ public function getLatitude() * * @return $this */ - public function setLatitude($latitude): self + public function setLatitude(float $latitude): self { $this->container['latitude'] = $latitude; @@ -289,10 +285,8 @@ public function setLatitude($latitude): self /** * Gets longitude. - * - * @return float */ - public function getLongitude() + public function getLongitude(): float { return $this->container['longitude']; } @@ -304,7 +298,7 @@ public function getLongitude() * * @return $this */ - public function setLongitude($longitude): self + public function setLongitude(float $longitude): self { $this->container['longitude'] = $longitude; @@ -313,10 +307,8 @@ public function setLongitude($longitude): self /** * Gets postal_code. - * - * @return string */ - public function getPostalCode() + public function getPostalCode(): string { return $this->container['postal_code']; } @@ -328,7 +320,7 @@ public function getPostalCode() * * @return $this */ - public function setPostalCode($postal_code): self + public function setPostalCode(string $postal_code): self { $this->container['postal_code'] = $postal_code; @@ -337,10 +329,8 @@ public function setPostalCode($postal_code): self /** * Gets timezone. - * - * @return string */ - public function getTimezone() + public function getTimezone(): string { return $this->container['timezone']; } @@ -352,7 +342,7 @@ public function getTimezone() * * @return $this */ - public function setTimezone($timezone): self + public function setTimezone(string $timezone): self { $this->container['timezone'] = $timezone; @@ -361,10 +351,8 @@ public function setTimezone($timezone): self /** * Gets city. - * - * @return DeprecatedIPLocationCity */ - public function getCity() + public function getCity(): DeprecatedIPLocationCity { return $this->container['city']; } @@ -376,7 +364,7 @@ public function getCity() * * @return $this */ - public function setCity($city): self + public function setCity(DeprecatedIPLocationCity $city): self { $this->container['city'] = $city; @@ -385,10 +373,8 @@ public function setCity($city): self /** * Gets country. - * - * @return Location */ - public function getCountry() + public function getCountry(): Location { return $this->container['country']; } @@ -400,7 +386,7 @@ public function getCountry() * * @return $this */ - public function setCountry($country): self + public function setCountry(Location $country): self { $this->container['country'] = $country; @@ -409,10 +395,8 @@ public function setCountry($country): self /** * Gets continent. - * - * @return Location */ - public function getContinent() + public function getContinent(): Location { return $this->container['continent']; } @@ -424,7 +408,7 @@ public function getContinent() * * @return $this */ - public function setContinent($continent): self + public function setContinent(Location $continent): self { $this->container['continent'] = $continent; @@ -436,7 +420,7 @@ public function setContinent($continent): self * * @return \Fingerprint\ServerAPI\Model\Subdivision[] */ - public function getSubdivisions() + public function getSubdivisions(): array { return $this->container['subdivisions']; } @@ -448,7 +432,7 @@ public function getSubdivisions() * * @return $this */ - public function setSubdivisions($subdivisions): self + public function setSubdivisions(array $subdivisions): self { $this->container['subdivisions'] = $subdivisions; diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index 7025cd42..6f485667 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -191,10 +191,8 @@ public function valid(): bool /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -206,7 +204,7 @@ public function getName() * * @return $this */ - public function setName($name): self + public function setName(string $name): self { $this->container['name'] = $name; diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index f6bb7ed7..0a4398fd 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index ba116f62..32d1a764 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -191,10 +191,8 @@ public function valid(): bool /** * Gets error. - * - * @return ErrorEvent403ResponseError */ - public function getError() + public function getError(): ErrorEvent403ResponseError { return $this->container['error']; } @@ -206,7 +204,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ErrorEvent403ResponseError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index aea1a345..702c754c 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -233,10 +233,8 @@ public function valid(): bool /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -248,7 +246,7 @@ public function getCode() * * @return $this */ - public function setCode($code): self + public function setCode(string $code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -266,10 +264,8 @@ public function setCode($code): self /** * Gets message. - * - * @return string */ - public function getMessage() + public function getMessage(): string { return $this->container['message']; } @@ -281,7 +277,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message): self + public function setMessage(string $message): self { $this->container['message'] = $message; diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index b3358e43..a6fbbb19 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -191,10 +191,8 @@ public function valid(): bool /** * Gets error. - * - * @return ErrorEvent404ResponseError */ - public function getError() + public function getError(): ErrorEvent404ResponseError { return $this->container['error']; } @@ -206,7 +204,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ErrorEvent404ResponseError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index 88142d91..607b1924 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -227,10 +227,8 @@ public function valid(): bool /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -242,7 +240,7 @@ public function getCode() * * @return $this */ - public function setCode($code): self + public function setCode(string $code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -260,10 +258,8 @@ public function setCode($code): self /** * Gets message. - * - * @return string */ - public function getMessage() + public function getMessage(): string { return $this->container['message']; } @@ -275,7 +271,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message): self + public function setMessage(string $message): self { $this->container['message'] = $message; diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 318c8060..297998f3 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets error. - * - * @return string */ - public function getError() + public function getError(): string { return $this->container['error']; } @@ -212,7 +210,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(string $error): self { $this->container['error'] = $error; diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 243ef3dc..2f525355 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -205,10 +205,8 @@ public function valid(): bool /** * Gets products. - * - * @return ProductsResponse */ - public function getProducts() + public function getProducts(): ProductsResponse { return $this->container['products']; } @@ -220,7 +218,7 @@ public function getProducts() * * @return $this */ - public function setProducts($products): self + public function setProducts(ProductsResponse $products): self { $this->container['products'] = $products; @@ -229,10 +227,8 @@ public function setProducts($products): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -244,7 +240,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 83f8617a..fbf1834d 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -206,10 +206,8 @@ public function valid(): bool /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -221,7 +219,7 @@ public function getTime() * * @return $this */ - public function setTime($time): self + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -230,10 +228,8 @@ public function setTime($time): self /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -245,7 +241,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp): self + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index 32b5887f..ad511bad 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index 9047bc79..43ff8284 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -203,10 +203,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -218,7 +216,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -227,10 +225,8 @@ public function setResult($result): self /** * Gets daily_requests. - * - * @return float */ - public function getDailyRequests() + public function getDailyRequests(): float { return $this->container['daily_requests']; } @@ -242,7 +238,7 @@ public function getDailyRequests() * * @return $this */ - public function setDailyRequests($daily_requests): self + public function setDailyRequests(float $daily_requests): self { $this->container['daily_requests'] = $daily_requests; diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 5310c895..0adebf00 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -239,10 +239,8 @@ public function valid(): bool /** * Gets accuracy_radius. - * - * @return int */ - public function getAccuracyRadius() + public function getAccuracyRadius(): int { return $this->container['accuracy_radius']; } @@ -254,7 +252,7 @@ public function getAccuracyRadius() * * @return $this */ - public function setAccuracyRadius($accuracy_radius): self + public function setAccuracyRadius(int $accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -263,10 +261,8 @@ public function setAccuracyRadius($accuracy_radius): self /** * Gets latitude. - * - * @return float */ - public function getLatitude() + public function getLatitude(): float { return $this->container['latitude']; } @@ -278,7 +274,7 @@ public function getLatitude() * * @return $this */ - public function setLatitude($latitude): self + public function setLatitude(float $latitude): self { $this->container['latitude'] = $latitude; @@ -287,10 +283,8 @@ public function setLatitude($latitude): self /** * Gets longitude. - * - * @return float */ - public function getLongitude() + public function getLongitude(): float { return $this->container['longitude']; } @@ -302,7 +296,7 @@ public function getLongitude() * * @return $this */ - public function setLongitude($longitude): self + public function setLongitude(float $longitude): self { $this->container['longitude'] = $longitude; @@ -311,10 +305,8 @@ public function setLongitude($longitude): self /** * Gets postal_code. - * - * @return string */ - public function getPostalCode() + public function getPostalCode(): string { return $this->container['postal_code']; } @@ -326,7 +318,7 @@ public function getPostalCode() * * @return $this */ - public function setPostalCode($postal_code): self + public function setPostalCode(string $postal_code): self { $this->container['postal_code'] = $postal_code; @@ -335,10 +327,8 @@ public function setPostalCode($postal_code): self /** * Gets timezone. - * - * @return string */ - public function getTimezone() + public function getTimezone(): string { return $this->container['timezone']; } @@ -350,7 +340,7 @@ public function getTimezone() * * @return $this */ - public function setTimezone($timezone): self + public function setTimezone(string $timezone): self { $this->container['timezone'] = $timezone; @@ -359,10 +349,8 @@ public function setTimezone($timezone): self /** * Gets city. - * - * @return IPLocationCity */ - public function getCity() + public function getCity(): IPLocationCity { return $this->container['city']; } @@ -374,7 +362,7 @@ public function getCity() * * @return $this */ - public function setCity($city): self + public function setCity(IPLocationCity $city): self { $this->container['city'] = $city; @@ -383,10 +371,8 @@ public function setCity($city): self /** * Gets country. - * - * @return Location */ - public function getCountry() + public function getCountry(): Location { return $this->container['country']; } @@ -398,7 +384,7 @@ public function getCountry() * * @return $this */ - public function setCountry($country): self + public function setCountry(Location $country): self { $this->container['country'] = $country; @@ -407,10 +393,8 @@ public function setCountry($country): self /** * Gets continent. - * - * @return Location */ - public function getContinent() + public function getContinent(): Location { return $this->container['continent']; } @@ -422,7 +406,7 @@ public function getContinent() * * @return $this */ - public function setContinent($continent): self + public function setContinent(Location $continent): self { $this->container['continent'] = $continent; @@ -434,7 +418,7 @@ public function setContinent($continent): self * * @return \Fingerprint\ServerAPI\Model\Subdivision[] */ - public function getSubdivisions() + public function getSubdivisions(): array { return $this->container['subdivisions']; } @@ -446,7 +430,7 @@ public function getSubdivisions() * * @return $this */ - public function setSubdivisions($subdivisions): self + public function setSubdivisions(array $subdivisions): self { $this->container['subdivisions'] = $subdivisions; diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index be5c2707..daba3d17 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -191,10 +191,8 @@ public function valid(): bool /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -206,7 +204,7 @@ public function getName() * * @return $this */ - public function setName($name): self + public function setName(string $name): self { $this->container['name'] = $name; diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index a100c8b3..c8890cc4 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -229,10 +229,8 @@ public function valid(): bool /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -244,7 +242,7 @@ public function getCode() * * @return $this */ - public function setCode($code): self + public function setCode(string $code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -262,10 +260,8 @@ public function setCode($code): self /** * Gets message. - * - * @return string */ - public function getMessage() + public function getMessage(): string { return $this->container['message']; } @@ -277,7 +273,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message): self + public function setMessage(string $message): self { $this->container['message'] = $message; diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index 15325b69..6299cc93 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index e16568b2..c6131829 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -206,10 +206,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -221,7 +219,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -230,10 +228,8 @@ public function setResult($result): self /** * Gets details. - * - * @return IpBlockListResultDetails */ - public function getDetails() + public function getDetails(): IpBlockListResultDetails { return $this->container['details']; } @@ -245,7 +241,7 @@ public function getDetails() * * @return $this */ - public function setDetails($details): self + public function setDetails(IpBlockListResultDetails $details): self { $this->container['details'] = $details; diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 15427c7b..0695fbc1 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -206,10 +206,8 @@ public function valid(): bool /** * Gets email_spam. - * - * @return bool */ - public function getEmailSpam() + public function getEmailSpam(): bool { return $this->container['email_spam']; } @@ -221,7 +219,7 @@ public function getEmailSpam() * * @return $this */ - public function setEmailSpam($email_spam): self + public function setEmailSpam(bool $email_spam): self { $this->container['email_spam'] = $email_spam; @@ -230,10 +228,8 @@ public function setEmailSpam($email_spam): self /** * Gets attack_source. - * - * @return bool */ - public function getAttackSource() + public function getAttackSource(): bool { return $this->container['attack_source']; } @@ -245,7 +241,7 @@ public function getAttackSource() * * @return $this */ - public function setAttackSource($attack_source): self + public function setAttackSource(bool $attack_source): self { $this->container['attack_source'] = $attack_source; diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index 5b7130ec..b4db3099 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -199,10 +199,8 @@ public function valid(): bool /** * Gets v4. - * - * @return IpInfoResultV4 */ - public function getV4() + public function getV4(): IpInfoResultV4 { return $this->container['v4']; } @@ -214,7 +212,7 @@ public function getV4() * * @return $this */ - public function setV4($v4): self + public function setV4(IpInfoResultV4 $v4): self { $this->container['v4'] = $v4; @@ -223,10 +221,8 @@ public function setV4($v4): self /** * Gets v6. - * - * @return IpInfoResultV6 */ - public function getV6() + public function getV6(): IpInfoResultV6 { return $this->container['v6']; } @@ -238,7 +234,7 @@ public function getV6() * * @return $this */ - public function setV6($v6): self + public function setV6(IpInfoResultV6 $v6): self { $this->container['v6'] = $v6; diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index f26007c1..039d34f4 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -218,10 +218,8 @@ public function valid(): bool /** * Gets address. - * - * @return string */ - public function getAddress() + public function getAddress(): string { return $this->container['address']; } @@ -233,7 +231,7 @@ public function getAddress() * * @return $this */ - public function setAddress($address): self + public function setAddress(string $address): self { $this->container['address'] = $address; @@ -242,10 +240,8 @@ public function setAddress($address): self /** * Gets geolocation. - * - * @return IPLocation */ - public function getGeolocation() + public function getGeolocation(): IPLocation { return $this->container['geolocation']; } @@ -257,7 +253,7 @@ public function getGeolocation() * * @return $this */ - public function setGeolocation($geolocation): self + public function setGeolocation(IPLocation $geolocation): self { $this->container['geolocation'] = $geolocation; @@ -266,10 +262,8 @@ public function setGeolocation($geolocation): self /** * Gets asn. - * - * @return ASN */ - public function getAsn() + public function getAsn(): ASN { return $this->container['asn']; } @@ -281,7 +275,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn): self + public function setAsn(ASN $asn): self { $this->container['asn'] = $asn; @@ -290,10 +284,8 @@ public function setAsn($asn): self /** * Gets datacenter. - * - * @return DataCenter */ - public function getDatacenter() + public function getDatacenter(): DataCenter { return $this->container['datacenter']; } @@ -305,7 +297,7 @@ public function getDatacenter() * * @return $this */ - public function setDatacenter($datacenter): self + public function setDatacenter(DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index f4ce13f9..22e5ad29 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -218,10 +218,8 @@ public function valid(): bool /** * Gets address. - * - * @return string */ - public function getAddress() + public function getAddress(): string { return $this->container['address']; } @@ -233,7 +231,7 @@ public function getAddress() * * @return $this */ - public function setAddress($address): self + public function setAddress(string $address): self { $this->container['address'] = $address; @@ -242,10 +240,8 @@ public function setAddress($address): self /** * Gets geolocation. - * - * @return IPLocation */ - public function getGeolocation() + public function getGeolocation(): IPLocation { return $this->container['geolocation']; } @@ -257,7 +253,7 @@ public function getGeolocation() * * @return $this */ - public function setGeolocation($geolocation): self + public function setGeolocation(IPLocation $geolocation): self { $this->container['geolocation'] = $geolocation; @@ -266,10 +262,8 @@ public function setGeolocation($geolocation): self /** * Gets asn. - * - * @return ASN */ - public function getAsn() + public function getAsn(): ASN { return $this->container['asn']; } @@ -281,7 +275,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn): self + public function setAsn(ASN $asn): self { $this->container['asn'] = $asn; @@ -290,10 +284,8 @@ public function setAsn($asn): self /** * Gets datacenter. - * - * @return DataCenter */ - public function getDatacenter() + public function getDatacenter(): DataCenter { return $this->container['datacenter']; } @@ -305,7 +297,7 @@ public function getDatacenter() * * @return $this */ - public function setDatacenter($datacenter): self + public function setDatacenter(DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index acee0e24..fa94ca4d 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/Location.php b/src/Model/Location.php index f544a828..10af00e7 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -206,10 +206,8 @@ public function valid(): bool /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -221,7 +219,7 @@ public function getCode() * * @return $this */ - public function setCode($code): self + public function setCode(string $code): self { $this->container['code'] = $code; @@ -230,10 +228,8 @@ public function setCode($code): self /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -245,7 +241,7 @@ public function getName() * * @return $this */ - public function setName($name): self + public function setName(string $name): self { $this->container['name'] = $name; diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index e74b634a..fb7e697c 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 7e8b0608..f2c782c5 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets error. - * - * @return string */ - public function getError() + public function getError(): string { return $this->container['error']; } @@ -212,7 +210,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(string $error): self { $this->container['error'] = $error; diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index b0867854..28bcb9a6 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index c5f19ab3..5a0879e9 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -229,10 +229,8 @@ public function valid(): bool /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -244,7 +242,7 @@ public function getCode() * * @return $this */ - public function setCode($code): self + public function setCode(string $code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -262,10 +260,8 @@ public function setCode($code): self /** * Gets message. - * - * @return string */ - public function getMessage() + public function getMessage(): string { return $this->container['message']; } @@ -277,7 +273,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message): self + public function setMessage(string $message): self { $this->container['message'] = $message; diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index 8a98ff3e..227618bd 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -313,10 +313,8 @@ public function valid(): bool /** * Gets identification. - * - * @return ProductsResponseIdentification */ - public function getIdentification() + public function getIdentification(): ProductsResponseIdentification { return $this->container['identification']; } @@ -328,7 +326,7 @@ public function getIdentification() * * @return $this */ - public function setIdentification($identification): self + public function setIdentification(ProductsResponseIdentification $identification): self { $this->container['identification'] = $identification; @@ -337,10 +335,8 @@ public function setIdentification($identification): self /** * Gets botd. - * - * @return ProductsResponseBotd */ - public function getBotd() + public function getBotd(): ProductsResponseBotd { return $this->container['botd']; } @@ -352,7 +348,7 @@ public function getBotd() * * @return $this */ - public function setBotd($botd): self + public function setBotd(ProductsResponseBotd $botd): self { $this->container['botd'] = $botd; @@ -361,10 +357,8 @@ public function setBotd($botd): self /** * Gets ip_info. - * - * @return SignalResponseIpInfo */ - public function getIpInfo() + public function getIpInfo(): SignalResponseIpInfo { return $this->container['ip_info']; } @@ -376,7 +370,7 @@ public function getIpInfo() * * @return $this */ - public function setIpInfo($ip_info): self + public function setIpInfo(SignalResponseIpInfo $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -385,10 +379,8 @@ public function setIpInfo($ip_info): self /** * Gets incognito. - * - * @return SignalResponseIncognito */ - public function getIncognito() + public function getIncognito(): SignalResponseIncognito { return $this->container['incognito']; } @@ -400,7 +392,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito): self + public function setIncognito(SignalResponseIncognito $incognito): self { $this->container['incognito'] = $incognito; @@ -409,10 +401,8 @@ public function setIncognito($incognito): self /** * Gets root_apps. - * - * @return SignalResponseRootApps */ - public function getRootApps() + public function getRootApps(): SignalResponseRootApps { return $this->container['root_apps']; } @@ -424,7 +414,7 @@ public function getRootApps() * * @return $this */ - public function setRootApps($root_apps): self + public function setRootApps(SignalResponseRootApps $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -433,10 +423,8 @@ public function setRootApps($root_apps): self /** * Gets emulator. - * - * @return SignalResponseEmulator */ - public function getEmulator() + public function getEmulator(): SignalResponseEmulator { return $this->container['emulator']; } @@ -448,7 +436,7 @@ public function getEmulator() * * @return $this */ - public function setEmulator($emulator): self + public function setEmulator(SignalResponseEmulator $emulator): self { $this->container['emulator'] = $emulator; @@ -457,10 +445,8 @@ public function setEmulator($emulator): self /** * Gets cloned_app. - * - * @return SignalResponseClonedApp */ - public function getClonedApp() + public function getClonedApp(): SignalResponseClonedApp { return $this->container['cloned_app']; } @@ -472,7 +458,7 @@ public function getClonedApp() * * @return $this */ - public function setClonedApp($cloned_app): self + public function setClonedApp(SignalResponseClonedApp $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -481,10 +467,8 @@ public function setClonedApp($cloned_app): self /** * Gets factory_reset. - * - * @return SignalResponseFactoryReset */ - public function getFactoryReset() + public function getFactoryReset(): SignalResponseFactoryReset { return $this->container['factory_reset']; } @@ -496,7 +480,7 @@ public function getFactoryReset() * * @return $this */ - public function setFactoryReset($factory_reset): self + public function setFactoryReset(SignalResponseFactoryReset $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -505,10 +489,8 @@ public function setFactoryReset($factory_reset): self /** * Gets jailbroken. - * - * @return SignalResponseJailbroken */ - public function getJailbroken() + public function getJailbroken(): SignalResponseJailbroken { return $this->container['jailbroken']; } @@ -520,7 +502,7 @@ public function getJailbroken() * * @return $this */ - public function setJailbroken($jailbroken): self + public function setJailbroken(SignalResponseJailbroken $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -529,10 +511,8 @@ public function setJailbroken($jailbroken): self /** * Gets frida. - * - * @return SignalResponseFrida */ - public function getFrida() + public function getFrida(): SignalResponseFrida { return $this->container['frida']; } @@ -544,7 +524,7 @@ public function getFrida() * * @return $this */ - public function setFrida($frida): self + public function setFrida(SignalResponseFrida $frida): self { $this->container['frida'] = $frida; @@ -553,10 +533,8 @@ public function setFrida($frida): self /** * Gets ip_blocklist. - * - * @return SignalResponseIpBlocklist */ - public function getIpBlocklist() + public function getIpBlocklist(): SignalResponseIpBlocklist { return $this->container['ip_blocklist']; } @@ -568,7 +546,7 @@ public function getIpBlocklist() * * @return $this */ - public function setIpBlocklist($ip_blocklist): self + public function setIpBlocklist(SignalResponseIpBlocklist $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -577,10 +555,8 @@ public function setIpBlocklist($ip_blocklist): self /** * Gets tor. - * - * @return SignalResponseTor */ - public function getTor() + public function getTor(): SignalResponseTor { return $this->container['tor']; } @@ -592,7 +568,7 @@ public function getTor() * * @return $this */ - public function setTor($tor): self + public function setTor(SignalResponseTor $tor): self { $this->container['tor'] = $tor; @@ -601,10 +577,8 @@ public function setTor($tor): self /** * Gets privacy_settings. - * - * @return SignalResponsePrivacySettings */ - public function getPrivacySettings() + public function getPrivacySettings(): SignalResponsePrivacySettings { return $this->container['privacy_settings']; } @@ -616,7 +590,7 @@ public function getPrivacySettings() * * @return $this */ - public function setPrivacySettings($privacy_settings): self + public function setPrivacySettings(SignalResponsePrivacySettings $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -625,10 +599,8 @@ public function setPrivacySettings($privacy_settings): self /** * Gets virtual_machine. - * - * @return SignalResponseVirtualMachine */ - public function getVirtualMachine() + public function getVirtualMachine(): SignalResponseVirtualMachine { return $this->container['virtual_machine']; } @@ -640,7 +612,7 @@ public function getVirtualMachine() * * @return $this */ - public function setVirtualMachine($virtual_machine): self + public function setVirtualMachine(SignalResponseVirtualMachine $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -649,10 +621,8 @@ public function setVirtualMachine($virtual_machine): self /** * Gets vpn. - * - * @return SignalResponseVpn */ - public function getVpn() + public function getVpn(): SignalResponseVpn { return $this->container['vpn']; } @@ -664,7 +634,7 @@ public function getVpn() * * @return $this */ - public function setVpn($vpn): self + public function setVpn(SignalResponseVpn $vpn): self { $this->container['vpn'] = $vpn; @@ -673,10 +643,8 @@ public function setVpn($vpn): self /** * Gets proxy. - * - * @return SignalResponseProxy */ - public function getProxy() + public function getProxy(): SignalResponseProxy { return $this->container['proxy']; } @@ -688,7 +656,7 @@ public function getProxy() * * @return $this */ - public function setProxy($proxy): self + public function setProxy(SignalResponseProxy $proxy): self { $this->container['proxy'] = $proxy; @@ -697,10 +665,8 @@ public function setProxy($proxy): self /** * Gets tampering. - * - * @return SignalResponseTampering */ - public function getTampering() + public function getTampering(): SignalResponseTampering { return $this->container['tampering']; } @@ -712,7 +678,7 @@ public function getTampering() * * @return $this */ - public function setTampering($tampering): self + public function setTampering(SignalResponseTampering $tampering): self { $this->container['tampering'] = $tampering; @@ -721,10 +687,8 @@ public function setTampering($tampering): self /** * Gets high_activity. - * - * @return SignalResponseHighActivity */ - public function getHighActivity() + public function getHighActivity(): SignalResponseHighActivity { return $this->container['high_activity']; } @@ -736,7 +700,7 @@ public function getHighActivity() * * @return $this */ - public function setHighActivity($high_activity): self + public function setHighActivity(SignalResponseHighActivity $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -745,10 +709,8 @@ public function setHighActivity($high_activity): self /** * Gets location_spoofing. - * - * @return SignalResponseLocationSpoofing */ - public function getLocationSpoofing() + public function getLocationSpoofing(): SignalResponseLocationSpoofing { return $this->container['location_spoofing']; } @@ -760,7 +722,7 @@ public function getLocationSpoofing() * * @return $this */ - public function setLocationSpoofing($location_spoofing): self + public function setLocationSpoofing(SignalResponseLocationSpoofing $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -769,10 +731,8 @@ public function setLocationSpoofing($location_spoofing): self /** * Gets suspect_score. - * - * @return SignalResponseSuspectScore */ - public function getSuspectScore() + public function getSuspectScore(): SignalResponseSuspectScore { return $this->container['suspect_score']; } @@ -784,7 +744,7 @@ public function getSuspectScore() * * @return $this */ - public function setSuspectScore($suspect_score): self + public function setSuspectScore(SignalResponseSuspectScore $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -793,10 +753,8 @@ public function setSuspectScore($suspect_score): self /** * Gets raw_device_attributes. - * - * @return SignalResponseRawDeviceAttributes */ - public function getRawDeviceAttributes() + public function getRawDeviceAttributes(): SignalResponseRawDeviceAttributes { return $this->container['raw_device_attributes']; } @@ -808,7 +766,7 @@ public function getRawDeviceAttributes() * * @return $this */ - public function setRawDeviceAttributes($raw_device_attributes): self + public function setRawDeviceAttributes(SignalResponseRawDeviceAttributes $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 1a5cca7a..8fa43a4d 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return BotdResult */ - public function getData() + public function getData(): BotdResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(BotdResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index 47ef4eab..43906044 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return ProductsResponseIdentificationData */ - public function getData() + public function getData(): ProductsResponseIdentificationData { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(ProductsResponseIdentificationData $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return IdentificationError */ - public function getError() + public function getError(): IdentificationError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(IdentificationError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 825798c3..c79885d8 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -314,10 +314,8 @@ public function valid(): bool /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -329,7 +327,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id): self + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -338,10 +336,8 @@ public function setRequestId($request_id): self /** * Gets browser_details. - * - * @return BrowserDetails */ - public function getBrowserDetails() + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -353,7 +349,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details): self + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -362,10 +358,8 @@ public function setBrowserDetails($browser_details): self /** * Gets incognito. - * - * @return bool */ - public function getIncognito() + public function getIncognito(): bool { return $this->container['incognito']; } @@ -377,7 +371,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito): self + public function setIncognito(bool $incognito): self { $this->container['incognito'] = $incognito; @@ -386,10 +380,8 @@ public function setIncognito($incognito): self /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -401,7 +393,7 @@ public function getIp() * * @return $this */ - public function setIp($ip): self + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -410,10 +402,8 @@ public function setIp($ip): self /** * Gets ip_location. - * - * @return DeprecatedIPLocation */ - public function getIpLocation() + public function getIpLocation(): DeprecatedIPLocation { return $this->container['ip_location']; } @@ -425,7 +415,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location): self + public function setIpLocation(DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -434,10 +424,8 @@ public function setIpLocation($ip_location): self /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -449,7 +437,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp): self + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -458,10 +446,8 @@ public function setTimestamp($timestamp): self /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -473,7 +459,7 @@ public function getTime() * * @return $this */ - public function setTime($time): self + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -482,10 +468,8 @@ public function setTime($time): self /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -497,7 +481,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url): self + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -509,7 +493,7 @@ public function setUrl($url): self * * @return map[string,object] */ - public function getTag() + public function getTag(): array { return $this->container['tag']; } @@ -521,7 +505,7 @@ public function getTag() * * @return $this */ - public function setTag($tag): self + public function setTag(array $tag): self { $this->container['tag'] = $tag; @@ -530,10 +514,8 @@ public function setTag($tag): self /** * Gets linked_id. - * - * @return string */ - public function getLinkedId() + public function getLinkedId(): string { return $this->container['linked_id']; } @@ -545,7 +527,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id): self + public function setLinkedId(string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -554,10 +536,8 @@ public function setLinkedId($linked_id): self /** * Gets confidence. - * - * @return Confidence */ - public function getConfidence() + public function getConfidence(): Confidence { return $this->container['confidence']; } @@ -569,7 +549,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence): self + public function setConfidence(Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -578,10 +558,8 @@ public function setConfidence($confidence): self /** * Gets visitor_found. - * - * @return bool */ - public function getVisitorFound() + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -593,7 +571,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found): self + public function setVisitorFound(bool $visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -602,10 +580,8 @@ public function setVisitorFound($visitor_found): self /** * Gets first_seen_at. - * - * @return SeenAt */ - public function getFirstSeenAt() + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -617,7 +593,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at): self + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -626,10 +602,8 @@ public function setFirstSeenAt($first_seen_at): self /** * Gets last_seen_at. - * - * @return SeenAt */ - public function getLastSeenAt() + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -641,7 +615,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at): self + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -650,10 +624,8 @@ public function setLastSeenAt($last_seen_at): self /** * Gets visitor_id. - * - * @return string */ - public function getVisitorId() + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -665,7 +637,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id): self + public function setVisitorId(string $visitor_id): self { $this->container['visitor_id'] = $visitor_id; diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 7f55eabd..0ba7fc50 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 1e560cb3..233734d2 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -174,7 +174,7 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + return parent::listInvalidProperties(); } /** diff --git a/src/Model/Response.php b/src/Model/Response.php index ba28cde0..1573ddd6 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -220,10 +220,8 @@ public function valid(): bool /** * Gets visitor_id. - * - * @return string */ - public function getVisitorId() + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -235,7 +233,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id): self + public function setVisitorId(string $visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -247,7 +245,7 @@ public function setVisitorId($visitor_id): self * * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] */ - public function getVisits() + public function getVisits(): array { return $this->container['visits']; } @@ -259,7 +257,7 @@ public function getVisits() * * @return $this */ - public function setVisits($visits): self + public function setVisits(array $visits): self { $this->container['visits'] = $visits; @@ -268,10 +266,8 @@ public function setVisits($visits): self /** * Gets last_timestamp. - * - * @return int */ - public function getLastTimestamp() + public function getLastTimestamp(): int { return $this->container['last_timestamp']; } @@ -283,7 +279,7 @@ public function getLastTimestamp() * * @return $this */ - public function setLastTimestamp($last_timestamp): self + public function setLastTimestamp(int $last_timestamp): self { $this->container['last_timestamp'] = $last_timestamp; @@ -292,10 +288,8 @@ public function setLastTimestamp($last_timestamp): self /** * Gets pagination_key. - * - * @return string */ - public function getPaginationKey() + public function getPaginationKey(): string { return $this->container['pagination_key']; } @@ -307,7 +301,7 @@ public function getPaginationKey() * * @return $this */ - public function setPaginationKey($pagination_key): self + public function setPaginationKey(string $pagination_key): self { $this->container['pagination_key'] = $pagination_key; diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 883abe97..e464db9b 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -305,10 +305,8 @@ public function valid(): bool /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -320,7 +318,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id): self + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -329,10 +327,8 @@ public function setRequestId($request_id): self /** * Gets browser_details. - * - * @return BrowserDetails */ - public function getBrowserDetails() + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -344,7 +340,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details): self + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -353,10 +349,8 @@ public function setBrowserDetails($browser_details): self /** * Gets incognito. - * - * @return bool */ - public function getIncognito() + public function getIncognito(): bool { return $this->container['incognito']; } @@ -368,7 +362,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito): self + public function setIncognito(bool $incognito): self { $this->container['incognito'] = $incognito; @@ -377,10 +371,8 @@ public function setIncognito($incognito): self /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -392,7 +384,7 @@ public function getIp() * * @return $this */ - public function setIp($ip): self + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -401,10 +393,8 @@ public function setIp($ip): self /** * Gets ip_location. - * - * @return DeprecatedIPLocation */ - public function getIpLocation() + public function getIpLocation(): DeprecatedIPLocation { return $this->container['ip_location']; } @@ -416,7 +406,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location): self + public function setIpLocation(DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -425,10 +415,8 @@ public function setIpLocation($ip_location): self /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -440,7 +428,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp): self + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -449,10 +437,8 @@ public function setTimestamp($timestamp): self /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -464,7 +450,7 @@ public function getTime() * * @return $this */ - public function setTime($time): self + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -473,10 +459,8 @@ public function setTime($time): self /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -488,7 +472,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url): self + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -500,7 +484,7 @@ public function setUrl($url): self * * @return map[string,object] */ - public function getTag() + public function getTag(): array { return $this->container['tag']; } @@ -512,7 +496,7 @@ public function getTag() * * @return $this */ - public function setTag($tag): self + public function setTag(array $tag): self { $this->container['tag'] = $tag; @@ -521,10 +505,8 @@ public function setTag($tag): self /** * Gets linked_id. - * - * @return string */ - public function getLinkedId() + public function getLinkedId(): string { return $this->container['linked_id']; } @@ -536,7 +518,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id): self + public function setLinkedId(string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -545,10 +527,8 @@ public function setLinkedId($linked_id): self /** * Gets confidence. - * - * @return Confidence */ - public function getConfidence() + public function getConfidence(): Confidence { return $this->container['confidence']; } @@ -560,7 +540,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence): self + public function setConfidence(Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -569,10 +549,8 @@ public function setConfidence($confidence): self /** * Gets visitor_found. - * - * @return bool */ - public function getVisitorFound() + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -584,7 +562,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found): self + public function setVisitorFound(bool $visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -593,10 +571,8 @@ public function setVisitorFound($visitor_found): self /** * Gets first_seen_at. - * - * @return SeenAt */ - public function getFirstSeenAt() + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -608,7 +584,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at): self + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -617,10 +593,8 @@ public function setFirstSeenAt($first_seen_at): self /** * Gets last_seen_at. - * - * @return SeenAt */ - public function getLastSeenAt() + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -632,7 +606,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at): self + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index dc3a61c4..6c1c82cf 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 9084fead..29de802d 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -206,10 +206,8 @@ public function valid(): bool /** * Gets global. - * - * @return \DateTime */ - public function getGlobal() + public function getGlobal(): \DateTime { return $this->container['global']; } @@ -221,7 +219,7 @@ public function getGlobal() * * @return $this */ - public function setGlobal($global): self + public function setGlobal(\DateTime $global): self { $this->container['global'] = $global; @@ -230,10 +228,8 @@ public function setGlobal($global): self /** * Gets subscription. - * - * @return \DateTime */ - public function getSubscription() + public function getSubscription(): \DateTime { return $this->container['subscription']; } @@ -245,7 +241,7 @@ public function getSubscription() * * @return $this */ - public function setSubscription($subscription): self + public function setSubscription(\DateTime $subscription): self { $this->container['subscription'] = $subscription; diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 95f27ffe..66bc4085 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return ClonedAppResult */ - public function getData() + public function getData(): ClonedAppResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(ClonedAppResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 22fe1763..a87a13bc 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return EmulatorResult */ - public function getData() + public function getData(): EmulatorResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(EmulatorResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 6be91f8f..2271eb8d 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return FactoryResetResult */ - public function getData() + public function getData(): FactoryResetResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(FactoryResetResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index fa3d624a..e1e6069c 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return FridaResult */ - public function getData() + public function getData(): FridaResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(FridaResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 3efa9c30..d8cee703 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return HighActivityResult */ - public function getData() + public function getData(): HighActivityResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(HighActivityResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 76d265e1..63532391 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return IncognitoResult */ - public function getData() + public function getData(): IncognitoResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(IncognitoResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index 7716218d..edf0c8b3 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return IpBlockListResult */ - public function getData() + public function getData(): IpBlockListResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(IpBlockListResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 9fad6670..a92d2c8e 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return IpInfoResult */ - public function getData() + public function getData(): IpInfoResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(IpInfoResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index 64882ebe..2552af44 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return JailbrokenResult */ - public function getData() + public function getData(): JailbrokenResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(JailbrokenResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index c09e19a8..d6331aa5 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return LocationSpoofingResult */ - public function getData() + public function getData(): LocationSpoofingResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(LocationSpoofingResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index 79378ceb..e39bcce4 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return PrivacySettingsResult */ - public function getData() + public function getData(): PrivacySettingsResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(PrivacySettingsResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index 779c7d5e..436479c1 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return ProxyResult */ - public function getData() + public function getData(): ProxyResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(ProxyResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 85457227..fe3aab0e 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return RawDeviceAttributesResult */ - public function getData() + public function getData(): array { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(array $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index a89406e5..896e6484 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return RootAppsResult */ - public function getData() + public function getData(): RootAppsResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(RootAppsResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index 8497b239..0c136c51 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return SuspectScoreResult */ - public function getData() + public function getData(): SuspectScoreResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(SuspectScoreResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 37b2b0cb..e90e1c49 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return TamperingResult */ - public function getData() + public function getData(): TamperingResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(TamperingResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 7bfacdff..1a1e6078 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return TorResult */ - public function getData() + public function getData(): TorResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(TorResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 9fa479e9..5bb17656 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return VirtualMachineResult */ - public function getData() + public function getData(): VirtualMachineResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(VirtualMachineResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 76eb851d..17f231be 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets data. - * - * @return VpnResult */ - public function getData() + public function getData(): VpnResult { return $this->container['data']; } @@ -212,7 +210,7 @@ public function getData() * * @return $this */ - public function setData($data): self + public function setData(VpnResult $data): self { $this->container['data'] = $data; @@ -221,10 +219,8 @@ public function setData($data): self /** * Gets error. - * - * @return ProductError */ - public function getError() + public function getError(): ProductError { return $this->container['error']; } @@ -236,7 +232,7 @@ public function getError() * * @return $this */ - public function setError($error): self + public function setError(ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index 78887fc4..ef9a3576 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets iso_code. - * - * @return string */ - public function getIsoCode() + public function getIsoCode(): string { return $this->container['iso_code']; } @@ -212,7 +210,7 @@ public function getIsoCode() * * @return $this */ - public function setIsoCode($iso_code): self + public function setIsoCode(string $iso_code): self { $this->container['iso_code'] = $iso_code; @@ -221,10 +219,8 @@ public function setIsoCode($iso_code): self /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -236,7 +232,7 @@ public function getName() * * @return $this */ - public function setName($name): self + public function setName(string $name): self { $this->container['name'] = $name; diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index 78a40f5d..3225bda1 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return int */ - public function getResult() + public function getResult(): int { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(int $result): self { $this->container['result'] = $result; diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index 74a2ac26..e642bcd4 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -206,10 +206,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -221,7 +219,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -230,10 +228,8 @@ public function setResult($result): self /** * Gets anomaly_score. - * - * @return float */ - public function getAnomalyScore() + public function getAnomalyScore(): float { return $this->container['anomaly_score']; } @@ -245,7 +241,7 @@ public function getAnomalyScore() * * @return $this */ - public function setAnomalyScore($anomaly_score): self + public function setAnomalyScore(float $anomaly_score): self { $this->container['anomaly_score'] = $anomaly_score; diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index 1f1fdfd0..c09aeaaf 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 9d457f1a..644f9144 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -197,10 +197,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -212,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 60889bbe..30d8926d 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -305,10 +305,8 @@ public function valid(): bool /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -320,7 +318,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id): self + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -329,10 +327,8 @@ public function setRequestId($request_id): self /** * Gets browser_details. - * - * @return BrowserDetails */ - public function getBrowserDetails() + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -344,7 +340,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details): self + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -353,10 +349,8 @@ public function setBrowserDetails($browser_details): self /** * Gets incognito. - * - * @return bool */ - public function getIncognito() + public function getIncognito(): bool { return $this->container['incognito']; } @@ -368,7 +362,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito): self + public function setIncognito(bool $incognito): self { $this->container['incognito'] = $incognito; @@ -377,10 +371,8 @@ public function setIncognito($incognito): self /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -392,7 +384,7 @@ public function getIp() * * @return $this */ - public function setIp($ip): self + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -401,10 +393,8 @@ public function setIp($ip): self /** * Gets ip_location. - * - * @return DeprecatedIPLocation */ - public function getIpLocation() + public function getIpLocation(): DeprecatedIPLocation { return $this->container['ip_location']; } @@ -416,7 +406,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location): self + public function setIpLocation(DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -425,10 +415,8 @@ public function setIpLocation($ip_location): self /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -440,7 +428,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp): self + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -449,10 +437,8 @@ public function setTimestamp($timestamp): self /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -464,7 +450,7 @@ public function getTime() * * @return $this */ - public function setTime($time): self + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -473,10 +459,8 @@ public function setTime($time): self /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -488,7 +472,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url): self + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -500,7 +484,7 @@ public function setUrl($url): self * * @return map[string,object] */ - public function getTag() + public function getTag(): array { return $this->container['tag']; } @@ -512,7 +496,7 @@ public function getTag() * * @return $this */ - public function setTag($tag): self + public function setTag(array $tag): self { $this->container['tag'] = $tag; @@ -521,10 +505,8 @@ public function setTag($tag): self /** * Gets linked_id. - * - * @return string */ - public function getLinkedId() + public function getLinkedId(): string { return $this->container['linked_id']; } @@ -536,7 +518,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id): self + public function setLinkedId(string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -545,10 +527,8 @@ public function setLinkedId($linked_id): self /** * Gets confidence. - * - * @return Confidence */ - public function getConfidence() + public function getConfidence(): Confidence { return $this->container['confidence']; } @@ -560,7 +540,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence): self + public function setConfidence(Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -569,10 +549,8 @@ public function setConfidence($confidence): self /** * Gets visitor_found. - * - * @return bool */ - public function getVisitorFound() + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -584,7 +562,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found): self + public function setVisitorFound(bool $visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -593,10 +571,8 @@ public function setVisitorFound($visitor_found): self /** * Gets first_seen_at. - * - * @return SeenAt */ - public function getFirstSeenAt() + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -608,7 +584,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at): self + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -617,10 +593,8 @@ public function setFirstSeenAt($first_seen_at): self /** * Gets last_seen_at. - * - * @return SeenAt */ - public function getLastSeenAt() + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -632,7 +606,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at): self + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index aaeeecfe..5e9f88a6 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -221,10 +221,8 @@ public function valid(): bool /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -236,7 +234,7 @@ public function getResult() * * @return $this */ - public function setResult($result): self + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -245,10 +243,8 @@ public function setResult($result): self /** * Gets origin_timezone. - * - * @return string */ - public function getOriginTimezone() + public function getOriginTimezone(): string { return $this->container['origin_timezone']; } @@ -260,7 +256,7 @@ public function getOriginTimezone() * * @return $this */ - public function setOriginTimezone($origin_timezone): self + public function setOriginTimezone(string $origin_timezone): self { $this->container['origin_timezone'] = $origin_timezone; @@ -269,10 +265,8 @@ public function setOriginTimezone($origin_timezone): self /** * Gets origin_country. - * - * @return string */ - public function getOriginCountry() + public function getOriginCountry(): string { return $this->container['origin_country']; } @@ -284,7 +278,7 @@ public function getOriginCountry() * * @return $this */ - public function setOriginCountry($origin_country): self + public function setOriginCountry(string $origin_country): self { $this->container['origin_country'] = $origin_country; @@ -293,10 +287,8 @@ public function setOriginCountry($origin_country): self /** * Gets methods. - * - * @return VpnResultMethods */ - public function getMethods() + public function getMethods(): VpnResultMethods { return $this->container['methods']; } @@ -308,7 +300,7 @@ public function getMethods() * * @return $this */ - public function setMethods($methods): self + public function setMethods(VpnResultMethods $methods): self { $this->container['methods'] = $methods; diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 7b341fec..3c4f1f36 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -215,10 +215,8 @@ public function valid(): bool /** * Gets timezone_mismatch. - * - * @return bool */ - public function getTimezoneMismatch() + public function getTimezoneMismatch(): bool { return $this->container['timezone_mismatch']; } @@ -230,7 +228,7 @@ public function getTimezoneMismatch() * * @return $this */ - public function setTimezoneMismatch($timezone_mismatch): self + public function setTimezoneMismatch(bool $timezone_mismatch): self { $this->container['timezone_mismatch'] = $timezone_mismatch; @@ -239,10 +237,8 @@ public function setTimezoneMismatch($timezone_mismatch): self /** * Gets public_vpn. - * - * @return bool */ - public function getPublicVpn() + public function getPublicVpn(): bool { return $this->container['public_vpn']; } @@ -254,7 +250,7 @@ public function getPublicVpn() * * @return $this */ - public function setPublicVpn($public_vpn): self + public function setPublicVpn(bool $public_vpn): self { $this->container['public_vpn'] = $public_vpn; @@ -263,10 +259,8 @@ public function setPublicVpn($public_vpn): self /** * Gets auxiliary_mobile. - * - * @return bool */ - public function getAuxiliaryMobile() + public function getAuxiliaryMobile(): bool { return $this->container['auxiliary_mobile']; } @@ -278,7 +272,7 @@ public function getAuxiliaryMobile() * * @return $this */ - public function setAuxiliaryMobile($auxiliary_mobile): self + public function setAuxiliaryMobile(bool $auxiliary_mobile): self { $this->container['auxiliary_mobile'] = $auxiliary_mobile; diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 57e00ed5..6ed34e9c 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -440,10 +440,8 @@ public function valid(): bool /** * Gets visitor_id. - * - * @return string */ - public function getVisitorId() + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -455,7 +453,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id): self + public function setVisitorId(string $visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -464,10 +462,8 @@ public function setVisitorId($visitor_id): self /** * Gets client_referrer. - * - * @return string */ - public function getClientReferrer() + public function getClientReferrer(): string { return $this->container['client_referrer']; } @@ -479,7 +475,7 @@ public function getClientReferrer() * * @return $this */ - public function setClientReferrer($client_referrer): self + public function setClientReferrer(string $client_referrer): self { $this->container['client_referrer'] = $client_referrer; @@ -488,10 +484,8 @@ public function setClientReferrer($client_referrer): self /** * Gets user_agent. - * - * @return string */ - public function getUserAgent() + public function getUserAgent(): string { return $this->container['user_agent']; } @@ -503,7 +497,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent): self + public function setUserAgent(string $user_agent): self { $this->container['user_agent'] = $user_agent; @@ -512,10 +506,8 @@ public function setUserAgent($user_agent): self /** * Gets bot. - * - * @return BotdDetectionResult */ - public function getBot() + public function getBot(): BotdDetectionResult { return $this->container['bot']; } @@ -527,7 +519,7 @@ public function getBot() * * @return $this */ - public function setBot($bot): self + public function setBot(BotdDetectionResult $bot): self { $this->container['bot'] = $bot; @@ -536,10 +528,8 @@ public function setBot($bot): self /** * Gets ip_info. - * - * @return IpInfoResult */ - public function getIpInfo() + public function getIpInfo(): IpInfoResult { return $this->container['ip_info']; } @@ -551,7 +541,7 @@ public function getIpInfo() * * @return $this */ - public function setIpInfo($ip_info): self + public function setIpInfo(IpInfoResult $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -560,10 +550,8 @@ public function setIpInfo($ip_info): self /** * Gets incognito. - * - * @return bool */ - public function getIncognito() + public function getIncognito(): bool { return $this->container['incognito']; } @@ -575,7 +563,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito): self + public function setIncognito(bool $incognito): self { $this->container['incognito'] = $incognito; @@ -584,10 +572,8 @@ public function setIncognito($incognito): self /** * Gets root_apps. - * - * @return RootAppsResult */ - public function getRootApps() + public function getRootApps(): RootAppsResult { return $this->container['root_apps']; } @@ -599,7 +585,7 @@ public function getRootApps() * * @return $this */ - public function setRootApps($root_apps): self + public function setRootApps(RootAppsResult $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -608,10 +594,8 @@ public function setRootApps($root_apps): self /** * Gets emulator. - * - * @return EmulatorResult */ - public function getEmulator() + public function getEmulator(): EmulatorResult { return $this->container['emulator']; } @@ -623,7 +607,7 @@ public function getEmulator() * * @return $this */ - public function setEmulator($emulator): self + public function setEmulator(EmulatorResult $emulator): self { $this->container['emulator'] = $emulator; @@ -632,10 +616,8 @@ public function setEmulator($emulator): self /** * Gets cloned_app. - * - * @return ClonedAppResult */ - public function getClonedApp() + public function getClonedApp(): ClonedAppResult { return $this->container['cloned_app']; } @@ -647,7 +629,7 @@ public function getClonedApp() * * @return $this */ - public function setClonedApp($cloned_app): self + public function setClonedApp(ClonedAppResult $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -656,10 +638,8 @@ public function setClonedApp($cloned_app): self /** * Gets factory_reset. - * - * @return FactoryResetResult */ - public function getFactoryReset() + public function getFactoryReset(): FactoryResetResult { return $this->container['factory_reset']; } @@ -671,7 +651,7 @@ public function getFactoryReset() * * @return $this */ - public function setFactoryReset($factory_reset): self + public function setFactoryReset(FactoryResetResult $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -680,10 +660,8 @@ public function setFactoryReset($factory_reset): self /** * Gets jailbroken. - * - * @return JailbrokenResult */ - public function getJailbroken() + public function getJailbroken(): JailbrokenResult { return $this->container['jailbroken']; } @@ -695,7 +673,7 @@ public function getJailbroken() * * @return $this */ - public function setJailbroken($jailbroken): self + public function setJailbroken(JailbrokenResult $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -704,10 +682,8 @@ public function setJailbroken($jailbroken): self /** * Gets frida. - * - * @return FridaResult */ - public function getFrida() + public function getFrida(): FridaResult { return $this->container['frida']; } @@ -719,7 +695,7 @@ public function getFrida() * * @return $this */ - public function setFrida($frida): self + public function setFrida(FridaResult $frida): self { $this->container['frida'] = $frida; @@ -728,10 +704,8 @@ public function setFrida($frida): self /** * Gets ip_blocklist. - * - * @return IpBlockListResult */ - public function getIpBlocklist() + public function getIpBlocklist(): IpBlockListResult { return $this->container['ip_blocklist']; } @@ -743,7 +717,7 @@ public function getIpBlocklist() * * @return $this */ - public function setIpBlocklist($ip_blocklist): self + public function setIpBlocklist(IpBlockListResult $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -752,10 +726,8 @@ public function setIpBlocklist($ip_blocklist): self /** * Gets tor. - * - * @return TorResult */ - public function getTor() + public function getTor(): TorResult { return $this->container['tor']; } @@ -767,7 +739,7 @@ public function getTor() * * @return $this */ - public function setTor($tor): self + public function setTor(TorResult $tor): self { $this->container['tor'] = $tor; @@ -776,10 +748,8 @@ public function setTor($tor): self /** * Gets privacy_settings. - * - * @return PrivacySettingsResult */ - public function getPrivacySettings() + public function getPrivacySettings(): PrivacySettingsResult { return $this->container['privacy_settings']; } @@ -791,7 +761,7 @@ public function getPrivacySettings() * * @return $this */ - public function setPrivacySettings($privacy_settings): self + public function setPrivacySettings(PrivacySettingsResult $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -800,10 +770,8 @@ public function setPrivacySettings($privacy_settings): self /** * Gets virtual_machine. - * - * @return VirtualMachineResult */ - public function getVirtualMachine() + public function getVirtualMachine(): VirtualMachineResult { return $this->container['virtual_machine']; } @@ -815,7 +783,7 @@ public function getVirtualMachine() * * @return $this */ - public function setVirtualMachine($virtual_machine): self + public function setVirtualMachine(VirtualMachineResult $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -824,10 +792,8 @@ public function setVirtualMachine($virtual_machine): self /** * Gets vpn. - * - * @return VpnResult */ - public function getVpn() + public function getVpn(): VpnResult { return $this->container['vpn']; } @@ -839,7 +805,7 @@ public function getVpn() * * @return $this */ - public function setVpn($vpn): self + public function setVpn(VpnResult $vpn): self { $this->container['vpn'] = $vpn; @@ -848,10 +814,8 @@ public function setVpn($vpn): self /** * Gets proxy. - * - * @return ProxyResult */ - public function getProxy() + public function getProxy(): ProxyResult { return $this->container['proxy']; } @@ -863,7 +827,7 @@ public function getProxy() * * @return $this */ - public function setProxy($proxy): self + public function setProxy(ProxyResult $proxy): self { $this->container['proxy'] = $proxy; @@ -872,10 +836,8 @@ public function setProxy($proxy): self /** * Gets tampering. - * - * @return TamperingResult */ - public function getTampering() + public function getTampering(): TamperingResult { return $this->container['tampering']; } @@ -887,7 +849,7 @@ public function getTampering() * * @return $this */ - public function setTampering($tampering): self + public function setTampering(TamperingResult $tampering): self { $this->container['tampering'] = $tampering; @@ -896,10 +858,8 @@ public function setTampering($tampering): self /** * Gets raw_device_attributes. - * - * @return RawDeviceAttributesResult */ - public function getRawDeviceAttributes() + public function getRawDeviceAttributes(): RawDeviceAttributesResult { return $this->container['raw_device_attributes']; } @@ -911,7 +871,7 @@ public function getRawDeviceAttributes() * * @return $this */ - public function setRawDeviceAttributes($raw_device_attributes): self + public function setRawDeviceAttributes(RawDeviceAttributesResult $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -920,10 +880,8 @@ public function setRawDeviceAttributes($raw_device_attributes): self /** * Gets high_activity. - * - * @return HighActivityResult */ - public function getHighActivity() + public function getHighActivity(): HighActivityResult { return $this->container['high_activity']; } @@ -935,7 +893,7 @@ public function getHighActivity() * * @return $this */ - public function setHighActivity($high_activity): self + public function setHighActivity(HighActivityResult $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -944,10 +902,8 @@ public function setHighActivity($high_activity): self /** * Gets location_spoofing. - * - * @return LocationSpoofingResult */ - public function getLocationSpoofing() + public function getLocationSpoofing(): LocationSpoofingResult { return $this->container['location_spoofing']; } @@ -959,7 +915,7 @@ public function getLocationSpoofing() * * @return $this */ - public function setLocationSpoofing($location_spoofing): self + public function setLocationSpoofing(LocationSpoofingResult $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -968,10 +924,8 @@ public function setLocationSpoofing($location_spoofing): self /** * Gets suspect_score. - * - * @return SuspectScoreResult */ - public function getSuspectScore() + public function getSuspectScore(): SuspectScoreResult { return $this->container['suspect_score']; } @@ -983,7 +937,7 @@ public function getSuspectScore() * * @return $this */ - public function setSuspectScore($suspect_score): self + public function setSuspectScore(SuspectScoreResult $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -992,10 +946,8 @@ public function setSuspectScore($suspect_score): self /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -1007,7 +959,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id): self + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -1016,10 +968,8 @@ public function setRequestId($request_id): self /** * Gets browser_details. - * - * @return BrowserDetails */ - public function getBrowserDetails() + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -1031,7 +981,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details): self + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -1040,10 +990,8 @@ public function setBrowserDetails($browser_details): self /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -1055,7 +1003,7 @@ public function getIp() * * @return $this */ - public function setIp($ip): self + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -1064,10 +1012,8 @@ public function setIp($ip): self /** * Gets ip_location. - * - * @return DeprecatedIPLocation */ - public function getIpLocation() + public function getIpLocation(): DeprecatedIPLocation { return $this->container['ip_location']; } @@ -1079,7 +1025,7 @@ public function getIpLocation() * * @return $this */ - public function setIpLocation($ip_location): self + public function setIpLocation(DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -1088,10 +1034,8 @@ public function setIpLocation($ip_location): self /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -1103,7 +1047,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp): self + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -1112,10 +1056,8 @@ public function setTimestamp($timestamp): self /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -1127,7 +1069,7 @@ public function getTime() * * @return $this */ - public function setTime($time): self + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -1136,10 +1078,8 @@ public function setTime($time): self /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -1151,7 +1091,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url): self + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -1163,7 +1103,7 @@ public function setUrl($url): self * * @return map[string,object] */ - public function getTag() + public function getTag(): array { return $this->container['tag']; } @@ -1175,7 +1115,7 @@ public function getTag() * * @return $this */ - public function setTag($tag): self + public function setTag(array $tag): self { $this->container['tag'] = $tag; @@ -1184,10 +1124,8 @@ public function setTag($tag): self /** * Gets linked_id. - * - * @return string */ - public function getLinkedId() + public function getLinkedId(): string { return $this->container['linked_id']; } @@ -1199,7 +1137,7 @@ public function getLinkedId() * * @return $this */ - public function setLinkedId($linked_id): self + public function setLinkedId(string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -1208,10 +1146,8 @@ public function setLinkedId($linked_id): self /** * Gets confidence. - * - * @return Confidence */ - public function getConfidence() + public function getConfidence(): Confidence { return $this->container['confidence']; } @@ -1223,7 +1159,7 @@ public function getConfidence() * * @return $this */ - public function setConfidence($confidence): self + public function setConfidence(Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -1232,10 +1168,8 @@ public function setConfidence($confidence): self /** * Gets visitor_found. - * - * @return bool */ - public function getVisitorFound() + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -1247,7 +1181,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found): self + public function setVisitorFound(bool $visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -1256,10 +1190,8 @@ public function setVisitorFound($visitor_found): self /** * Gets first_seen_at. - * - * @return SeenAt */ - public function getFirstSeenAt() + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -1271,7 +1203,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at): self + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -1280,10 +1212,8 @@ public function setFirstSeenAt($first_seen_at): self /** * Gets last_seen_at. - * - * @return SeenAt */ - public function getLastSeenAt() + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -1295,7 +1225,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at): self + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; diff --git a/template/ApiException.mustache b/template/ApiException.mustache index 31872493..fe6fd54d 100644 --- a/template/ApiException.mustache +++ b/template/ApiException.mustache @@ -19,6 +19,7 @@ namespace {{invokerPackage}}; use \Exception; +use Fingerprint\ServerAPI\Model\ModelInterface; use Psr\Http\Message\ResponseInterface; /** @@ -32,6 +33,7 @@ use Psr\Http\Message\ResponseInterface; class ApiException extends Exception { protected ResponseInterface $responseObject; + protected ModelInterface $errorDetails; public function __construct(?string $message = "", ?int $code = 0) { @@ -51,4 +53,14 @@ class ApiException extends Exception { return $this->responseObject; } + + public function getErrorDetails(): ModelInterface + { + return $this->errorDetails; + } + + public function setErrorDetails(ModelInterface $errorDetails): void + { + $this->errorDetails = $errorDetails; + } } \ No newline at end of file diff --git a/template/README.mustache b/template/README.mustache index de90ccda..3154a0e0 100644 --- a/template/README.mustache +++ b/template/README.mustache @@ -192,6 +192,8 @@ You can use below code to verify signature: ```php setErrorDetails($errorDetail); $e->setResponseObject($response); break; {{/dataType}} @@ -194,6 +196,8 @@ use \GuzzleHttp\Exception\GuzzleException; {{#responses}} {{#dataType}} {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + $errorDetail = ObjectSerializer::deserialize($response, '{{dataType}}'); + $e->setErrorDetails($errorDetail); $e->setResponseObject($response); break; {{/dataType}} diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 0f1a1d61..52337e29 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -248,7 +248,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * Gets {{name}} * @return {{datatype}} */ - public function {{getter}}() + public function {{getter}}(): {{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} { return $this->container['{{name}}']; } @@ -260,7 +260,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return $this */ - public function {{setter}}(${{name}}): self + public function {{setter}}({{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} ${{name}}): self { {{#isEnum}} $allowedValues = $this->{{getter}}AllowableValues(); From 29cb26c3f50bfa035ca750948bb92a2299f579bd Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 15 Aug 2024 11:56:37 +0300 Subject: [PATCH 09/14] fix: serializaiton problem on sealed results --- scripts/generate.sh | 4 +- sealed_results_example.php | 3 + src/Model/ASN.php | 6 +- src/Model/BotdDetectionResult.php | 4 +- src/Model/BotdResult.php | 14 ++-- src/Model/BrowserDetails.php | 16 ++--- src/Model/ClonedAppResult.php | 2 +- src/Model/Confidence.php | 2 +- src/Model/DataCenter.php | 4 +- src/Model/DeprecatedIPLocation.php | 18 ++--- src/Model/DeprecatedIPLocationCity.php | 2 +- src/Model/EmulatorResult.php | 2 +- src/Model/ErrorEvent403Response.php | 2 +- src/Model/ErrorEvent403ResponseError.php | 4 +- src/Model/ErrorEvent404Response.php | 2 +- src/Model/ErrorEvent404ResponseError.php | 4 +- src/Model/ErrorVisits403.php | 2 +- src/Model/EventResponse.php | 4 +- src/Model/FactoryResetResult.php | 4 +- src/Model/FridaResult.php | 2 +- src/Model/HighActivityResult.php | 4 +- src/Model/IPLocation.php | 18 ++--- src/Model/IPLocationCity.php | 2 +- src/Model/IdentificationError.php | 4 +- src/Model/IncognitoResult.php | 2 +- src/Model/IpBlockListResult.php | 4 +- src/Model/IpBlockListResultDetails.php | 4 +- src/Model/IpInfoResult.php | 4 +- src/Model/IpInfoResultV4.php | 8 +-- src/Model/IpInfoResultV6.php | 8 +-- src/Model/JailbrokenResult.php | 2 +- src/Model/Location.php | 4 +- src/Model/LocationSpoofingResult.php | 2 +- src/Model/ManyRequestsResponse.php | 2 +- src/Model/PrivacySettingsResult.php | 2 +- src/Model/ProductError.php | 4 +- src/Model/ProductsResponse.php | 42 +++++------ src/Model/ProductsResponseBotd.php | 4 +- src/Model/ProductsResponseIdentification.php | 4 +- .../ProductsResponseIdentificationData.php | 30 ++++---- src/Model/ProxyResult.php | 2 +- src/Model/Response.php | 8 +-- src/Model/ResponseVisits.php | 28 ++++---- src/Model/RootAppsResult.php | 2 +- src/Model/SeenAt.php | 4 +- src/Model/SignalResponseClonedApp.php | 4 +- src/Model/SignalResponseEmulator.php | 4 +- src/Model/SignalResponseFactoryReset.php | 4 +- src/Model/SignalResponseFrida.php | 4 +- src/Model/SignalResponseHighActivity.php | 4 +- src/Model/SignalResponseIncognito.php | 4 +- src/Model/SignalResponseIpBlocklist.php | 4 +- src/Model/SignalResponseIpInfo.php | 4 +- src/Model/SignalResponseJailbroken.php | 4 +- src/Model/SignalResponseLocationSpoofing.php | 4 +- src/Model/SignalResponsePrivacySettings.php | 4 +- src/Model/SignalResponseProxy.php | 4 +- .../SignalResponseRawDeviceAttributes.php | 2 +- src/Model/SignalResponseRootApps.php | 4 +- src/Model/SignalResponseSuspectScore.php | 4 +- src/Model/SignalResponseTampering.php | 4 +- src/Model/SignalResponseTor.php | 4 +- src/Model/SignalResponseVirtualMachine.php | 4 +- src/Model/SignalResponseVpn.php | 4 +- src/Model/Subdivision.php | 4 +- src/Model/SuspectScoreResult.php | 2 +- src/Model/TamperingResult.php | 4 +- src/Model/TorResult.php | 2 +- src/Model/VirtualMachineResult.php | 2 +- src/Model/Visit.php | 28 ++++---- src/Model/VpnResult.php | 8 +-- src/Model/VpnResultMethods.php | 6 +- src/Model/WebhookVisit.php | 72 +++++++++---------- src/Sealed/Sealed.php | 8 ++- template/model_generic.mustache | 2 +- test/Sealed/SealedTest.php | 6 +- 76 files changed, 265 insertions(+), 252 deletions(-) diff --git a/scripts/generate.sh b/scripts/generate.sh index b6ac699e..4a0d5237 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -59,10 +59,10 @@ fi # Model file fix if [ "$platform" = "Darwin" ]; then sed -i '' 's/public function setData(RawDeviceAttributesResult $data): self/public function setData(array $data): self/' ./src/Model/SignalResponseRawDeviceAttributes.php - sed -i '' 's/public function getData(): RawDeviceAttributesResult/public function getData(): array/' ./src/Model/SignalResponseRawDeviceAttributes.php + sed -i '' 's/public function getData(): ?RawDeviceAttributesResult/public function getData(): array/' ./src/Model/SignalResponseRawDeviceAttributes.php else sed -i 's/public function setData(RawDeviceAttributesResult $data): self/public function setData(array $data): self/' ./src/Model/SignalResponseRawDeviceAttributes.php - sed -i 's/public function getData(): RawDeviceAttributesResult/public function getData(): array/' ./src/Model/SignalResponseRawDeviceAttributes.php + sed -i 's/public function getData(): ?RawDeviceAttributesResult/public function getData(): array/' ./src/Model/SignalResponseRawDeviceAttributes.php fi ) diff --git a/sealed_results_example.php b/sealed_results_example.php index 7a8189b7..7db66137 100644 --- a/sealed_results_example.php +++ b/sealed_results_example.php @@ -6,6 +6,9 @@ require_once(__DIR__ . '/vendor/autoload.php'); +$dotenv = Dotenv\Dotenv::createImmutable(__DIR__); +$dotenv->safeLoad(); + $sealed_result = base64_decode($_ENV['BASE64_SEALED_RESULT'] ?? getenv('BASE64_SEALED_RESULT') ?? ""); $sealed_key = base64_decode($_ENV['BASE64_KEY'] ?? getenv('BASE64_KEY') ?? ""); diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 0b8b9c00..530505cb 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -213,7 +213,7 @@ public function valid(): bool /** * Gets asn. */ - public function getAsn(): string + public function getAsn(): ?string { return $this->container['asn']; } @@ -235,7 +235,7 @@ public function setAsn(string $asn): self /** * Gets network. */ - public function getNetwork(): string + public function getNetwork(): ?string { return $this->container['network']; } @@ -257,7 +257,7 @@ public function setNetwork(string $network): self /** * Gets name. */ - public function getName(): string + public function getName(): ?string { return $this->container['name']; } diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index cb5fee4b..f6bea206 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -230,7 +230,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): string + public function getResult(): ?string { return $this->container['result']; } @@ -261,7 +261,7 @@ public function setResult(string $result): self /** * Gets type. */ - public function getType(): string + public function getType(): ?string { return $this->container['type']; } diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index dd5b413a..f39e516f 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -251,7 +251,7 @@ public function valid(): bool /** * Gets ip. */ - public function getIp(): string + public function getIp(): ?string { return $this->container['ip']; } @@ -273,7 +273,7 @@ public function setIp(string $ip): self /** * Gets time. */ - public function getTime(): \DateTime + public function getTime(): ?\DateTime { return $this->container['time']; } @@ -295,7 +295,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): string + public function getUrl(): ?string { return $this->container['url']; } @@ -317,7 +317,7 @@ public function setUrl(string $url): self /** * Gets user_agent. */ - public function getUserAgent(): string + public function getUserAgent(): ?string { return $this->container['user_agent']; } @@ -339,7 +339,7 @@ public function setUserAgent(string $user_agent): self /** * Gets request_id. */ - public function getRequestId(): string + public function getRequestId(): ?string { return $this->container['request_id']; } @@ -361,7 +361,7 @@ public function setRequestId(string $request_id): self /** * Gets linked_id. */ - public function getLinkedId(): string + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -383,7 +383,7 @@ public function setLinkedId(string $linked_id): self /** * Gets bot. */ - public function getBot(): BotdDetectionResult + public function getBot(): ?BotdDetectionResult { return $this->container['bot']; } diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index 818888fc..bfd50fb0 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -258,7 +258,7 @@ public function valid(): bool /** * Gets browser_name. */ - public function getBrowserName(): string + public function getBrowserName(): ?string { return $this->container['browser_name']; } @@ -280,7 +280,7 @@ public function setBrowserName(string $browser_name): self /** * Gets browser_major_version. */ - public function getBrowserMajorVersion(): string + public function getBrowserMajorVersion(): ?string { return $this->container['browser_major_version']; } @@ -302,7 +302,7 @@ public function setBrowserMajorVersion(string $browser_major_version): self /** * Gets browser_full_version. */ - public function getBrowserFullVersion(): string + public function getBrowserFullVersion(): ?string { return $this->container['browser_full_version']; } @@ -324,7 +324,7 @@ public function setBrowserFullVersion(string $browser_full_version): self /** * Gets os. */ - public function getOs(): string + public function getOs(): ?string { return $this->container['os']; } @@ -346,7 +346,7 @@ public function setOs(string $os): self /** * Gets os_version. */ - public function getOsVersion(): string + public function getOsVersion(): ?string { return $this->container['os_version']; } @@ -368,7 +368,7 @@ public function setOsVersion(string $os_version): self /** * Gets device. */ - public function getDevice(): string + public function getDevice(): ?string { return $this->container['device']; } @@ -390,7 +390,7 @@ public function setDevice(string $device): self /** * Gets user_agent. */ - public function getUserAgent(): string + public function getUserAgent(): ?string { return $this->container['user_agent']; } @@ -412,7 +412,7 @@ public function setUserAgent(string $user_agent): self /** * Gets bot_probability. */ - public function getBotProbability(): int + public function getBotProbability(): ?int { return $this->container['bot_probability']; } diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index 61fd7c2d..e09b176a 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index ac489b0d..a66a2d90 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets score. */ - public function getScore(): float + public function getScore(): ?float { return $this->container['score']; } diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index ae0b650d..b8565a33 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -204,7 +204,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } @@ -226,7 +226,7 @@ public function setResult(bool $result): self /** * Gets name. */ - public function getName(): string + public function getName(): ?string { return $this->container['name']; } diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index 8eddef0b..ec436a63 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -242,7 +242,7 @@ public function valid(): bool /** * Gets accuracy_radius. */ - public function getAccuracyRadius(): int + public function getAccuracyRadius(): ?int { return $this->container['accuracy_radius']; } @@ -264,7 +264,7 @@ public function setAccuracyRadius(int $accuracy_radius): self /** * Gets latitude. */ - public function getLatitude(): float + public function getLatitude(): ?float { return $this->container['latitude']; } @@ -286,7 +286,7 @@ public function setLatitude(float $latitude): self /** * Gets longitude. */ - public function getLongitude(): float + public function getLongitude(): ?float { return $this->container['longitude']; } @@ -308,7 +308,7 @@ public function setLongitude(float $longitude): self /** * Gets postal_code. */ - public function getPostalCode(): string + public function getPostalCode(): ?string { return $this->container['postal_code']; } @@ -330,7 +330,7 @@ public function setPostalCode(string $postal_code): self /** * Gets timezone. */ - public function getTimezone(): string + public function getTimezone(): ?string { return $this->container['timezone']; } @@ -352,7 +352,7 @@ public function setTimezone(string $timezone): self /** * Gets city. */ - public function getCity(): DeprecatedIPLocationCity + public function getCity(): ?DeprecatedIPLocationCity { return $this->container['city']; } @@ -374,7 +374,7 @@ public function setCity(DeprecatedIPLocationCity $city): self /** * Gets country. */ - public function getCountry(): Location + public function getCountry(): ?Location { return $this->container['country']; } @@ -396,7 +396,7 @@ public function setCountry(Location $country): self /** * Gets continent. */ - public function getContinent(): Location + public function getContinent(): ?Location { return $this->container['continent']; } @@ -420,7 +420,7 @@ public function setContinent(Location $continent): self * * @return \Fingerprint\ServerAPI\Model\Subdivision[] */ - public function getSubdivisions(): array + public function getSubdivisions(): ?array { return $this->container['subdivisions']; } diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index 6f485667..9a1b4416 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -192,7 +192,7 @@ public function valid(): bool /** * Gets name. */ - public function getName(): string + public function getName(): ?string { return $this->container['name']; } diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index 0a4398fd..eb39b047 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index 32d1a764..7a1bc6d0 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -192,7 +192,7 @@ public function valid(): bool /** * Gets error. */ - public function getError(): ErrorEvent403ResponseError + public function getError(): ?ErrorEvent403ResponseError { return $this->container['error']; } diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index 702c754c..e714bd2c 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -234,7 +234,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): string + public function getCode(): ?string { return $this->container['code']; } @@ -265,7 +265,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): string + public function getMessage(): ?string { return $this->container['message']; } diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index a6fbbb19..b6be0ba3 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -192,7 +192,7 @@ public function valid(): bool /** * Gets error. */ - public function getError(): ErrorEvent404ResponseError + public function getError(): ?ErrorEvent404ResponseError { return $this->container['error']; } diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index 607b1924..1993400b 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -228,7 +228,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): string + public function getCode(): ?string { return $this->container['code']; } @@ -259,7 +259,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): string + public function getMessage(): ?string { return $this->container['message']; } diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 297998f3..97f37869 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets error. */ - public function getError(): string + public function getError(): ?string { return $this->container['error']; } diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 2f525355..6ecd6eec 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -206,7 +206,7 @@ public function valid(): bool /** * Gets products. */ - public function getProducts(): ProductsResponse + public function getProducts(): ?ProductsResponse { return $this->container['products']; } @@ -228,7 +228,7 @@ public function setProducts(ProductsResponse $products): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index fbf1834d..f06871d0 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets time. */ - public function getTime(): \DateTime + public function getTime(): ?\DateTime { return $this->container['time']; } @@ -229,7 +229,7 @@ public function setTime(\DateTime $time): self /** * Gets timestamp. */ - public function getTimestamp(): int + public function getTimestamp(): ?int { return $this->container['timestamp']; } diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index ad511bad..29fdb492 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index 43ff8284..e381e1ce 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -204,7 +204,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } @@ -226,7 +226,7 @@ public function setResult(bool $result): self /** * Gets daily_requests. */ - public function getDailyRequests(): float + public function getDailyRequests(): ?float { return $this->container['daily_requests']; } diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 0adebf00..a292b156 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -240,7 +240,7 @@ public function valid(): bool /** * Gets accuracy_radius. */ - public function getAccuracyRadius(): int + public function getAccuracyRadius(): ?int { return $this->container['accuracy_radius']; } @@ -262,7 +262,7 @@ public function setAccuracyRadius(int $accuracy_radius): self /** * Gets latitude. */ - public function getLatitude(): float + public function getLatitude(): ?float { return $this->container['latitude']; } @@ -284,7 +284,7 @@ public function setLatitude(float $latitude): self /** * Gets longitude. */ - public function getLongitude(): float + public function getLongitude(): ?float { return $this->container['longitude']; } @@ -306,7 +306,7 @@ public function setLongitude(float $longitude): self /** * Gets postal_code. */ - public function getPostalCode(): string + public function getPostalCode(): ?string { return $this->container['postal_code']; } @@ -328,7 +328,7 @@ public function setPostalCode(string $postal_code): self /** * Gets timezone. */ - public function getTimezone(): string + public function getTimezone(): ?string { return $this->container['timezone']; } @@ -350,7 +350,7 @@ public function setTimezone(string $timezone): self /** * Gets city. */ - public function getCity(): IPLocationCity + public function getCity(): ?IPLocationCity { return $this->container['city']; } @@ -372,7 +372,7 @@ public function setCity(IPLocationCity $city): self /** * Gets country. */ - public function getCountry(): Location + public function getCountry(): ?Location { return $this->container['country']; } @@ -394,7 +394,7 @@ public function setCountry(Location $country): self /** * Gets continent. */ - public function getContinent(): Location + public function getContinent(): ?Location { return $this->container['continent']; } @@ -418,7 +418,7 @@ public function setContinent(Location $continent): self * * @return \Fingerprint\ServerAPI\Model\Subdivision[] */ - public function getSubdivisions(): array + public function getSubdivisions(): ?array { return $this->container['subdivisions']; } diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index daba3d17..b9e2adc6 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -192,7 +192,7 @@ public function valid(): bool /** * Gets name. */ - public function getName(): string + public function getName(): ?string { return $this->container['name']; } diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index c8890cc4..47d5157e 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -230,7 +230,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): string + public function getCode(): ?string { return $this->container['code']; } @@ -261,7 +261,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): string + public function getMessage(): ?string { return $this->container['message']; } diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index 6299cc93..27db01f7 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index c6131829..8c5435e2 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } @@ -229,7 +229,7 @@ public function setResult(bool $result): self /** * Gets details. */ - public function getDetails(): IpBlockListResultDetails + public function getDetails(): ?IpBlockListResultDetails { return $this->container['details']; } diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 0695fbc1..cc3823ae 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets email_spam. */ - public function getEmailSpam(): bool + public function getEmailSpam(): ?bool { return $this->container['email_spam']; } @@ -229,7 +229,7 @@ public function setEmailSpam(bool $email_spam): self /** * Gets attack_source. */ - public function getAttackSource(): bool + public function getAttackSource(): ?bool { return $this->container['attack_source']; } diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index b4db3099..e2d8919c 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -200,7 +200,7 @@ public function valid(): bool /** * Gets v4. */ - public function getV4(): IpInfoResultV4 + public function getV4(): ?IpInfoResultV4 { return $this->container['v4']; } @@ -222,7 +222,7 @@ public function setV4(IpInfoResultV4 $v4): self /** * Gets v6. */ - public function getV6(): IpInfoResultV6 + public function getV6(): ?IpInfoResultV6 { return $this->container['v6']; } diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 039d34f4..53e0e16b 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -219,7 +219,7 @@ public function valid(): bool /** * Gets address. */ - public function getAddress(): string + public function getAddress(): ?string { return $this->container['address']; } @@ -241,7 +241,7 @@ public function setAddress(string $address): self /** * Gets geolocation. */ - public function getGeolocation(): IPLocation + public function getGeolocation(): ?IPLocation { return $this->container['geolocation']; } @@ -263,7 +263,7 @@ public function setGeolocation(IPLocation $geolocation): self /** * Gets asn. */ - public function getAsn(): ASN + public function getAsn(): ?ASN { return $this->container['asn']; } @@ -285,7 +285,7 @@ public function setAsn(ASN $asn): self /** * Gets datacenter. */ - public function getDatacenter(): DataCenter + public function getDatacenter(): ?DataCenter { return $this->container['datacenter']; } diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index 22e5ad29..f28f7929 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -219,7 +219,7 @@ public function valid(): bool /** * Gets address. */ - public function getAddress(): string + public function getAddress(): ?string { return $this->container['address']; } @@ -241,7 +241,7 @@ public function setAddress(string $address): self /** * Gets geolocation. */ - public function getGeolocation(): IPLocation + public function getGeolocation(): ?IPLocation { return $this->container['geolocation']; } @@ -263,7 +263,7 @@ public function setGeolocation(IPLocation $geolocation): self /** * Gets asn. */ - public function getAsn(): ASN + public function getAsn(): ?ASN { return $this->container['asn']; } @@ -285,7 +285,7 @@ public function setAsn(ASN $asn): self /** * Gets datacenter. */ - public function getDatacenter(): DataCenter + public function getDatacenter(): ?DataCenter { return $this->container['datacenter']; } diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index fa94ca4d..6e7190d7 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/Location.php b/src/Model/Location.php index 10af00e7..ffdd5597 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): string + public function getCode(): ?string { return $this->container['code']; } @@ -229,7 +229,7 @@ public function setCode(string $code): self /** * Gets name. */ - public function getName(): string + public function getName(): ?string { return $this->container['name']; } diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index fb7e697c..5da5bf66 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index f2c782c5..9fe7fc0d 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets error. */ - public function getError(): string + public function getError(): ?string { return $this->container['error']; } diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index 28bcb9a6..db425e5e 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 5a0879e9..3dfc1c36 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -230,7 +230,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): string + public function getCode(): ?string { return $this->container['code']; } @@ -261,7 +261,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): string + public function getMessage(): ?string { return $this->container['message']; } diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index 227618bd..1a368e31 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -314,7 +314,7 @@ public function valid(): bool /** * Gets identification. */ - public function getIdentification(): ProductsResponseIdentification + public function getIdentification(): ?ProductsResponseIdentification { return $this->container['identification']; } @@ -336,7 +336,7 @@ public function setIdentification(ProductsResponseIdentification $identification /** * Gets botd. */ - public function getBotd(): ProductsResponseBotd + public function getBotd(): ?ProductsResponseBotd { return $this->container['botd']; } @@ -358,7 +358,7 @@ public function setBotd(ProductsResponseBotd $botd): self /** * Gets ip_info. */ - public function getIpInfo(): SignalResponseIpInfo + public function getIpInfo(): ?SignalResponseIpInfo { return $this->container['ip_info']; } @@ -380,7 +380,7 @@ public function setIpInfo(SignalResponseIpInfo $ip_info): self /** * Gets incognito. */ - public function getIncognito(): SignalResponseIncognito + public function getIncognito(): ?SignalResponseIncognito { return $this->container['incognito']; } @@ -402,7 +402,7 @@ public function setIncognito(SignalResponseIncognito $incognito): self /** * Gets root_apps. */ - public function getRootApps(): SignalResponseRootApps + public function getRootApps(): ?SignalResponseRootApps { return $this->container['root_apps']; } @@ -424,7 +424,7 @@ public function setRootApps(SignalResponseRootApps $root_apps): self /** * Gets emulator. */ - public function getEmulator(): SignalResponseEmulator + public function getEmulator(): ?SignalResponseEmulator { return $this->container['emulator']; } @@ -446,7 +446,7 @@ public function setEmulator(SignalResponseEmulator $emulator): self /** * Gets cloned_app. */ - public function getClonedApp(): SignalResponseClonedApp + public function getClonedApp(): ?SignalResponseClonedApp { return $this->container['cloned_app']; } @@ -468,7 +468,7 @@ public function setClonedApp(SignalResponseClonedApp $cloned_app): self /** * Gets factory_reset. */ - public function getFactoryReset(): SignalResponseFactoryReset + public function getFactoryReset(): ?SignalResponseFactoryReset { return $this->container['factory_reset']; } @@ -490,7 +490,7 @@ public function setFactoryReset(SignalResponseFactoryReset $factory_reset): self /** * Gets jailbroken. */ - public function getJailbroken(): SignalResponseJailbroken + public function getJailbroken(): ?SignalResponseJailbroken { return $this->container['jailbroken']; } @@ -512,7 +512,7 @@ public function setJailbroken(SignalResponseJailbroken $jailbroken): self /** * Gets frida. */ - public function getFrida(): SignalResponseFrida + public function getFrida(): ?SignalResponseFrida { return $this->container['frida']; } @@ -534,7 +534,7 @@ public function setFrida(SignalResponseFrida $frida): self /** * Gets ip_blocklist. */ - public function getIpBlocklist(): SignalResponseIpBlocklist + public function getIpBlocklist(): ?SignalResponseIpBlocklist { return $this->container['ip_blocklist']; } @@ -556,7 +556,7 @@ public function setIpBlocklist(SignalResponseIpBlocklist $ip_blocklist): self /** * Gets tor. */ - public function getTor(): SignalResponseTor + public function getTor(): ?SignalResponseTor { return $this->container['tor']; } @@ -578,7 +578,7 @@ public function setTor(SignalResponseTor $tor): self /** * Gets privacy_settings. */ - public function getPrivacySettings(): SignalResponsePrivacySettings + public function getPrivacySettings(): ?SignalResponsePrivacySettings { return $this->container['privacy_settings']; } @@ -600,7 +600,7 @@ public function setPrivacySettings(SignalResponsePrivacySettings $privacy_settin /** * Gets virtual_machine. */ - public function getVirtualMachine(): SignalResponseVirtualMachine + public function getVirtualMachine(): ?SignalResponseVirtualMachine { return $this->container['virtual_machine']; } @@ -622,7 +622,7 @@ public function setVirtualMachine(SignalResponseVirtualMachine $virtual_machine) /** * Gets vpn. */ - public function getVpn(): SignalResponseVpn + public function getVpn(): ?SignalResponseVpn { return $this->container['vpn']; } @@ -644,7 +644,7 @@ public function setVpn(SignalResponseVpn $vpn): self /** * Gets proxy. */ - public function getProxy(): SignalResponseProxy + public function getProxy(): ?SignalResponseProxy { return $this->container['proxy']; } @@ -666,7 +666,7 @@ public function setProxy(SignalResponseProxy $proxy): self /** * Gets tampering. */ - public function getTampering(): SignalResponseTampering + public function getTampering(): ?SignalResponseTampering { return $this->container['tampering']; } @@ -688,7 +688,7 @@ public function setTampering(SignalResponseTampering $tampering): self /** * Gets high_activity. */ - public function getHighActivity(): SignalResponseHighActivity + public function getHighActivity(): ?SignalResponseHighActivity { return $this->container['high_activity']; } @@ -710,7 +710,7 @@ public function setHighActivity(SignalResponseHighActivity $high_activity): self /** * Gets location_spoofing. */ - public function getLocationSpoofing(): SignalResponseLocationSpoofing + public function getLocationSpoofing(): ?SignalResponseLocationSpoofing { return $this->container['location_spoofing']; } @@ -732,7 +732,7 @@ public function setLocationSpoofing(SignalResponseLocationSpoofing $location_spo /** * Gets suspect_score. */ - public function getSuspectScore(): SignalResponseSuspectScore + public function getSuspectScore(): ?SignalResponseSuspectScore { return $this->container['suspect_score']; } @@ -754,7 +754,7 @@ public function setSuspectScore(SignalResponseSuspectScore $suspect_score): self /** * Gets raw_device_attributes. */ - public function getRawDeviceAttributes(): SignalResponseRawDeviceAttributes + public function getRawDeviceAttributes(): ?SignalResponseRawDeviceAttributes { return $this->container['raw_device_attributes']; } diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 8fa43a4d..6d04a535 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): BotdResult + public function getData(): ?BotdResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(BotdResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index 43906044..de7010cd 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): ProductsResponseIdentificationData + public function getData(): ?ProductsResponseIdentificationData { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(ProductsResponseIdentificationData $data): self /** * Gets error. */ - public function getError(): IdentificationError + public function getError(): ?IdentificationError { return $this->container['error']; } diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index c79885d8..9fa2101d 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -315,7 +315,7 @@ public function valid(): bool /** * Gets request_id. */ - public function getRequestId(): string + public function getRequestId(): ?string { return $this->container['request_id']; } @@ -337,7 +337,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): BrowserDetails + public function getBrowserDetails(): ?BrowserDetails { return $this->container['browser_details']; } @@ -359,7 +359,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets incognito. */ - public function getIncognito(): bool + public function getIncognito(): ?bool { return $this->container['incognito']; } @@ -381,7 +381,7 @@ public function setIncognito(bool $incognito): self /** * Gets ip. */ - public function getIp(): string + public function getIp(): ?string { return $this->container['ip']; } @@ -403,7 +403,7 @@ public function setIp(string $ip): self /** * Gets ip_location. */ - public function getIpLocation(): DeprecatedIPLocation + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } @@ -425,7 +425,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): int + public function getTimestamp(): ?int { return $this->container['timestamp']; } @@ -447,7 +447,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): \DateTime + public function getTime(): ?\DateTime { return $this->container['time']; } @@ -469,7 +469,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): string + public function getUrl(): ?string { return $this->container['url']; } @@ -493,7 +493,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): array + public function getTag(): ?array { return $this->container['tag']; } @@ -515,7 +515,7 @@ public function setTag(array $tag): self /** * Gets linked_id. */ - public function getLinkedId(): string + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -537,7 +537,7 @@ public function setLinkedId(string $linked_id): self /** * Gets confidence. */ - public function getConfidence(): Confidence + public function getConfidence(): ?Confidence { return $this->container['confidence']; } @@ -559,7 +559,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): bool + public function getVisitorFound(): ?bool { return $this->container['visitor_found']; } @@ -581,7 +581,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): SeenAt + public function getFirstSeenAt(): ?SeenAt { return $this->container['first_seen_at']; } @@ -603,7 +603,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): SeenAt + public function getLastSeenAt(): ?SeenAt { return $this->container['last_seen_at']; } @@ -625,7 +625,7 @@ public function setLastSeenAt(SeenAt $last_seen_at): self /** * Gets visitor_id. */ - public function getVisitorId(): string + public function getVisitorId(): ?string { return $this->container['visitor_id']; } diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 0ba7fc50..9d6c88b1 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/Response.php b/src/Model/Response.php index 1573ddd6..46f63c1d 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -221,7 +221,7 @@ public function valid(): bool /** * Gets visitor_id. */ - public function getVisitorId(): string + public function getVisitorId(): ?string { return $this->container['visitor_id']; } @@ -245,7 +245,7 @@ public function setVisitorId(string $visitor_id): self * * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] */ - public function getVisits(): array + public function getVisits(): ?array { return $this->container['visits']; } @@ -267,7 +267,7 @@ public function setVisits(array $visits): self /** * Gets last_timestamp. */ - public function getLastTimestamp(): int + public function getLastTimestamp(): ?int { return $this->container['last_timestamp']; } @@ -289,7 +289,7 @@ public function setLastTimestamp(int $last_timestamp): self /** * Gets pagination_key. */ - public function getPaginationKey(): string + public function getPaginationKey(): ?string { return $this->container['pagination_key']; } diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index e464db9b..b1871685 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -306,7 +306,7 @@ public function valid(): bool /** * Gets request_id. */ - public function getRequestId(): string + public function getRequestId(): ?string { return $this->container['request_id']; } @@ -328,7 +328,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): BrowserDetails + public function getBrowserDetails(): ?BrowserDetails { return $this->container['browser_details']; } @@ -350,7 +350,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets incognito. */ - public function getIncognito(): bool + public function getIncognito(): ?bool { return $this->container['incognito']; } @@ -372,7 +372,7 @@ public function setIncognito(bool $incognito): self /** * Gets ip. */ - public function getIp(): string + public function getIp(): ?string { return $this->container['ip']; } @@ -394,7 +394,7 @@ public function setIp(string $ip): self /** * Gets ip_location. */ - public function getIpLocation(): DeprecatedIPLocation + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } @@ -416,7 +416,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): int + public function getTimestamp(): ?int { return $this->container['timestamp']; } @@ -438,7 +438,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): \DateTime + public function getTime(): ?\DateTime { return $this->container['time']; } @@ -460,7 +460,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): string + public function getUrl(): ?string { return $this->container['url']; } @@ -484,7 +484,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): array + public function getTag(): ?array { return $this->container['tag']; } @@ -506,7 +506,7 @@ public function setTag(array $tag): self /** * Gets linked_id. */ - public function getLinkedId(): string + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -528,7 +528,7 @@ public function setLinkedId(string $linked_id): self /** * Gets confidence. */ - public function getConfidence(): Confidence + public function getConfidence(): ?Confidence { return $this->container['confidence']; } @@ -550,7 +550,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): bool + public function getVisitorFound(): ?bool { return $this->container['visitor_found']; } @@ -572,7 +572,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): SeenAt + public function getFirstSeenAt(): ?SeenAt { return $this->container['first_seen_at']; } @@ -594,7 +594,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): SeenAt + public function getLastSeenAt(): ?SeenAt { return $this->container['last_seen_at']; } diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index 6c1c82cf..0c0fe279 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 29de802d..0d5fe032 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets global. */ - public function getGlobal(): \DateTime + public function getGlobal(): ?\DateTime { return $this->container['global']; } @@ -229,7 +229,7 @@ public function setGlobal(\DateTime $global): self /** * Gets subscription. */ - public function getSubscription(): \DateTime + public function getSubscription(): ?\DateTime { return $this->container['subscription']; } diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 66bc4085..85eab68e 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): ClonedAppResult + public function getData(): ?ClonedAppResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(ClonedAppResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index a87a13bc..92bfaa0e 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): EmulatorResult + public function getData(): ?EmulatorResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(EmulatorResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 2271eb8d..2f13a181 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): FactoryResetResult + public function getData(): ?FactoryResetResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(FactoryResetResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index e1e6069c..95da9699 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): FridaResult + public function getData(): ?FridaResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(FridaResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index d8cee703..23a67629 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): HighActivityResult + public function getData(): ?HighActivityResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(HighActivityResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 63532391..a4cee05c 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): IncognitoResult + public function getData(): ?IncognitoResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(IncognitoResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index edf0c8b3..292102ea 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): IpBlockListResult + public function getData(): ?IpBlockListResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(IpBlockListResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index a92d2c8e..952c0eed 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): IpInfoResult + public function getData(): ?IpInfoResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(IpInfoResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index 2552af44..b05c3baf 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): JailbrokenResult + public function getData(): ?JailbrokenResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(JailbrokenResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index d6331aa5..d492ea52 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): LocationSpoofingResult + public function getData(): ?LocationSpoofingResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(LocationSpoofingResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index e39bcce4..55a85f9b 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): PrivacySettingsResult + public function getData(): ?PrivacySettingsResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(PrivacySettingsResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index 436479c1..aac706d6 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): ProxyResult + public function getData(): ?ProxyResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(ProxyResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index fe3aab0e..24fe783e 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -220,7 +220,7 @@ public function setData(array $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index 896e6484..11dbd25c 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): RootAppsResult + public function getData(): ?RootAppsResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(RootAppsResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index 0c136c51..a91a75b0 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): SuspectScoreResult + public function getData(): ?SuspectScoreResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(SuspectScoreResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index e90e1c49..5a3a99e7 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): TamperingResult + public function getData(): ?TamperingResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(TamperingResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 1a1e6078..b6c87ed6 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): TorResult + public function getData(): ?TorResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(TorResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 5bb17656..040c3b06 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): VirtualMachineResult + public function getData(): ?VirtualMachineResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(VirtualMachineResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 17f231be..d53ddab5 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets data. */ - public function getData(): VpnResult + public function getData(): ?VpnResult { return $this->container['data']; } @@ -220,7 +220,7 @@ public function setData(VpnResult $data): self /** * Gets error. */ - public function getError(): ProductError + public function getError(): ?ProductError { return $this->container['error']; } diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index ef9a3576..4ffa743c 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets iso_code. */ - public function getIsoCode(): string + public function getIsoCode(): ?string { return $this->container['iso_code']; } @@ -220,7 +220,7 @@ public function setIsoCode(string $iso_code): self /** * Gets name. */ - public function getName(): string + public function getName(): ?string { return $this->container['name']; } diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index 3225bda1..dfcc6b63 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): int + public function getResult(): ?int { return $this->container['result']; } diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index e642bcd4..a6504cf5 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } @@ -229,7 +229,7 @@ public function setResult(bool $result): self /** * Gets anomaly_score. */ - public function getAnomalyScore(): float + public function getAnomalyScore(): ?float { return $this->container['anomaly_score']; } diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index c09aeaaf..55bad9d6 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 644f9144..b4ab2899 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 30d8926d..1705250d 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -306,7 +306,7 @@ public function valid(): bool /** * Gets request_id. */ - public function getRequestId(): string + public function getRequestId(): ?string { return $this->container['request_id']; } @@ -328,7 +328,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): BrowserDetails + public function getBrowserDetails(): ?BrowserDetails { return $this->container['browser_details']; } @@ -350,7 +350,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets incognito. */ - public function getIncognito(): bool + public function getIncognito(): ?bool { return $this->container['incognito']; } @@ -372,7 +372,7 @@ public function setIncognito(bool $incognito): self /** * Gets ip. */ - public function getIp(): string + public function getIp(): ?string { return $this->container['ip']; } @@ -394,7 +394,7 @@ public function setIp(string $ip): self /** * Gets ip_location. */ - public function getIpLocation(): DeprecatedIPLocation + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } @@ -416,7 +416,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): int + public function getTimestamp(): ?int { return $this->container['timestamp']; } @@ -438,7 +438,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): \DateTime + public function getTime(): ?\DateTime { return $this->container['time']; } @@ -460,7 +460,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): string + public function getUrl(): ?string { return $this->container['url']; } @@ -484,7 +484,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): array + public function getTag(): ?array { return $this->container['tag']; } @@ -506,7 +506,7 @@ public function setTag(array $tag): self /** * Gets linked_id. */ - public function getLinkedId(): string + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -528,7 +528,7 @@ public function setLinkedId(string $linked_id): self /** * Gets confidence. */ - public function getConfidence(): Confidence + public function getConfidence(): ?Confidence { return $this->container['confidence']; } @@ -550,7 +550,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): bool + public function getVisitorFound(): ?bool { return $this->container['visitor_found']; } @@ -572,7 +572,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): SeenAt + public function getFirstSeenAt(): ?SeenAt { return $this->container['first_seen_at']; } @@ -594,7 +594,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): SeenAt + public function getLastSeenAt(): ?SeenAt { return $this->container['last_seen_at']; } diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index 5e9f88a6..f809b168 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -222,7 +222,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): bool + public function getResult(): ?bool { return $this->container['result']; } @@ -244,7 +244,7 @@ public function setResult(bool $result): self /** * Gets origin_timezone. */ - public function getOriginTimezone(): string + public function getOriginTimezone(): ?string { return $this->container['origin_timezone']; } @@ -266,7 +266,7 @@ public function setOriginTimezone(string $origin_timezone): self /** * Gets origin_country. */ - public function getOriginCountry(): string + public function getOriginCountry(): ?string { return $this->container['origin_country']; } @@ -288,7 +288,7 @@ public function setOriginCountry(string $origin_country): self /** * Gets methods. */ - public function getMethods(): VpnResultMethods + public function getMethods(): ?VpnResultMethods { return $this->container['methods']; } diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 3c4f1f36..2426ecae 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -216,7 +216,7 @@ public function valid(): bool /** * Gets timezone_mismatch. */ - public function getTimezoneMismatch(): bool + public function getTimezoneMismatch(): ?bool { return $this->container['timezone_mismatch']; } @@ -238,7 +238,7 @@ public function setTimezoneMismatch(bool $timezone_mismatch): self /** * Gets public_vpn. */ - public function getPublicVpn(): bool + public function getPublicVpn(): ?bool { return $this->container['public_vpn']; } @@ -260,7 +260,7 @@ public function setPublicVpn(bool $public_vpn): self /** * Gets auxiliary_mobile. */ - public function getAuxiliaryMobile(): bool + public function getAuxiliaryMobile(): ?bool { return $this->container['auxiliary_mobile']; } diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 6ed34e9c..4ef9337a 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -441,7 +441,7 @@ public function valid(): bool /** * Gets visitor_id. */ - public function getVisitorId(): string + public function getVisitorId(): ?string { return $this->container['visitor_id']; } @@ -463,7 +463,7 @@ public function setVisitorId(string $visitor_id): self /** * Gets client_referrer. */ - public function getClientReferrer(): string + public function getClientReferrer(): ?string { return $this->container['client_referrer']; } @@ -485,7 +485,7 @@ public function setClientReferrer(string $client_referrer): self /** * Gets user_agent. */ - public function getUserAgent(): string + public function getUserAgent(): ?string { return $this->container['user_agent']; } @@ -507,7 +507,7 @@ public function setUserAgent(string $user_agent): self /** * Gets bot. */ - public function getBot(): BotdDetectionResult + public function getBot(): ?BotdDetectionResult { return $this->container['bot']; } @@ -529,7 +529,7 @@ public function setBot(BotdDetectionResult $bot): self /** * Gets ip_info. */ - public function getIpInfo(): IpInfoResult + public function getIpInfo(): ?IpInfoResult { return $this->container['ip_info']; } @@ -551,7 +551,7 @@ public function setIpInfo(IpInfoResult $ip_info): self /** * Gets incognito. */ - public function getIncognito(): bool + public function getIncognito(): ?bool { return $this->container['incognito']; } @@ -573,7 +573,7 @@ public function setIncognito(bool $incognito): self /** * Gets root_apps. */ - public function getRootApps(): RootAppsResult + public function getRootApps(): ?RootAppsResult { return $this->container['root_apps']; } @@ -595,7 +595,7 @@ public function setRootApps(RootAppsResult $root_apps): self /** * Gets emulator. */ - public function getEmulator(): EmulatorResult + public function getEmulator(): ?EmulatorResult { return $this->container['emulator']; } @@ -617,7 +617,7 @@ public function setEmulator(EmulatorResult $emulator): self /** * Gets cloned_app. */ - public function getClonedApp(): ClonedAppResult + public function getClonedApp(): ?ClonedAppResult { return $this->container['cloned_app']; } @@ -639,7 +639,7 @@ public function setClonedApp(ClonedAppResult $cloned_app): self /** * Gets factory_reset. */ - public function getFactoryReset(): FactoryResetResult + public function getFactoryReset(): ?FactoryResetResult { return $this->container['factory_reset']; } @@ -661,7 +661,7 @@ public function setFactoryReset(FactoryResetResult $factory_reset): self /** * Gets jailbroken. */ - public function getJailbroken(): JailbrokenResult + public function getJailbroken(): ?JailbrokenResult { return $this->container['jailbroken']; } @@ -683,7 +683,7 @@ public function setJailbroken(JailbrokenResult $jailbroken): self /** * Gets frida. */ - public function getFrida(): FridaResult + public function getFrida(): ?FridaResult { return $this->container['frida']; } @@ -705,7 +705,7 @@ public function setFrida(FridaResult $frida): self /** * Gets ip_blocklist. */ - public function getIpBlocklist(): IpBlockListResult + public function getIpBlocklist(): ?IpBlockListResult { return $this->container['ip_blocklist']; } @@ -727,7 +727,7 @@ public function setIpBlocklist(IpBlockListResult $ip_blocklist): self /** * Gets tor. */ - public function getTor(): TorResult + public function getTor(): ?TorResult { return $this->container['tor']; } @@ -749,7 +749,7 @@ public function setTor(TorResult $tor): self /** * Gets privacy_settings. */ - public function getPrivacySettings(): PrivacySettingsResult + public function getPrivacySettings(): ?PrivacySettingsResult { return $this->container['privacy_settings']; } @@ -771,7 +771,7 @@ public function setPrivacySettings(PrivacySettingsResult $privacy_settings): sel /** * Gets virtual_machine. */ - public function getVirtualMachine(): VirtualMachineResult + public function getVirtualMachine(): ?VirtualMachineResult { return $this->container['virtual_machine']; } @@ -793,7 +793,7 @@ public function setVirtualMachine(VirtualMachineResult $virtual_machine): self /** * Gets vpn. */ - public function getVpn(): VpnResult + public function getVpn(): ?VpnResult { return $this->container['vpn']; } @@ -815,7 +815,7 @@ public function setVpn(VpnResult $vpn): self /** * Gets proxy. */ - public function getProxy(): ProxyResult + public function getProxy(): ?ProxyResult { return $this->container['proxy']; } @@ -837,7 +837,7 @@ public function setProxy(ProxyResult $proxy): self /** * Gets tampering. */ - public function getTampering(): TamperingResult + public function getTampering(): ?TamperingResult { return $this->container['tampering']; } @@ -859,7 +859,7 @@ public function setTampering(TamperingResult $tampering): self /** * Gets raw_device_attributes. */ - public function getRawDeviceAttributes(): RawDeviceAttributesResult + public function getRawDeviceAttributes(): ?RawDeviceAttributesResult { return $this->container['raw_device_attributes']; } @@ -881,7 +881,7 @@ public function setRawDeviceAttributes(RawDeviceAttributesResult $raw_device_att /** * Gets high_activity. */ - public function getHighActivity(): HighActivityResult + public function getHighActivity(): ?HighActivityResult { return $this->container['high_activity']; } @@ -903,7 +903,7 @@ public function setHighActivity(HighActivityResult $high_activity): self /** * Gets location_spoofing. */ - public function getLocationSpoofing(): LocationSpoofingResult + public function getLocationSpoofing(): ?LocationSpoofingResult { return $this->container['location_spoofing']; } @@ -925,7 +925,7 @@ public function setLocationSpoofing(LocationSpoofingResult $location_spoofing): /** * Gets suspect_score. */ - public function getSuspectScore(): SuspectScoreResult + public function getSuspectScore(): ?SuspectScoreResult { return $this->container['suspect_score']; } @@ -947,7 +947,7 @@ public function setSuspectScore(SuspectScoreResult $suspect_score): self /** * Gets request_id. */ - public function getRequestId(): string + public function getRequestId(): ?string { return $this->container['request_id']; } @@ -969,7 +969,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): BrowserDetails + public function getBrowserDetails(): ?BrowserDetails { return $this->container['browser_details']; } @@ -991,7 +991,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets ip. */ - public function getIp(): string + public function getIp(): ?string { return $this->container['ip']; } @@ -1013,7 +1013,7 @@ public function setIp(string $ip): self /** * Gets ip_location. */ - public function getIpLocation(): DeprecatedIPLocation + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } @@ -1035,7 +1035,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): int + public function getTimestamp(): ?int { return $this->container['timestamp']; } @@ -1057,7 +1057,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): \DateTime + public function getTime(): ?\DateTime { return $this->container['time']; } @@ -1079,7 +1079,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): string + public function getUrl(): ?string { return $this->container['url']; } @@ -1103,7 +1103,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): array + public function getTag(): ?array { return $this->container['tag']; } @@ -1125,7 +1125,7 @@ public function setTag(array $tag): self /** * Gets linked_id. */ - public function getLinkedId(): string + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -1147,7 +1147,7 @@ public function setLinkedId(string $linked_id): self /** * Gets confidence. */ - public function getConfidence(): Confidence + public function getConfidence(): ?Confidence { return $this->container['confidence']; } @@ -1169,7 +1169,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): bool + public function getVisitorFound(): ?bool { return $this->container['visitor_found']; } @@ -1191,7 +1191,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): SeenAt + public function getFirstSeenAt(): ?SeenAt { return $this->container['first_seen_at']; } @@ -1213,7 +1213,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): SeenAt + public function getLastSeenAt(): ?SeenAt { return $this->container['last_seen_at']; } diff --git a/src/Sealed/Sealed.php b/src/Sealed/Sealed.php index 5bd26c57..89cb06b2 100644 --- a/src/Sealed/Sealed.php +++ b/src/Sealed/Sealed.php @@ -3,6 +3,9 @@ namespace Fingerprint\ServerAPI\Sealed; use Fingerprint\ServerAPI\Model\EventResponse; +use Fingerprint\ServerAPI\ObjectSerializer; +use Fingerprint\ServerAPI\SerializationException; +use GuzzleHttp\Psr7\Response; class Sealed { @@ -14,6 +17,7 @@ class Sealed * @param DecryptionKey[] $keys * * @throws UnsealAggregateException + * @throws SerializationException */ public static function unsealEventResponse(string $sealed, array $keys): EventResponse { @@ -25,7 +29,9 @@ public static function unsealEventResponse(string $sealed, array $keys): EventRe throw new InvalidSealedDataException(); } - return new EventResponse($data); + $response = new Response(200, [], $unsealed); + + return ObjectSerializer::deserialize($response, EventResponse::class); } /** diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 52337e29..c16a71fd 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -248,7 +248,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * Gets {{name}} * @return {{datatype}} */ - public function {{getter}}(): {{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} + public function {{getter}}(): {{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}}|null { return $this->container['{{name}}']; } diff --git a/test/Sealed/SealedTest.php b/test/Sealed/SealedTest.php index 608394de..a110d84d 100644 --- a/test/Sealed/SealedTest.php +++ b/test/Sealed/SealedTest.php @@ -3,6 +3,8 @@ namespace Fingerprint\ServerAPI\Sealed; use Fingerprint\ServerAPI\Model\EventResponse; +use Fingerprint\ServerAPI\ObjectSerializer; +use GuzzleHttp\Psr7\Response; use PHPUnit\Framework\TestCase; class SealedTest extends TestCase @@ -37,7 +39,9 @@ public function testUnsealEventResponse() { $sealedResult = base64_decode("noXc7SXO+mqeAGrvBMgObi/S0fXTpP3zupk8qFqsO/1zdtWCD169iLA3VkkZh9ICHpZ0oWRzqG0M9/TnCeKFohgBLqDp6O0zEfXOv6i5q++aucItznQdLwrKLP+O0blfb4dWVI8/aSbd4ELAZuJJxj9bCoVZ1vk+ShbUXCRZTD30OIEAr3eiG9aw00y1UZIqMgX6CkFlU9L9OnKLsNsyomPIaRHTmgVTI5kNhrnVNyNsnzt9rY7fUD52DQxJILVPrUJ1Q+qW7VyNslzGYBPG0DyYlKbRAomKJDQIkdj/Uwa6bhSTq4XYNVvbk5AJ/dGwvsVdOnkMT2Ipd67KwbKfw5bqQj/cw6bj8Cp2FD4Dy4Ud4daBpPRsCyxBM2jOjVz1B/lAyrOp8BweXOXYugwdPyEn38MBZ5oL4D38jIwR/QiVnMHpERh93jtgwh9Abza6i4/zZaDAbPhtZLXSM5ztdctv8bAb63CppLU541Kf4OaLO3QLvfLRXK2n8bwEwzVAqQ22dyzt6/vPiRbZ5akh8JB6QFXG0QJF9DejsIspKF3JvOKjG2edmC9o+GfL3hwDBiihYXCGY9lElZICAdt+7rZm5UxMx7STrVKy81xcvfaIp1BwGh/HyMsJnkE8IczzRFpLlHGYuNDxdLoBjiifrmHvOCUDcV8UvhSV+UAZtAVejdNGo5G/bz0NF21HUO4pVRPu6RqZIs/aX4hlm6iO/0Ru00ct8pfadUIgRcephTuFC2fHyZxNBC6NApRtLSNLfzYTTo/uSjgcu6rLWiNo5G7yfrM45RXjalFEFzk75Z/fu9lCJJa5uLFgDNKlU+IaFjArfXJCll3apbZp4/LNKiU35ZlB7ZmjDTrji1wLep8iRVVEGht/DW00MTok7Zn7Fv+MlxgWmbZB3BuezwTmXb/fNw=="); - $expectedResponse = new EventResponse(json_decode("{\"products\":{\"identification\":{\"data\":{\"visitorId\":\"2ZEDCZEfOfXjEmMuE3tq\",\"requestId\":\"1703067132750.Z5hutJ\",\"browserDetails\":{\"browserName\":\"Safari\",\"browserMajorVersion\":\"17\",\"browserFullVersion\":\"17.3\",\"os\":\"Mac OS X\",\"osVersion\":\"10.15.7\",\"device\":\"Other\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15\"},\"incognito\":false,\"ip\":\"::1\",\"ipLocation\":{\"accuracyRadius\":1000,\"latitude\":59.3241,\"longitude\":18.0517,\"postalCode\":\"100 05\",\"timezone\":\"Europe/Stockholm\",\"city\":{\"name\":\"Stockholm\"},\"country\":{\"code\":\"SE\",\"name\":\"Sweden\"},\"continent\":{\"code\":\"EU\",\"name\":\"Europe\"},\"subdivisions\":[{\"isoCode\":\"AB\",\"name\":\"Stockholm County\"}]},\"timestamp\":1703067136286,\"time\":\"2023-12-20T10:12:16Z\",\"url\":\"http://localhost:8080/\",\"tag\":{\"foo\":\"bar\"},\"confidence\":{\"score\":1},\"visitorFound\":true,\"firstSeenAt\":{\"global\":\"2023-12-15T12:13:55.103Z\",\"subscription\":\"2023-12-15T12:13:55.103Z\"},\"lastSeenAt\":{\"global\":\"2023-12-19T11:39:51.52Z\",\"subscription\":\"2023-12-19T11:39:51.52Z\"}}},\"botd\":{\"data\":{\"bot\":{\"result\":\"notDetected\"},\"meta\":{\"foo\":\"bar\"},\"url\":\"http://localhost:8080/\",\"ip\":\"::1\",\"time\":\"2023-12-20T10:12:13.894Z\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15\",\"requestId\":\"1703067132750.Z5hutJ\"}}}}", true)); + $response = new Response(200, [], "{\"products\":{\"identification\":{\"data\":{\"visitorId\":\"2ZEDCZEfOfXjEmMuE3tq\",\"requestId\":\"1703067132750.Z5hutJ\",\"browserDetails\":{\"browserName\":\"Safari\",\"browserMajorVersion\":\"17\",\"browserFullVersion\":\"17.3\",\"os\":\"Mac OS X\",\"osVersion\":\"10.15.7\",\"device\":\"Other\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15\"},\"incognito\":false,\"ip\":\"::1\",\"ipLocation\":{\"accuracyRadius\":1000,\"latitude\":59.3241,\"longitude\":18.0517,\"postalCode\":\"100 05\",\"timezone\":\"Europe/Stockholm\",\"city\":{\"name\":\"Stockholm\"},\"country\":{\"code\":\"SE\",\"name\":\"Sweden\"},\"continent\":{\"code\":\"EU\",\"name\":\"Europe\"},\"subdivisions\":[{\"isoCode\":\"AB\",\"name\":\"Stockholm County\"}]},\"timestamp\":1703067136286,\"time\":\"2023-12-20T10:12:16Z\",\"url\":\"http://localhost:8080/\",\"tag\":{\"foo\":\"bar\"},\"confidence\":{\"score\":1},\"visitorFound\":true,\"firstSeenAt\":{\"global\":\"2023-12-15T12:13:55.103Z\",\"subscription\":\"2023-12-15T12:13:55.103Z\"},\"lastSeenAt\":{\"global\":\"2023-12-19T11:39:51.52Z\",\"subscription\":\"2023-12-19T11:39:51.52Z\"}}},\"botd\":{\"data\":{\"bot\":{\"result\":\"notDetected\"},\"meta\":{\"foo\":\"bar\"},\"url\":\"http://localhost:8080/\",\"ip\":\"::1\",\"time\":\"2023-12-20T10:12:13.894Z\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15\",\"requestId\":\"1703067132750.Z5hutJ\"}}}}"); + + $expectedResponse = ObjectSerializer::deserialize($response, EventResponse::class); $eventResponse = Sealed::unsealEventResponse( $sealedResult, From 950a3184c94b39ee8660dbd1ed337f73a29fdaa5 Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 15 Aug 2024 12:36:02 +0300 Subject: [PATCH 10/14] refactor: use required annotation for model getters --- src/Model/ASN.php | 4 ++-- src/Model/BotdDetectionResult.php | 2 +- src/Model/BotdResult.php | 12 +++++----- src/Model/BrowserDetails.php | 14 +++++------ src/Model/ClonedAppResult.php | 2 +- src/Model/Confidence.php | 2 +- src/Model/DataCenter.php | 2 +- src/Model/EmulatorResult.php | 2 +- src/Model/ErrorEvent403ResponseError.php | 4 ++-- src/Model/ErrorEvent404ResponseError.php | 4 ++-- src/Model/ErrorVisits403.php | 2 +- src/Model/EventResponse.php | 2 +- src/Model/FactoryResetResult.php | 4 ++-- src/Model/FridaResult.php | 2 +- src/Model/HighActivityResult.php | 2 +- src/Model/IdentificationError.php | 4 ++-- src/Model/IncognitoResult.php | 2 +- src/Model/IpBlockListResult.php | 4 ++-- src/Model/IpBlockListResultDetails.php | 4 ++-- src/Model/IpInfoResultV4.php | 4 ++-- src/Model/IpInfoResultV6.php | 4 ++-- src/Model/JailbrokenResult.php | 2 +- src/Model/Location.php | 4 ++-- src/Model/LocationSpoofingResult.php | 2 +- src/Model/ManyRequestsResponse.php | 2 +- src/Model/PrivacySettingsResult.php | 2 +- src/Model/ProductError.php | 4 ++-- .../ProductsResponseIdentificationData.php | 24 +++++++++---------- src/Model/ProxyResult.php | 2 +- src/Model/Response.php | 4 ++-- src/Model/ResponseVisits.php | 22 ++++++++--------- src/Model/RootAppsResult.php | 2 +- src/Model/SeenAt.php | 4 ++-- src/Model/SuspectScoreResult.php | 2 +- src/Model/TamperingResult.php | 4 ++-- src/Model/TorResult.php | 2 +- src/Model/VirtualMachineResult.php | 2 +- src/Model/Visit.php | 22 ++++++++--------- src/Model/VpnResult.php | 6 ++--- src/Model/VpnResultMethods.php | 6 ++--- src/Model/WebhookVisit.php | 24 +++++++++---------- template/model_generic.mustache | 2 +- 42 files changed, 113 insertions(+), 113 deletions(-) diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 530505cb..216f7923 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -213,7 +213,7 @@ public function valid(): bool /** * Gets asn. */ - public function getAsn(): ?string + public function getAsn(): string { return $this->container['asn']; } @@ -235,7 +235,7 @@ public function setAsn(string $asn): self /** * Gets network. */ - public function getNetwork(): ?string + public function getNetwork(): string { return $this->container['network']; } diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index f6bea206..bc2c4524 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -230,7 +230,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?string + public function getResult(): string { return $this->container['result']; } diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index f39e516f..a5d0ccf6 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -251,7 +251,7 @@ public function valid(): bool /** * Gets ip. */ - public function getIp(): ?string + public function getIp(): string { return $this->container['ip']; } @@ -273,7 +273,7 @@ public function setIp(string $ip): self /** * Gets time. */ - public function getTime(): ?\DateTime + public function getTime(): \DateTime { return $this->container['time']; } @@ -295,7 +295,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): ?string + public function getUrl(): string { return $this->container['url']; } @@ -317,7 +317,7 @@ public function setUrl(string $url): self /** * Gets user_agent. */ - public function getUserAgent(): ?string + public function getUserAgent(): string { return $this->container['user_agent']; } @@ -339,7 +339,7 @@ public function setUserAgent(string $user_agent): self /** * Gets request_id. */ - public function getRequestId(): ?string + public function getRequestId(): string { return $this->container['request_id']; } @@ -383,7 +383,7 @@ public function setLinkedId(string $linked_id): self /** * Gets bot. */ - public function getBot(): ?BotdDetectionResult + public function getBot(): BotdDetectionResult { return $this->container['bot']; } diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index bfd50fb0..e5190554 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -258,7 +258,7 @@ public function valid(): bool /** * Gets browser_name. */ - public function getBrowserName(): ?string + public function getBrowserName(): string { return $this->container['browser_name']; } @@ -280,7 +280,7 @@ public function setBrowserName(string $browser_name): self /** * Gets browser_major_version. */ - public function getBrowserMajorVersion(): ?string + public function getBrowserMajorVersion(): string { return $this->container['browser_major_version']; } @@ -302,7 +302,7 @@ public function setBrowserMajorVersion(string $browser_major_version): self /** * Gets browser_full_version. */ - public function getBrowserFullVersion(): ?string + public function getBrowserFullVersion(): string { return $this->container['browser_full_version']; } @@ -324,7 +324,7 @@ public function setBrowserFullVersion(string $browser_full_version): self /** * Gets os. */ - public function getOs(): ?string + public function getOs(): string { return $this->container['os']; } @@ -346,7 +346,7 @@ public function setOs(string $os): self /** * Gets os_version. */ - public function getOsVersion(): ?string + public function getOsVersion(): string { return $this->container['os_version']; } @@ -368,7 +368,7 @@ public function setOsVersion(string $os_version): self /** * Gets device. */ - public function getDevice(): ?string + public function getDevice(): string { return $this->container['device']; } @@ -390,7 +390,7 @@ public function setDevice(string $device): self /** * Gets user_agent. */ - public function getUserAgent(): ?string + public function getUserAgent(): string { return $this->container['user_agent']; } diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index e09b176a..61fd7c2d 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index a66a2d90..ac489b0d 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets score. */ - public function getScore(): ?float + public function getScore(): float { return $this->container['score']; } diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index b8565a33..d3f65818 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -204,7 +204,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index eb39b047..0a4398fd 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index e714bd2c..702c754c 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -234,7 +234,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): ?string + public function getCode(): string { return $this->container['code']; } @@ -265,7 +265,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): ?string + public function getMessage(): string { return $this->container['message']; } diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index 1993400b..607b1924 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -228,7 +228,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): ?string + public function getCode(): string { return $this->container['code']; } @@ -259,7 +259,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): ?string + public function getMessage(): string { return $this->container['message']; } diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 97f37869..297998f3 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets error. */ - public function getError(): ?string + public function getError(): string { return $this->container['error']; } diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index 6ecd6eec..cceb4a49 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -206,7 +206,7 @@ public function valid(): bool /** * Gets products. */ - public function getProducts(): ?ProductsResponse + public function getProducts(): ProductsResponse { return $this->container['products']; } diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index f06871d0..fbf1834d 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets time. */ - public function getTime(): ?\DateTime + public function getTime(): \DateTime { return $this->container['time']; } @@ -229,7 +229,7 @@ public function setTime(\DateTime $time): self /** * Gets timestamp. */ - public function getTimestamp(): ?int + public function getTimestamp(): int { return $this->container['timestamp']; } diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index 29fdb492..ad511bad 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index e381e1ce..503dc337 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -204,7 +204,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index 47d5157e..c8890cc4 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -230,7 +230,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): ?string + public function getCode(): string { return $this->container['code']; } @@ -261,7 +261,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): ?string + public function getMessage(): string { return $this->container['message']; } diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index 27db01f7..6299cc93 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index 8c5435e2..c6131829 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } @@ -229,7 +229,7 @@ public function setResult(bool $result): self /** * Gets details. */ - public function getDetails(): ?IpBlockListResultDetails + public function getDetails(): IpBlockListResultDetails { return $this->container['details']; } diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index cc3823ae..0695fbc1 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets email_spam. */ - public function getEmailSpam(): ?bool + public function getEmailSpam(): bool { return $this->container['email_spam']; } @@ -229,7 +229,7 @@ public function setEmailSpam(bool $email_spam): self /** * Gets attack_source. */ - public function getAttackSource(): ?bool + public function getAttackSource(): bool { return $this->container['attack_source']; } diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 53e0e16b..e78f3f23 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -219,7 +219,7 @@ public function valid(): bool /** * Gets address. */ - public function getAddress(): ?string + public function getAddress(): string { return $this->container['address']; } @@ -241,7 +241,7 @@ public function setAddress(string $address): self /** * Gets geolocation. */ - public function getGeolocation(): ?IPLocation + public function getGeolocation(): IPLocation { return $this->container['geolocation']; } diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index f28f7929..e19214f2 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -219,7 +219,7 @@ public function valid(): bool /** * Gets address. */ - public function getAddress(): ?string + public function getAddress(): string { return $this->container['address']; } @@ -241,7 +241,7 @@ public function setAddress(string $address): self /** * Gets geolocation. */ - public function getGeolocation(): ?IPLocation + public function getGeolocation(): IPLocation { return $this->container['geolocation']; } diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 6e7190d7..fa94ca4d 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/Location.php b/src/Model/Location.php index ffdd5597..10af00e7 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): ?string + public function getCode(): string { return $this->container['code']; } @@ -229,7 +229,7 @@ public function setCode(string $code): self /** * Gets name. */ - public function getName(): ?string + public function getName(): string { return $this->container['name']; } diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index 5da5bf66..fb7e697c 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 9fe7fc0d..f2c782c5 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets error. */ - public function getError(): ?string + public function getError(): string { return $this->container['error']; } diff --git a/src/Model/PrivacySettingsResult.php b/src/Model/PrivacySettingsResult.php index db425e5e..28bcb9a6 100644 --- a/src/Model/PrivacySettingsResult.php +++ b/src/Model/PrivacySettingsResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 3dfc1c36..5a0879e9 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -230,7 +230,7 @@ public function valid(): bool /** * Gets code. */ - public function getCode(): ?string + public function getCode(): string { return $this->container['code']; } @@ -261,7 +261,7 @@ public function setCode(string $code): self /** * Gets message. */ - public function getMessage(): ?string + public function getMessage(): string { return $this->container['message']; } diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 9fa2101d..07762091 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -315,7 +315,7 @@ public function valid(): bool /** * Gets request_id. */ - public function getRequestId(): ?string + public function getRequestId(): string { return $this->container['request_id']; } @@ -337,7 +337,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): ?BrowserDetails + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -359,7 +359,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets incognito. */ - public function getIncognito(): ?bool + public function getIncognito(): bool { return $this->container['incognito']; } @@ -381,7 +381,7 @@ public function setIncognito(bool $incognito): self /** * Gets ip. */ - public function getIp(): ?string + public function getIp(): string { return $this->container['ip']; } @@ -425,7 +425,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): ?int + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -447,7 +447,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): ?\DateTime + public function getTime(): \DateTime { return $this->container['time']; } @@ -469,7 +469,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): ?string + public function getUrl(): string { return $this->container['url']; } @@ -493,7 +493,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): ?array + public function getTag(): array { return $this->container['tag']; } @@ -559,7 +559,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): ?bool + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -581,7 +581,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): ?SeenAt + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -603,7 +603,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): ?SeenAt + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -625,7 +625,7 @@ public function setLastSeenAt(SeenAt $last_seen_at): self /** * Gets visitor_id. */ - public function getVisitorId(): ?string + public function getVisitorId(): string { return $this->container['visitor_id']; } diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 9d6c88b1..0ba7fc50 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/Response.php b/src/Model/Response.php index 46f63c1d..b054c409 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -221,7 +221,7 @@ public function valid(): bool /** * Gets visitor_id. */ - public function getVisitorId(): ?string + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -245,7 +245,7 @@ public function setVisitorId(string $visitor_id): self * * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] */ - public function getVisits(): ?array + public function getVisits(): array { return $this->container['visits']; } diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index b1871685..63c7135e 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -306,7 +306,7 @@ public function valid(): bool /** * Gets request_id. */ - public function getRequestId(): ?string + public function getRequestId(): string { return $this->container['request_id']; } @@ -328,7 +328,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): ?BrowserDetails + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -350,7 +350,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets incognito. */ - public function getIncognito(): ?bool + public function getIncognito(): bool { return $this->container['incognito']; } @@ -372,7 +372,7 @@ public function setIncognito(bool $incognito): self /** * Gets ip. */ - public function getIp(): ?string + public function getIp(): string { return $this->container['ip']; } @@ -416,7 +416,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): ?int + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -438,7 +438,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): ?\DateTime + public function getTime(): \DateTime { return $this->container['time']; } @@ -460,7 +460,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): ?string + public function getUrl(): string { return $this->container['url']; } @@ -484,7 +484,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): ?array + public function getTag(): array { return $this->container['tag']; } @@ -550,7 +550,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): ?bool + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -572,7 +572,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): ?SeenAt + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -594,7 +594,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): ?SeenAt + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index 0c0fe279..6c1c82cf 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 0d5fe032..29de802d 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets global. */ - public function getGlobal(): ?\DateTime + public function getGlobal(): \DateTime { return $this->container['global']; } @@ -229,7 +229,7 @@ public function setGlobal(\DateTime $global): self /** * Gets subscription. */ - public function getSubscription(): ?\DateTime + public function getSubscription(): \DateTime { return $this->container['subscription']; } diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index dfcc6b63..3225bda1 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?int + public function getResult(): int { return $this->container['result']; } diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index a6504cf5..e642bcd4 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -207,7 +207,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } @@ -229,7 +229,7 @@ public function setResult(bool $result): self /** * Gets anomaly_score. */ - public function getAnomalyScore(): ?float + public function getAnomalyScore(): float { return $this->container['anomaly_score']; } diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index 55bad9d6..c09aeaaf 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index b4ab2899..644f9144 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -198,7 +198,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 1705250d..72c306a6 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -306,7 +306,7 @@ public function valid(): bool /** * Gets request_id. */ - public function getRequestId(): ?string + public function getRequestId(): string { return $this->container['request_id']; } @@ -328,7 +328,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): ?BrowserDetails + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -350,7 +350,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets incognito. */ - public function getIncognito(): ?bool + public function getIncognito(): bool { return $this->container['incognito']; } @@ -372,7 +372,7 @@ public function setIncognito(bool $incognito): self /** * Gets ip. */ - public function getIp(): ?string + public function getIp(): string { return $this->container['ip']; } @@ -416,7 +416,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): ?int + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -438,7 +438,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): ?\DateTime + public function getTime(): \DateTime { return $this->container['time']; } @@ -460,7 +460,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): ?string + public function getUrl(): string { return $this->container['url']; } @@ -484,7 +484,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): ?array + public function getTag(): array { return $this->container['tag']; } @@ -550,7 +550,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): ?bool + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -572,7 +572,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): ?SeenAt + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -594,7 +594,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): ?SeenAt + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index f809b168..e320c874 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -222,7 +222,7 @@ public function valid(): bool /** * Gets result. */ - public function getResult(): ?bool + public function getResult(): bool { return $this->container['result']; } @@ -244,7 +244,7 @@ public function setResult(bool $result): self /** * Gets origin_timezone. */ - public function getOriginTimezone(): ?string + public function getOriginTimezone(): string { return $this->container['origin_timezone']; } @@ -288,7 +288,7 @@ public function setOriginCountry(string $origin_country): self /** * Gets methods. */ - public function getMethods(): ?VpnResultMethods + public function getMethods(): VpnResultMethods { return $this->container['methods']; } diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 2426ecae..3c4f1f36 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -216,7 +216,7 @@ public function valid(): bool /** * Gets timezone_mismatch. */ - public function getTimezoneMismatch(): ?bool + public function getTimezoneMismatch(): bool { return $this->container['timezone_mismatch']; } @@ -238,7 +238,7 @@ public function setTimezoneMismatch(bool $timezone_mismatch): self /** * Gets public_vpn. */ - public function getPublicVpn(): ?bool + public function getPublicVpn(): bool { return $this->container['public_vpn']; } @@ -260,7 +260,7 @@ public function setPublicVpn(bool $public_vpn): self /** * Gets auxiliary_mobile. */ - public function getAuxiliaryMobile(): ?bool + public function getAuxiliaryMobile(): bool { return $this->container['auxiliary_mobile']; } diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 4ef9337a..fe15564a 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -441,7 +441,7 @@ public function valid(): bool /** * Gets visitor_id. */ - public function getVisitorId(): ?string + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -551,7 +551,7 @@ public function setIpInfo(IpInfoResult $ip_info): self /** * Gets incognito. */ - public function getIncognito(): ?bool + public function getIncognito(): bool { return $this->container['incognito']; } @@ -947,7 +947,7 @@ public function setSuspectScore(SuspectScoreResult $suspect_score): self /** * Gets request_id. */ - public function getRequestId(): ?string + public function getRequestId(): string { return $this->container['request_id']; } @@ -969,7 +969,7 @@ public function setRequestId(string $request_id): self /** * Gets browser_details. */ - public function getBrowserDetails(): ?BrowserDetails + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -991,7 +991,7 @@ public function setBrowserDetails(BrowserDetails $browser_details): self /** * Gets ip. */ - public function getIp(): ?string + public function getIp(): string { return $this->container['ip']; } @@ -1035,7 +1035,7 @@ public function setIpLocation(DeprecatedIPLocation $ip_location): self /** * Gets timestamp. */ - public function getTimestamp(): ?int + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -1057,7 +1057,7 @@ public function setTimestamp(int $timestamp): self /** * Gets time. */ - public function getTime(): ?\DateTime + public function getTime(): \DateTime { return $this->container['time']; } @@ -1079,7 +1079,7 @@ public function setTime(\DateTime $time): self /** * Gets url. */ - public function getUrl(): ?string + public function getUrl(): string { return $this->container['url']; } @@ -1103,7 +1103,7 @@ public function setUrl(string $url): self * * @return map[string,object] */ - public function getTag(): ?array + public function getTag(): array { return $this->container['tag']; } @@ -1169,7 +1169,7 @@ public function setConfidence(Confidence $confidence): self /** * Gets visitor_found. */ - public function getVisitorFound(): ?bool + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -1191,7 +1191,7 @@ public function setVisitorFound(bool $visitor_found): self /** * Gets first_seen_at. */ - public function getFirstSeenAt(): ?SeenAt + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -1213,7 +1213,7 @@ public function setFirstSeenAt(SeenAt $first_seen_at): self /** * Gets last_seen_at. */ - public function getLastSeenAt(): ?SeenAt + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } diff --git a/template/model_generic.mustache b/template/model_generic.mustache index c16a71fd..c4dc68cc 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -248,7 +248,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * Gets {{name}} * @return {{datatype}} */ - public function {{getter}}(): {{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}}|null + public function {{getter}}(): {{^required}}?{{/required}}{{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} { return $this->container['{{name}}']; } From e7627df49ae7a99c5611c97fd8b4456c305cab79 Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 15 Aug 2024 12:46:50 +0300 Subject: [PATCH 11/14] refactor: use required annotation for model setters --- scripts/generate.sh | 4 +- src/Model/ASN.php | 2 +- src/Model/BotdDetectionResult.php | 2 +- src/Model/BotdResult.php | 2 +- src/Model/BrowserDetails.php | 2 +- src/Model/DataCenter.php | 2 +- src/Model/DeprecatedIPLocation.php | 18 +++---- src/Model/DeprecatedIPLocationCity.php | 2 +- src/Model/ErrorEvent403Response.php | 2 +- src/Model/ErrorEvent404Response.php | 2 +- src/Model/EventResponse.php | 2 +- src/Model/HighActivityResult.php | 2 +- src/Model/IPLocation.php | 18 +++---- src/Model/IPLocationCity.php | 2 +- src/Model/IpInfoResult.php | 4 +- src/Model/IpInfoResultV4.php | 4 +- src/Model/IpInfoResultV6.php | 4 +- src/Model/ProductsResponse.php | 42 ++++++++-------- src/Model/ProductsResponseBotd.php | 4 +- src/Model/ProductsResponseIdentification.php | 4 +- .../ProductsResponseIdentificationData.php | 6 +-- src/Model/Response.php | 4 +- src/Model/ResponseVisits.php | 6 +-- src/Model/SignalResponseClonedApp.php | 4 +- src/Model/SignalResponseEmulator.php | 4 +- src/Model/SignalResponseFactoryReset.php | 4 +- src/Model/SignalResponseFrida.php | 4 +- src/Model/SignalResponseHighActivity.php | 4 +- src/Model/SignalResponseIncognito.php | 4 +- src/Model/SignalResponseIpBlocklist.php | 4 +- src/Model/SignalResponseIpInfo.php | 4 +- src/Model/SignalResponseJailbroken.php | 4 +- src/Model/SignalResponseLocationSpoofing.php | 4 +- src/Model/SignalResponsePrivacySettings.php | 4 +- src/Model/SignalResponseProxy.php | 4 +- .../SignalResponseRawDeviceAttributes.php | 4 +- src/Model/SignalResponseRootApps.php | 4 +- src/Model/SignalResponseSuspectScore.php | 4 +- src/Model/SignalResponseTampering.php | 4 +- src/Model/SignalResponseTor.php | 4 +- src/Model/SignalResponseVirtualMachine.php | 4 +- src/Model/SignalResponseVpn.php | 4 +- src/Model/Subdivision.php | 4 +- src/Model/Visit.php | 6 +-- src/Model/VpnResult.php | 2 +- src/Model/WebhookVisit.php | 48 +++++++++---------- template/model_generic.mustache | 2 +- 47 files changed, 139 insertions(+), 139 deletions(-) diff --git a/scripts/generate.sh b/scripts/generate.sh index 4a0d5237..90e9d983 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -58,10 +58,10 @@ fi ( # Model file fix if [ "$platform" = "Darwin" ]; then - sed -i '' 's/public function setData(RawDeviceAttributesResult $data): self/public function setData(array $data): self/' ./src/Model/SignalResponseRawDeviceAttributes.php + sed -i '' 's/public function setData(?RawDeviceAttributesResult $data): self/public function setData(?array $data): self/' ./src/Model/SignalResponseRawDeviceAttributes.php sed -i '' 's/public function getData(): ?RawDeviceAttributesResult/public function getData(): array/' ./src/Model/SignalResponseRawDeviceAttributes.php else - sed -i 's/public function setData(RawDeviceAttributesResult $data): self/public function setData(array $data): self/' ./src/Model/SignalResponseRawDeviceAttributes.php + sed -i 's/public function setData(?RawDeviceAttributesResult $data): self/public function setData(?array $data): self/' ./src/Model/SignalResponseRawDeviceAttributes.php sed -i 's/public function getData(): ?RawDeviceAttributesResult/public function getData(): array/' ./src/Model/SignalResponseRawDeviceAttributes.php fi ) diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 216f7923..3cdd4601 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -269,7 +269,7 @@ public function getName(): ?string * * @return $this */ - public function setName(string $name): self + public function setName(?string $name): self { $this->container['name'] = $name; diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index bc2c4524..89ef69c4 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -273,7 +273,7 @@ public function getType(): ?string * * @return $this */ - public function setType(string $type): self + public function setType(?string $type): self { $this->container['type'] = $type; diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index a5d0ccf6..871ca617 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -373,7 +373,7 @@ public function getLinkedId(): ?string * * @return $this */ - public function setLinkedId(string $linked_id): self + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index e5190554..ce20254f 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -424,7 +424,7 @@ public function getBotProbability(): ?int * * @return $this */ - public function setBotProbability(int $bot_probability): self + public function setBotProbability(?int $bot_probability): self { $this->container['bot_probability'] = $bot_probability; diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index d3f65818..a817ca57 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -238,7 +238,7 @@ public function getName(): ?string * * @return $this */ - public function setName(string $name): self + public function setName(?string $name): self { $this->container['name'] = $name; diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index ec436a63..78062c3e 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -254,7 +254,7 @@ public function getAccuracyRadius(): ?int * * @return $this */ - public function setAccuracyRadius(int $accuracy_radius): self + public function setAccuracyRadius(?int $accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -276,7 +276,7 @@ public function getLatitude(): ?float * * @return $this */ - public function setLatitude(float $latitude): self + public function setLatitude(?float $latitude): self { $this->container['latitude'] = $latitude; @@ -298,7 +298,7 @@ public function getLongitude(): ?float * * @return $this */ - public function setLongitude(float $longitude): self + public function setLongitude(?float $longitude): self { $this->container['longitude'] = $longitude; @@ -320,7 +320,7 @@ public function getPostalCode(): ?string * * @return $this */ - public function setPostalCode(string $postal_code): self + public function setPostalCode(?string $postal_code): self { $this->container['postal_code'] = $postal_code; @@ -342,7 +342,7 @@ public function getTimezone(): ?string * * @return $this */ - public function setTimezone(string $timezone): self + public function setTimezone(?string $timezone): self { $this->container['timezone'] = $timezone; @@ -364,7 +364,7 @@ public function getCity(): ?DeprecatedIPLocationCity * * @return $this */ - public function setCity(DeprecatedIPLocationCity $city): self + public function setCity(?DeprecatedIPLocationCity $city): self { $this->container['city'] = $city; @@ -386,7 +386,7 @@ public function getCountry(): ?Location * * @return $this */ - public function setCountry(Location $country): self + public function setCountry(?Location $country): self { $this->container['country'] = $country; @@ -408,7 +408,7 @@ public function getContinent(): ?Location * * @return $this */ - public function setContinent(Location $continent): self + public function setContinent(?Location $continent): self { $this->container['continent'] = $continent; @@ -432,7 +432,7 @@ public function getSubdivisions(): ?array * * @return $this */ - public function setSubdivisions(array $subdivisions): self + public function setSubdivisions(?array $subdivisions): self { $this->container['subdivisions'] = $subdivisions; diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index 9a1b4416..8374fd5a 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -204,7 +204,7 @@ public function getName(): ?string * * @return $this */ - public function setName(string $name): self + public function setName(?string $name): self { $this->container['name'] = $name; diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index 7a1bc6d0..f4922f99 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -204,7 +204,7 @@ public function getError(): ?ErrorEvent403ResponseError * * @return $this */ - public function setError(ErrorEvent403ResponseError $error): self + public function setError(?ErrorEvent403ResponseError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index b6be0ba3..247baa79 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -204,7 +204,7 @@ public function getError(): ?ErrorEvent404ResponseError * * @return $this */ - public function setError(ErrorEvent404ResponseError $error): self + public function setError(?ErrorEvent404ResponseError $error): self { $this->container['error'] = $error; diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index cceb4a49..d167078e 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -240,7 +240,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index 503dc337..9c0a4201 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -238,7 +238,7 @@ public function getDailyRequests(): ?float * * @return $this */ - public function setDailyRequests(float $daily_requests): self + public function setDailyRequests(?float $daily_requests): self { $this->container['daily_requests'] = $daily_requests; diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index a292b156..617effab 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -252,7 +252,7 @@ public function getAccuracyRadius(): ?int * * @return $this */ - public function setAccuracyRadius(int $accuracy_radius): self + public function setAccuracyRadius(?int $accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -274,7 +274,7 @@ public function getLatitude(): ?float * * @return $this */ - public function setLatitude(float $latitude): self + public function setLatitude(?float $latitude): self { $this->container['latitude'] = $latitude; @@ -296,7 +296,7 @@ public function getLongitude(): ?float * * @return $this */ - public function setLongitude(float $longitude): self + public function setLongitude(?float $longitude): self { $this->container['longitude'] = $longitude; @@ -318,7 +318,7 @@ public function getPostalCode(): ?string * * @return $this */ - public function setPostalCode(string $postal_code): self + public function setPostalCode(?string $postal_code): self { $this->container['postal_code'] = $postal_code; @@ -340,7 +340,7 @@ public function getTimezone(): ?string * * @return $this */ - public function setTimezone(string $timezone): self + public function setTimezone(?string $timezone): self { $this->container['timezone'] = $timezone; @@ -362,7 +362,7 @@ public function getCity(): ?IPLocationCity * * @return $this */ - public function setCity(IPLocationCity $city): self + public function setCity(?IPLocationCity $city): self { $this->container['city'] = $city; @@ -384,7 +384,7 @@ public function getCountry(): ?Location * * @return $this */ - public function setCountry(Location $country): self + public function setCountry(?Location $country): self { $this->container['country'] = $country; @@ -406,7 +406,7 @@ public function getContinent(): ?Location * * @return $this */ - public function setContinent(Location $continent): self + public function setContinent(?Location $continent): self { $this->container['continent'] = $continent; @@ -430,7 +430,7 @@ public function getSubdivisions(): ?array * * @return $this */ - public function setSubdivisions(array $subdivisions): self + public function setSubdivisions(?array $subdivisions): self { $this->container['subdivisions'] = $subdivisions; diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index b9e2adc6..10899728 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -204,7 +204,7 @@ public function getName(): ?string * * @return $this */ - public function setName(string $name): self + public function setName(?string $name): self { $this->container['name'] = $name; diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index e2d8919c..3eee0292 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -212,7 +212,7 @@ public function getV4(): ?IpInfoResultV4 * * @return $this */ - public function setV4(IpInfoResultV4 $v4): self + public function setV4(?IpInfoResultV4 $v4): self { $this->container['v4'] = $v4; @@ -234,7 +234,7 @@ public function getV6(): ?IpInfoResultV6 * * @return $this */ - public function setV6(IpInfoResultV6 $v6): self + public function setV6(?IpInfoResultV6 $v6): self { $this->container['v6'] = $v6; diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index e78f3f23..4c32dff8 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -275,7 +275,7 @@ public function getAsn(): ?ASN * * @return $this */ - public function setAsn(ASN $asn): self + public function setAsn(?ASN $asn): self { $this->container['asn'] = $asn; @@ -297,7 +297,7 @@ public function getDatacenter(): ?DataCenter * * @return $this */ - public function setDatacenter(DataCenter $datacenter): self + public function setDatacenter(?DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index e19214f2..808ec4be 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -275,7 +275,7 @@ public function getAsn(): ?ASN * * @return $this */ - public function setAsn(ASN $asn): self + public function setAsn(?ASN $asn): self { $this->container['asn'] = $asn; @@ -297,7 +297,7 @@ public function getDatacenter(): ?DataCenter * * @return $this */ - public function setDatacenter(DataCenter $datacenter): self + public function setDatacenter(?DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index 1a368e31..d2526c91 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -326,7 +326,7 @@ public function getIdentification(): ?ProductsResponseIdentification * * @return $this */ - public function setIdentification(ProductsResponseIdentification $identification): self + public function setIdentification(?ProductsResponseIdentification $identification): self { $this->container['identification'] = $identification; @@ -348,7 +348,7 @@ public function getBotd(): ?ProductsResponseBotd * * @return $this */ - public function setBotd(ProductsResponseBotd $botd): self + public function setBotd(?ProductsResponseBotd $botd): self { $this->container['botd'] = $botd; @@ -370,7 +370,7 @@ public function getIpInfo(): ?SignalResponseIpInfo * * @return $this */ - public function setIpInfo(SignalResponseIpInfo $ip_info): self + public function setIpInfo(?SignalResponseIpInfo $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -392,7 +392,7 @@ public function getIncognito(): ?SignalResponseIncognito * * @return $this */ - public function setIncognito(SignalResponseIncognito $incognito): self + public function setIncognito(?SignalResponseIncognito $incognito): self { $this->container['incognito'] = $incognito; @@ -414,7 +414,7 @@ public function getRootApps(): ?SignalResponseRootApps * * @return $this */ - public function setRootApps(SignalResponseRootApps $root_apps): self + public function setRootApps(?SignalResponseRootApps $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -436,7 +436,7 @@ public function getEmulator(): ?SignalResponseEmulator * * @return $this */ - public function setEmulator(SignalResponseEmulator $emulator): self + public function setEmulator(?SignalResponseEmulator $emulator): self { $this->container['emulator'] = $emulator; @@ -458,7 +458,7 @@ public function getClonedApp(): ?SignalResponseClonedApp * * @return $this */ - public function setClonedApp(SignalResponseClonedApp $cloned_app): self + public function setClonedApp(?SignalResponseClonedApp $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -480,7 +480,7 @@ public function getFactoryReset(): ?SignalResponseFactoryReset * * @return $this */ - public function setFactoryReset(SignalResponseFactoryReset $factory_reset): self + public function setFactoryReset(?SignalResponseFactoryReset $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -502,7 +502,7 @@ public function getJailbroken(): ?SignalResponseJailbroken * * @return $this */ - public function setJailbroken(SignalResponseJailbroken $jailbroken): self + public function setJailbroken(?SignalResponseJailbroken $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -524,7 +524,7 @@ public function getFrida(): ?SignalResponseFrida * * @return $this */ - public function setFrida(SignalResponseFrida $frida): self + public function setFrida(?SignalResponseFrida $frida): self { $this->container['frida'] = $frida; @@ -546,7 +546,7 @@ public function getIpBlocklist(): ?SignalResponseIpBlocklist * * @return $this */ - public function setIpBlocklist(SignalResponseIpBlocklist $ip_blocklist): self + public function setIpBlocklist(?SignalResponseIpBlocklist $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -568,7 +568,7 @@ public function getTor(): ?SignalResponseTor * * @return $this */ - public function setTor(SignalResponseTor $tor): self + public function setTor(?SignalResponseTor $tor): self { $this->container['tor'] = $tor; @@ -590,7 +590,7 @@ public function getPrivacySettings(): ?SignalResponsePrivacySettings * * @return $this */ - public function setPrivacySettings(SignalResponsePrivacySettings $privacy_settings): self + public function setPrivacySettings(?SignalResponsePrivacySettings $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -612,7 +612,7 @@ public function getVirtualMachine(): ?SignalResponseVirtualMachine * * @return $this */ - public function setVirtualMachine(SignalResponseVirtualMachine $virtual_machine): self + public function setVirtualMachine(?SignalResponseVirtualMachine $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -634,7 +634,7 @@ public function getVpn(): ?SignalResponseVpn * * @return $this */ - public function setVpn(SignalResponseVpn $vpn): self + public function setVpn(?SignalResponseVpn $vpn): self { $this->container['vpn'] = $vpn; @@ -656,7 +656,7 @@ public function getProxy(): ?SignalResponseProxy * * @return $this */ - public function setProxy(SignalResponseProxy $proxy): self + public function setProxy(?SignalResponseProxy $proxy): self { $this->container['proxy'] = $proxy; @@ -678,7 +678,7 @@ public function getTampering(): ?SignalResponseTampering * * @return $this */ - public function setTampering(SignalResponseTampering $tampering): self + public function setTampering(?SignalResponseTampering $tampering): self { $this->container['tampering'] = $tampering; @@ -700,7 +700,7 @@ public function getHighActivity(): ?SignalResponseHighActivity * * @return $this */ - public function setHighActivity(SignalResponseHighActivity $high_activity): self + public function setHighActivity(?SignalResponseHighActivity $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -722,7 +722,7 @@ public function getLocationSpoofing(): ?SignalResponseLocationSpoofing * * @return $this */ - public function setLocationSpoofing(SignalResponseLocationSpoofing $location_spoofing): self + public function setLocationSpoofing(?SignalResponseLocationSpoofing $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -744,7 +744,7 @@ public function getSuspectScore(): ?SignalResponseSuspectScore * * @return $this */ - public function setSuspectScore(SignalResponseSuspectScore $suspect_score): self + public function setSuspectScore(?SignalResponseSuspectScore $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -766,7 +766,7 @@ public function getRawDeviceAttributes(): ?SignalResponseRawDeviceAttributes * * @return $this */ - public function setRawDeviceAttributes(SignalResponseRawDeviceAttributes $raw_device_attributes): self + public function setRawDeviceAttributes(?SignalResponseRawDeviceAttributes $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 6d04a535..05b6ab5a 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -210,7 +210,7 @@ public function getData(): ?BotdResult * * @return $this */ - public function setData(BotdResult $data): self + public function setData(?BotdResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index de7010cd..d9d0022a 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -210,7 +210,7 @@ public function getData(): ?ProductsResponseIdentificationData * * @return $this */ - public function setData(ProductsResponseIdentificationData $data): self + public function setData(?ProductsResponseIdentificationData $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?IdentificationError * * @return $this */ - public function setError(IdentificationError $error): self + public function setError(?IdentificationError $error): self { $this->container['error'] = $error; diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 07762091..5e6294d2 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -415,7 +415,7 @@ public function getIpLocation(): ?DeprecatedIPLocation * * @return $this */ - public function setIpLocation(DeprecatedIPLocation $ip_location): self + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -527,7 +527,7 @@ public function getLinkedId(): ?string * * @return $this */ - public function setLinkedId(string $linked_id): self + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -549,7 +549,7 @@ public function getConfidence(): ?Confidence * * @return $this */ - public function setConfidence(Confidence $confidence): self + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; diff --git a/src/Model/Response.php b/src/Model/Response.php index b054c409..b8e54550 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -279,7 +279,7 @@ public function getLastTimestamp(): ?int * * @return $this */ - public function setLastTimestamp(int $last_timestamp): self + public function setLastTimestamp(?int $last_timestamp): self { $this->container['last_timestamp'] = $last_timestamp; @@ -301,7 +301,7 @@ public function getPaginationKey(): ?string * * @return $this */ - public function setPaginationKey(string $pagination_key): self + public function setPaginationKey(?string $pagination_key): self { $this->container['pagination_key'] = $pagination_key; diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 63c7135e..383134e5 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -406,7 +406,7 @@ public function getIpLocation(): ?DeprecatedIPLocation * * @return $this */ - public function setIpLocation(DeprecatedIPLocation $ip_location): self + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -518,7 +518,7 @@ public function getLinkedId(): ?string * * @return $this */ - public function setLinkedId(string $linked_id): self + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -540,7 +540,7 @@ public function getConfidence(): ?Confidence * * @return $this */ - public function setConfidence(Confidence $confidence): self + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 85eab68e..94b5e5c5 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -210,7 +210,7 @@ public function getData(): ?ClonedAppResult * * @return $this */ - public function setData(ClonedAppResult $data): self + public function setData(?ClonedAppResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 92bfaa0e..7d276ca0 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -210,7 +210,7 @@ public function getData(): ?EmulatorResult * * @return $this */ - public function setData(EmulatorResult $data): self + public function setData(?EmulatorResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 2f13a181..4604cc6a 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -210,7 +210,7 @@ public function getData(): ?FactoryResetResult * * @return $this */ - public function setData(FactoryResetResult $data): self + public function setData(?FactoryResetResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index 95da9699..1ffb8297 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -210,7 +210,7 @@ public function getData(): ?FridaResult * * @return $this */ - public function setData(FridaResult $data): self + public function setData(?FridaResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 23a67629..6bccfd1a 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -210,7 +210,7 @@ public function getData(): ?HighActivityResult * * @return $this */ - public function setData(HighActivityResult $data): self + public function setData(?HighActivityResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index a4cee05c..cf0e38dc 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -210,7 +210,7 @@ public function getData(): ?IncognitoResult * * @return $this */ - public function setData(IncognitoResult $data): self + public function setData(?IncognitoResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index 292102ea..34e14b10 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -210,7 +210,7 @@ public function getData(): ?IpBlockListResult * * @return $this */ - public function setData(IpBlockListResult $data): self + public function setData(?IpBlockListResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 952c0eed..29ccda62 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -210,7 +210,7 @@ public function getData(): ?IpInfoResult * * @return $this */ - public function setData(IpInfoResult $data): self + public function setData(?IpInfoResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index b05c3baf..80f630af 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -210,7 +210,7 @@ public function getData(): ?JailbrokenResult * * @return $this */ - public function setData(JailbrokenResult $data): self + public function setData(?JailbrokenResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index d492ea52..ed6dfee7 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -210,7 +210,7 @@ public function getData(): ?LocationSpoofingResult * * @return $this */ - public function setData(LocationSpoofingResult $data): self + public function setData(?LocationSpoofingResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index 55a85f9b..a5b03b89 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -210,7 +210,7 @@ public function getData(): ?PrivacySettingsResult * * @return $this */ - public function setData(PrivacySettingsResult $data): self + public function setData(?PrivacySettingsResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index aac706d6..a58f07e0 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -210,7 +210,7 @@ public function getData(): ?ProxyResult * * @return $this */ - public function setData(ProxyResult $data): self + public function setData(?ProxyResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 24fe783e..820bdac3 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -210,7 +210,7 @@ public function getData(): array * * @return $this */ - public function setData(array $data): self + public function setData(?array $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index 11dbd25c..0a01e9f3 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -210,7 +210,7 @@ public function getData(): ?RootAppsResult * * @return $this */ - public function setData(RootAppsResult $data): self + public function setData(?RootAppsResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index a91a75b0..e20baa97 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -210,7 +210,7 @@ public function getData(): ?SuspectScoreResult * * @return $this */ - public function setData(SuspectScoreResult $data): self + public function setData(?SuspectScoreResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 5a3a99e7..2753a81e 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -210,7 +210,7 @@ public function getData(): ?TamperingResult * * @return $this */ - public function setData(TamperingResult $data): self + public function setData(?TamperingResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index b6c87ed6..619c632b 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -210,7 +210,7 @@ public function getData(): ?TorResult * * @return $this */ - public function setData(TorResult $data): self + public function setData(?TorResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 040c3b06..f22f1aba 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -210,7 +210,7 @@ public function getData(): ?VirtualMachineResult * * @return $this */ - public function setData(VirtualMachineResult $data): self + public function setData(?VirtualMachineResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index d53ddab5..2f1a193f 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -210,7 +210,7 @@ public function getData(): ?VpnResult * * @return $this */ - public function setData(VpnResult $data): self + public function setData(?VpnResult $data): self { $this->container['data'] = $data; @@ -232,7 +232,7 @@ public function getError(): ?ProductError * * @return $this */ - public function setError(ProductError $error): self + public function setError(?ProductError $error): self { $this->container['error'] = $error; diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index 4ffa743c..fb950e9c 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -210,7 +210,7 @@ public function getIsoCode(): ?string * * @return $this */ - public function setIsoCode(string $iso_code): self + public function setIsoCode(?string $iso_code): self { $this->container['iso_code'] = $iso_code; @@ -232,7 +232,7 @@ public function getName(): ?string * * @return $this */ - public function setName(string $name): self + public function setName(?string $name): self { $this->container['name'] = $name; diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 72c306a6..f6724fdc 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -406,7 +406,7 @@ public function getIpLocation(): ?DeprecatedIPLocation * * @return $this */ - public function setIpLocation(DeprecatedIPLocation $ip_location): self + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -518,7 +518,7 @@ public function getLinkedId(): ?string * * @return $this */ - public function setLinkedId(string $linked_id): self + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -540,7 +540,7 @@ public function getConfidence(): ?Confidence * * @return $this */ - public function setConfidence(Confidence $confidence): self + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index e320c874..117dba4b 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -278,7 +278,7 @@ public function getOriginCountry(): ?string * * @return $this */ - public function setOriginCountry(string $origin_country): self + public function setOriginCountry(?string $origin_country): self { $this->container['origin_country'] = $origin_country; diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index fe15564a..6009a49b 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -475,7 +475,7 @@ public function getClientReferrer(): ?string * * @return $this */ - public function setClientReferrer(string $client_referrer): self + public function setClientReferrer(?string $client_referrer): self { $this->container['client_referrer'] = $client_referrer; @@ -497,7 +497,7 @@ public function getUserAgent(): ?string * * @return $this */ - public function setUserAgent(string $user_agent): self + public function setUserAgent(?string $user_agent): self { $this->container['user_agent'] = $user_agent; @@ -519,7 +519,7 @@ public function getBot(): ?BotdDetectionResult * * @return $this */ - public function setBot(BotdDetectionResult $bot): self + public function setBot(?BotdDetectionResult $bot): self { $this->container['bot'] = $bot; @@ -541,7 +541,7 @@ public function getIpInfo(): ?IpInfoResult * * @return $this */ - public function setIpInfo(IpInfoResult $ip_info): self + public function setIpInfo(?IpInfoResult $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -585,7 +585,7 @@ public function getRootApps(): ?RootAppsResult * * @return $this */ - public function setRootApps(RootAppsResult $root_apps): self + public function setRootApps(?RootAppsResult $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -607,7 +607,7 @@ public function getEmulator(): ?EmulatorResult * * @return $this */ - public function setEmulator(EmulatorResult $emulator): self + public function setEmulator(?EmulatorResult $emulator): self { $this->container['emulator'] = $emulator; @@ -629,7 +629,7 @@ public function getClonedApp(): ?ClonedAppResult * * @return $this */ - public function setClonedApp(ClonedAppResult $cloned_app): self + public function setClonedApp(?ClonedAppResult $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -651,7 +651,7 @@ public function getFactoryReset(): ?FactoryResetResult * * @return $this */ - public function setFactoryReset(FactoryResetResult $factory_reset): self + public function setFactoryReset(?FactoryResetResult $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -673,7 +673,7 @@ public function getJailbroken(): ?JailbrokenResult * * @return $this */ - public function setJailbroken(JailbrokenResult $jailbroken): self + public function setJailbroken(?JailbrokenResult $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -695,7 +695,7 @@ public function getFrida(): ?FridaResult * * @return $this */ - public function setFrida(FridaResult $frida): self + public function setFrida(?FridaResult $frida): self { $this->container['frida'] = $frida; @@ -717,7 +717,7 @@ public function getIpBlocklist(): ?IpBlockListResult * * @return $this */ - public function setIpBlocklist(IpBlockListResult $ip_blocklist): self + public function setIpBlocklist(?IpBlockListResult $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -739,7 +739,7 @@ public function getTor(): ?TorResult * * @return $this */ - public function setTor(TorResult $tor): self + public function setTor(?TorResult $tor): self { $this->container['tor'] = $tor; @@ -761,7 +761,7 @@ public function getPrivacySettings(): ?PrivacySettingsResult * * @return $this */ - public function setPrivacySettings(PrivacySettingsResult $privacy_settings): self + public function setPrivacySettings(?PrivacySettingsResult $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -783,7 +783,7 @@ public function getVirtualMachine(): ?VirtualMachineResult * * @return $this */ - public function setVirtualMachine(VirtualMachineResult $virtual_machine): self + public function setVirtualMachine(?VirtualMachineResult $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -805,7 +805,7 @@ public function getVpn(): ?VpnResult * * @return $this */ - public function setVpn(VpnResult $vpn): self + public function setVpn(?VpnResult $vpn): self { $this->container['vpn'] = $vpn; @@ -827,7 +827,7 @@ public function getProxy(): ?ProxyResult * * @return $this */ - public function setProxy(ProxyResult $proxy): self + public function setProxy(?ProxyResult $proxy): self { $this->container['proxy'] = $proxy; @@ -849,7 +849,7 @@ public function getTampering(): ?TamperingResult * * @return $this */ - public function setTampering(TamperingResult $tampering): self + public function setTampering(?TamperingResult $tampering): self { $this->container['tampering'] = $tampering; @@ -871,7 +871,7 @@ public function getRawDeviceAttributes(): ?RawDeviceAttributesResult * * @return $this */ - public function setRawDeviceAttributes(RawDeviceAttributesResult $raw_device_attributes): self + public function setRawDeviceAttributes(?RawDeviceAttributesResult $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -893,7 +893,7 @@ public function getHighActivity(): ?HighActivityResult * * @return $this */ - public function setHighActivity(HighActivityResult $high_activity): self + public function setHighActivity(?HighActivityResult $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -915,7 +915,7 @@ public function getLocationSpoofing(): ?LocationSpoofingResult * * @return $this */ - public function setLocationSpoofing(LocationSpoofingResult $location_spoofing): self + public function setLocationSpoofing(?LocationSpoofingResult $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -937,7 +937,7 @@ public function getSuspectScore(): ?SuspectScoreResult * * @return $this */ - public function setSuspectScore(SuspectScoreResult $suspect_score): self + public function setSuspectScore(?SuspectScoreResult $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -1025,7 +1025,7 @@ public function getIpLocation(): ?DeprecatedIPLocation * * @return $this */ - public function setIpLocation(DeprecatedIPLocation $ip_location): self + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -1137,7 +1137,7 @@ public function getLinkedId(): ?string * * @return $this */ - public function setLinkedId(string $linked_id): self + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -1159,7 +1159,7 @@ public function getConfidence(): ?Confidence * * @return $this */ - public function setConfidence(Confidence $confidence): self + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; diff --git a/template/model_generic.mustache b/template/model_generic.mustache index c4dc68cc..321cf0bb 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -260,7 +260,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa * * @return $this */ - public function {{setter}}({{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} ${{name}}): self + public function {{setter}}({{^required}}?{{/required}}{{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} ${{name}}): self { {{#isEnum}} $allowedValues = $this->{{getter}}AllowableValues(); From bdfb252eb7a2c72b875f74457a06f58e8cfe635e Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 15 Aug 2024 13:29:34 +0300 Subject: [PATCH 12/14] refactor: use required annotation for php doc --- template/model_generic.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 321cf0bb..0b480bf6 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -246,7 +246,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Gets {{name}} - * @return {{datatype}} + * @return {{^required}}?{{/required}}{{datatype}} */ public function {{getter}}(): {{^required}}?{{/required}}{{^isListContainer}}{{^isMapContainer}}{{^isDouble}}{{datatype}}{{/isDouble}}{{/isMapContainer}}{{/isListContainer}}{{#isListContainer}}array{{/isListContainer}}{{#isMapContainer}}array{{/isMapContainer}}{{#isDouble}}float{{/isDouble}} { @@ -256,7 +256,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Sets {{name}} * - * @param {{datatype}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}} + * @param {{^required}}?{{/required}}{{datatype}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}} * * @return $this */ From 123f0391f14eef98bfc9757025ca116d5aed3ade Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 20 Aug 2024 12:37:34 +0300 Subject: [PATCH 13/14] chore: add test cases for returning types of unsealed results --- src/Model/ASN.php | 4 +- src/Model/BotdDetectionResult.php | 4 +- src/Model/BotdResult.php | 4 +- src/Model/BrowserDetails.php | 4 +- src/Model/DataCenter.php | 4 +- src/Model/DeprecatedIPLocation.php | 36 +++++-- src/Model/DeprecatedIPLocationCity.php | 4 +- src/Model/ErrorEvent403Response.php | 4 +- src/Model/ErrorEvent404Response.php | 4 +- src/Model/EventResponse.php | 4 +- src/Model/HighActivityResult.php | 4 +- src/Model/IPLocation.php | 36 +++++-- src/Model/IPLocationCity.php | 4 +- src/Model/IpInfoResult.php | 8 +- src/Model/IpInfoResultV4.php | 8 +- src/Model/IpInfoResultV6.php | 8 +- src/Model/ProductsResponse.php | 84 ++++++++++++---- src/Model/ProductsResponseBotd.php | 8 +- src/Model/ProductsResponseIdentification.php | 8 +- .../ProductsResponseIdentificationData.php | 12 ++- src/Model/RawDeviceAttributesResult.php | 2 +- src/Model/Response.php | 8 +- src/Model/ResponseVisits.php | 12 ++- src/Model/SignalResponseClonedApp.php | 8 +- src/Model/SignalResponseEmulator.php | 8 +- src/Model/SignalResponseFactoryReset.php | 8 +- src/Model/SignalResponseFrida.php | 8 +- src/Model/SignalResponseHighActivity.php | 8 +- src/Model/SignalResponseIncognito.php | 8 +- src/Model/SignalResponseIpBlocklist.php | 8 +- src/Model/SignalResponseIpInfo.php | 8 +- src/Model/SignalResponseJailbroken.php | 8 +- src/Model/SignalResponseLocationSpoofing.php | 8 +- src/Model/SignalResponsePrivacySettings.php | 8 +- src/Model/SignalResponseProxy.php | 8 +- .../SignalResponseRawDeviceAttributes.php | 8 +- src/Model/SignalResponseRootApps.php | 8 +- src/Model/SignalResponseSuspectScore.php | 8 +- src/Model/SignalResponseTampering.php | 8 +- src/Model/SignalResponseTor.php | 8 +- src/Model/SignalResponseVirtualMachine.php | 8 +- src/Model/SignalResponseVpn.php | 8 +- src/Model/Subdivision.php | 8 +- src/Model/Visit.php | 12 ++- src/Model/VpnResult.php | 4 +- src/Model/WebhookVisit.php | 96 ++++++++++++++----- template/model_generic.mustache | 8 +- test/Sealed/SealedTest.php | 32 ++++++- 48 files changed, 440 insertions(+), 146 deletions(-) diff --git a/src/Model/ASN.php b/src/Model/ASN.php index 3cdd4601..6e544e45 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -256,6 +256,8 @@ public function setNetwork(string $network): self /** * Gets name. + * + * @return ?string */ public function getName(): ?string { @@ -265,7 +267,7 @@ public function getName(): ?string /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index 89ef69c4..27120931 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -260,6 +260,8 @@ public function setResult(string $result): self /** * Gets type. + * + * @return ?string */ public function getType(): ?string { @@ -269,7 +271,7 @@ public function getType(): ?string /** * Sets type. * - * @param string $type type + * @param ?string $type type * * @return $this */ diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index 871ca617..178a37d2 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -360,6 +360,8 @@ public function setRequestId(string $request_id): self /** * Gets linked_id. + * + * @return ?string */ public function getLinkedId(): ?string { @@ -369,7 +371,7 @@ public function getLinkedId(): ?string /** * Sets linked_id. * - * @param string $linked_id linked_id + * @param ?string $linked_id linked_id * * @return $this */ diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index ce20254f..d04d9bc8 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -411,6 +411,8 @@ public function setUserAgent(string $user_agent): self /** * Gets bot_probability. + * + * @return ?int */ public function getBotProbability(): ?int { @@ -420,7 +422,7 @@ public function getBotProbability(): ?int /** * Sets bot_probability. * - * @param int $bot_probability bot_probability + * @param ?int $bot_probability bot_probability * * @return $this */ diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index a817ca57..1b8c9294 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -225,6 +225,8 @@ public function setResult(bool $result): self /** * Gets name. + * + * @return ?string */ public function getName(): ?string { @@ -234,7 +236,7 @@ public function getName(): ?string /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index 78062c3e..9739584c 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -241,6 +241,8 @@ public function valid(): bool /** * Gets accuracy_radius. + * + * @return ?int */ public function getAccuracyRadius(): ?int { @@ -250,7 +252,7 @@ public function getAccuracyRadius(): ?int /** * Sets accuracy_radius. * - * @param int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location + * @param ?int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location * * @return $this */ @@ -263,6 +265,8 @@ public function setAccuracyRadius(?int $accuracy_radius): self /** * Gets latitude. + * + * @return ?double */ public function getLatitude(): ?float { @@ -272,7 +276,7 @@ public function getLatitude(): ?float /** * Sets latitude. * - * @param float $latitude latitude + * @param ?double $latitude latitude * * @return $this */ @@ -285,6 +289,8 @@ public function setLatitude(?float $latitude): self /** * Gets longitude. + * + * @return ?double */ public function getLongitude(): ?float { @@ -294,7 +300,7 @@ public function getLongitude(): ?float /** * Sets longitude. * - * @param float $longitude longitude + * @param ?double $longitude longitude * * @return $this */ @@ -307,6 +313,8 @@ public function setLongitude(?float $longitude): self /** * Gets postal_code. + * + * @return ?string */ public function getPostalCode(): ?string { @@ -316,7 +324,7 @@ public function getPostalCode(): ?string /** * Sets postal_code. * - * @param string $postal_code postal_code + * @param ?string $postal_code postal_code * * @return $this */ @@ -329,6 +337,8 @@ public function setPostalCode(?string $postal_code): self /** * Gets timezone. + * + * @return ?string */ public function getTimezone(): ?string { @@ -338,7 +348,7 @@ public function getTimezone(): ?string /** * Sets timezone. * - * @param string $timezone timezone + * @param ?string $timezone timezone * * @return $this */ @@ -351,6 +361,8 @@ public function setTimezone(?string $timezone): self /** * Gets city. + * + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity */ public function getCity(): ?DeprecatedIPLocationCity { @@ -360,7 +372,7 @@ public function getCity(): ?DeprecatedIPLocationCity /** * Sets city. * - * @param DeprecatedIPLocationCity $city city + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity $city city * * @return $this */ @@ -373,6 +385,8 @@ public function setCity(?DeprecatedIPLocationCity $city): self /** * Gets country. + * + * @return ?\Fingerprint\ServerAPI\Model\Location */ public function getCountry(): ?Location { @@ -382,7 +396,7 @@ public function getCountry(): ?Location /** * Sets country. * - * @param Location $country country + * @param ?\Fingerprint\ServerAPI\Model\Location $country country * * @return $this */ @@ -395,6 +409,8 @@ public function setCountry(?Location $country): self /** * Gets continent. + * + * @return ?\Fingerprint\ServerAPI\Model\Location */ public function getContinent(): ?Location { @@ -404,7 +420,7 @@ public function getContinent(): ?Location /** * Sets continent. * - * @param Location $continent continent + * @param ?\Fingerprint\ServerAPI\Model\Location $continent continent * * @return $this */ @@ -418,7 +434,7 @@ public function setContinent(?Location $continent): self /** * Gets subdivisions. * - * @return \Fingerprint\ServerAPI\Model\Subdivision[] + * @return ?\Fingerprint\ServerAPI\Model\Subdivision[] */ public function getSubdivisions(): ?array { @@ -428,7 +444,7 @@ public function getSubdivisions(): ?array /** * Sets subdivisions. * - * @param \Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions + * @param ?\Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * * @return $this */ diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index 8374fd5a..fdffb4e1 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -191,6 +191,8 @@ public function valid(): bool /** * Gets name. + * + * @return ?string */ public function getName(): ?string { @@ -200,7 +202,7 @@ public function getName(): ?string /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index f4922f99..b8093804 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -191,6 +191,8 @@ public function valid(): bool /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError */ public function getError(): ?ErrorEvent403ResponseError { @@ -200,7 +202,7 @@ public function getError(): ?ErrorEvent403ResponseError /** * Sets error. * - * @param ErrorEvent403ResponseError $error error + * @param ?\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError $error error * * @return $this */ diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index 247baa79..b03ce283 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -191,6 +191,8 @@ public function valid(): bool /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError */ public function getError(): ?ErrorEvent404ResponseError { @@ -200,7 +202,7 @@ public function getError(): ?ErrorEvent404ResponseError /** * Sets error. * - * @param ErrorEvent404ResponseError $error error + * @param ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError $error error * * @return $this */ diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index d167078e..ee5b3fbe 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -227,6 +227,8 @@ public function setProducts(ProductsResponse $products): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -236,7 +238,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index 9c0a4201..20879925 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -225,6 +225,8 @@ public function setResult(bool $result): self /** * Gets daily_requests. + * + * @return ?float */ public function getDailyRequests(): ?float { @@ -234,7 +236,7 @@ public function getDailyRequests(): ?float /** * Sets daily_requests. * - * @param float $daily_requests number of requests from the same visitor in the previous day + * @param ?float $daily_requests number of requests from the same visitor in the previous day * * @return $this */ diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 617effab..6f769e05 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -239,6 +239,8 @@ public function valid(): bool /** * Gets accuracy_radius. + * + * @return ?int */ public function getAccuracyRadius(): ?int { @@ -248,7 +250,7 @@ public function getAccuracyRadius(): ?int /** * Sets accuracy_radius. * - * @param int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location + * @param ?int $accuracy_radius the IP address is likely to be within this radius (in km) of the specified location * * @return $this */ @@ -261,6 +263,8 @@ public function setAccuracyRadius(?int $accuracy_radius): self /** * Gets latitude. + * + * @return ?double */ public function getLatitude(): ?float { @@ -270,7 +274,7 @@ public function getLatitude(): ?float /** * Sets latitude. * - * @param float $latitude latitude + * @param ?double $latitude latitude * * @return $this */ @@ -283,6 +287,8 @@ public function setLatitude(?float $latitude): self /** * Gets longitude. + * + * @return ?double */ public function getLongitude(): ?float { @@ -292,7 +298,7 @@ public function getLongitude(): ?float /** * Sets longitude. * - * @param float $longitude longitude + * @param ?double $longitude longitude * * @return $this */ @@ -305,6 +311,8 @@ public function setLongitude(?float $longitude): self /** * Gets postal_code. + * + * @return ?string */ public function getPostalCode(): ?string { @@ -314,7 +322,7 @@ public function getPostalCode(): ?string /** * Sets postal_code. * - * @param string $postal_code postal_code + * @param ?string $postal_code postal_code * * @return $this */ @@ -327,6 +335,8 @@ public function setPostalCode(?string $postal_code): self /** * Gets timezone. + * + * @return ?string */ public function getTimezone(): ?string { @@ -336,7 +346,7 @@ public function getTimezone(): ?string /** * Sets timezone. * - * @param string $timezone timezone + * @param ?string $timezone timezone * * @return $this */ @@ -349,6 +359,8 @@ public function setTimezone(?string $timezone): self /** * Gets city. + * + * @return ?\Fingerprint\ServerAPI\Model\IPLocationCity */ public function getCity(): ?IPLocationCity { @@ -358,7 +370,7 @@ public function getCity(): ?IPLocationCity /** * Sets city. * - * @param IPLocationCity $city city + * @param ?\Fingerprint\ServerAPI\Model\IPLocationCity $city city * * @return $this */ @@ -371,6 +383,8 @@ public function setCity(?IPLocationCity $city): self /** * Gets country. + * + * @return ?\Fingerprint\ServerAPI\Model\Location */ public function getCountry(): ?Location { @@ -380,7 +394,7 @@ public function getCountry(): ?Location /** * Sets country. * - * @param Location $country country + * @param ?\Fingerprint\ServerAPI\Model\Location $country country * * @return $this */ @@ -393,6 +407,8 @@ public function setCountry(?Location $country): self /** * Gets continent. + * + * @return ?\Fingerprint\ServerAPI\Model\Location */ public function getContinent(): ?Location { @@ -402,7 +418,7 @@ public function getContinent(): ?Location /** * Sets continent. * - * @param Location $continent continent + * @param ?\Fingerprint\ServerAPI\Model\Location $continent continent * * @return $this */ @@ -416,7 +432,7 @@ public function setContinent(?Location $continent): self /** * Gets subdivisions. * - * @return \Fingerprint\ServerAPI\Model\Subdivision[] + * @return ?\Fingerprint\ServerAPI\Model\Subdivision[] */ public function getSubdivisions(): ?array { @@ -426,7 +442,7 @@ public function getSubdivisions(): ?array /** * Sets subdivisions. * - * @param \Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions + * @param ?\Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * * @return $this */ diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index 10899728..c0637bf3 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -191,6 +191,8 @@ public function valid(): bool /** * Gets name. + * + * @return ?string */ public function getName(): ?string { @@ -200,7 +202,7 @@ public function getName(): ?string /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index 3eee0292..2a6a7d98 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -199,6 +199,8 @@ public function valid(): bool /** * Gets v4. + * + * @return ?\Fingerprint\ServerAPI\Model\IpInfoResultV4 */ public function getV4(): ?IpInfoResultV4 { @@ -208,7 +210,7 @@ public function getV4(): ?IpInfoResultV4 /** * Sets v4. * - * @param IpInfoResultV4 $v4 v4 + * @param ?\Fingerprint\ServerAPI\Model\IpInfoResultV4 $v4 v4 * * @return $this */ @@ -221,6 +223,8 @@ public function setV4(?IpInfoResultV4 $v4): self /** * Gets v6. + * + * @return ?\Fingerprint\ServerAPI\Model\IpInfoResultV6 */ public function getV6(): ?IpInfoResultV6 { @@ -230,7 +234,7 @@ public function getV6(): ?IpInfoResultV6 /** * Sets v6. * - * @param IpInfoResultV6 $v6 v6 + * @param ?\Fingerprint\ServerAPI\Model\IpInfoResultV6 $v6 v6 * * @return $this */ diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 4c32dff8..8a2f36d3 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -262,6 +262,8 @@ public function setGeolocation(IPLocation $geolocation): self /** * Gets asn. + * + * @return ?\Fingerprint\ServerAPI\Model\ASN */ public function getAsn(): ?ASN { @@ -271,7 +273,7 @@ public function getAsn(): ?ASN /** * Sets asn. * - * @param ASN $asn asn + * @param ?\Fingerprint\ServerAPI\Model\ASN $asn asn * * @return $this */ @@ -284,6 +286,8 @@ public function setAsn(?ASN $asn): self /** * Gets datacenter. + * + * @return ?\Fingerprint\ServerAPI\Model\DataCenter */ public function getDatacenter(): ?DataCenter { @@ -293,7 +297,7 @@ public function getDatacenter(): ?DataCenter /** * Sets datacenter. * - * @param DataCenter $datacenter datacenter + * @param ?\Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter * * @return $this */ diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index 808ec4be..0774ae9c 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -262,6 +262,8 @@ public function setGeolocation(IPLocation $geolocation): self /** * Gets asn. + * + * @return ?\Fingerprint\ServerAPI\Model\ASN */ public function getAsn(): ?ASN { @@ -271,7 +273,7 @@ public function getAsn(): ?ASN /** * Sets asn. * - * @param ASN $asn asn + * @param ?\Fingerprint\ServerAPI\Model\ASN $asn asn * * @return $this */ @@ -284,6 +286,8 @@ public function setAsn(?ASN $asn): self /** * Gets datacenter. + * + * @return ?\Fingerprint\ServerAPI\Model\DataCenter */ public function getDatacenter(): ?DataCenter { @@ -293,7 +297,7 @@ public function getDatacenter(): ?DataCenter /** * Sets datacenter. * - * @param DataCenter $datacenter datacenter + * @param ?\Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter * * @return $this */ diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index d2526c91..dffaf631 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -313,6 +313,8 @@ public function valid(): bool /** * Gets identification. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification */ public function getIdentification(): ?ProductsResponseIdentification { @@ -322,7 +324,7 @@ public function getIdentification(): ?ProductsResponseIdentification /** * Sets identification. * - * @param ProductsResponseIdentification $identification identification + * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification $identification identification * * @return $this */ @@ -335,6 +337,8 @@ public function setIdentification(?ProductsResponseIdentification $identificatio /** * Gets botd. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseBotd */ public function getBotd(): ?ProductsResponseBotd { @@ -344,7 +348,7 @@ public function getBotd(): ?ProductsResponseBotd /** * Sets botd. * - * @param ProductsResponseBotd $botd botd + * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseBotd $botd botd * * @return $this */ @@ -357,6 +361,8 @@ public function setBotd(?ProductsResponseBotd $botd): self /** * Gets ip_info. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo */ public function getIpInfo(): ?SignalResponseIpInfo { @@ -366,7 +372,7 @@ public function getIpInfo(): ?SignalResponseIpInfo /** * Sets ip_info. * - * @param SignalResponseIpInfo $ip_info ip_info + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo $ip_info ip_info * * @return $this */ @@ -379,6 +385,8 @@ public function setIpInfo(?SignalResponseIpInfo $ip_info): self /** * Gets incognito. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIncognito */ public function getIncognito(): ?SignalResponseIncognito { @@ -388,7 +396,7 @@ public function getIncognito(): ?SignalResponseIncognito /** * Sets incognito. * - * @param SignalResponseIncognito $incognito incognito + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIncognito $incognito incognito * * @return $this */ @@ -401,6 +409,8 @@ public function setIncognito(?SignalResponseIncognito $incognito): self /** * Gets root_apps. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRootApps */ public function getRootApps(): ?SignalResponseRootApps { @@ -410,7 +420,7 @@ public function getRootApps(): ?SignalResponseRootApps /** * Sets root_apps. * - * @param SignalResponseRootApps $root_apps root_apps + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseRootApps $root_apps root_apps * * @return $this */ @@ -423,6 +433,8 @@ public function setRootApps(?SignalResponseRootApps $root_apps): self /** * Gets emulator. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseEmulator */ public function getEmulator(): ?SignalResponseEmulator { @@ -432,7 +444,7 @@ public function getEmulator(): ?SignalResponseEmulator /** * Sets emulator. * - * @param SignalResponseEmulator $emulator emulator + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseEmulator $emulator emulator * * @return $this */ @@ -445,6 +457,8 @@ public function setEmulator(?SignalResponseEmulator $emulator): self /** * Gets cloned_app. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp */ public function getClonedApp(): ?SignalResponseClonedApp { @@ -454,7 +468,7 @@ public function getClonedApp(): ?SignalResponseClonedApp /** * Sets cloned_app. * - * @param SignalResponseClonedApp $cloned_app cloned_app + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp $cloned_app cloned_app * * @return $this */ @@ -467,6 +481,8 @@ public function setClonedApp(?SignalResponseClonedApp $cloned_app): self /** * Gets factory_reset. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset */ public function getFactoryReset(): ?SignalResponseFactoryReset { @@ -476,7 +492,7 @@ public function getFactoryReset(): ?SignalResponseFactoryReset /** * Sets factory_reset. * - * @param SignalResponseFactoryReset $factory_reset factory_reset + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset $factory_reset factory_reset * * @return $this */ @@ -489,6 +505,8 @@ public function setFactoryReset(?SignalResponseFactoryReset $factory_reset): sel /** * Gets jailbroken. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken */ public function getJailbroken(): ?SignalResponseJailbroken { @@ -498,7 +516,7 @@ public function getJailbroken(): ?SignalResponseJailbroken /** * Sets jailbroken. * - * @param SignalResponseJailbroken $jailbroken jailbroken + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken $jailbroken jailbroken * * @return $this */ @@ -511,6 +529,8 @@ public function setJailbroken(?SignalResponseJailbroken $jailbroken): self /** * Gets frida. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseFrida */ public function getFrida(): ?SignalResponseFrida { @@ -520,7 +540,7 @@ public function getFrida(): ?SignalResponseFrida /** * Sets frida. * - * @param SignalResponseFrida $frida frida + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseFrida $frida frida * * @return $this */ @@ -533,6 +553,8 @@ public function setFrida(?SignalResponseFrida $frida): self /** * Gets ip_blocklist. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist */ public function getIpBlocklist(): ?SignalResponseIpBlocklist { @@ -542,7 +564,7 @@ public function getIpBlocklist(): ?SignalResponseIpBlocklist /** * Sets ip_blocklist. * - * @param SignalResponseIpBlocklist $ip_blocklist ip_blocklist + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist $ip_blocklist ip_blocklist * * @return $this */ @@ -555,6 +577,8 @@ public function setIpBlocklist(?SignalResponseIpBlocklist $ip_blocklist): self /** * Gets tor. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseTor */ public function getTor(): ?SignalResponseTor { @@ -564,7 +588,7 @@ public function getTor(): ?SignalResponseTor /** * Sets tor. * - * @param SignalResponseTor $tor tor + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseTor $tor tor * * @return $this */ @@ -577,6 +601,8 @@ public function setTor(?SignalResponseTor $tor): self /** * Gets privacy_settings. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings */ public function getPrivacySettings(): ?SignalResponsePrivacySettings { @@ -586,7 +612,7 @@ public function getPrivacySettings(): ?SignalResponsePrivacySettings /** * Sets privacy_settings. * - * @param SignalResponsePrivacySettings $privacy_settings privacy_settings + * @param ?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings $privacy_settings privacy_settings * * @return $this */ @@ -599,6 +625,8 @@ public function setPrivacySettings(?SignalResponsePrivacySettings $privacy_setti /** * Gets virtual_machine. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine */ public function getVirtualMachine(): ?SignalResponseVirtualMachine { @@ -608,7 +636,7 @@ public function getVirtualMachine(): ?SignalResponseVirtualMachine /** * Sets virtual_machine. * - * @param SignalResponseVirtualMachine $virtual_machine virtual_machine + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine $virtual_machine virtual_machine * * @return $this */ @@ -621,6 +649,8 @@ public function setVirtualMachine(?SignalResponseVirtualMachine $virtual_machine /** * Gets vpn. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVpn */ public function getVpn(): ?SignalResponseVpn { @@ -630,7 +660,7 @@ public function getVpn(): ?SignalResponseVpn /** * Sets vpn. * - * @param SignalResponseVpn $vpn vpn + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVpn $vpn vpn * * @return $this */ @@ -643,6 +673,8 @@ public function setVpn(?SignalResponseVpn $vpn): self /** * Gets proxy. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseProxy */ public function getProxy(): ?SignalResponseProxy { @@ -652,7 +684,7 @@ public function getProxy(): ?SignalResponseProxy /** * Sets proxy. * - * @param SignalResponseProxy $proxy proxy + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseProxy $proxy proxy * * @return $this */ @@ -665,6 +697,8 @@ public function setProxy(?SignalResponseProxy $proxy): self /** * Gets tampering. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseTampering */ public function getTampering(): ?SignalResponseTampering { @@ -674,7 +708,7 @@ public function getTampering(): ?SignalResponseTampering /** * Sets tampering. * - * @param SignalResponseTampering $tampering tampering + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseTampering $tampering tampering * * @return $this */ @@ -687,6 +721,8 @@ public function setTampering(?SignalResponseTampering $tampering): self /** * Gets high_activity. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity */ public function getHighActivity(): ?SignalResponseHighActivity { @@ -696,7 +732,7 @@ public function getHighActivity(): ?SignalResponseHighActivity /** * Sets high_activity. * - * @param SignalResponseHighActivity $high_activity high_activity + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity $high_activity high_activity * * @return $this */ @@ -709,6 +745,8 @@ public function setHighActivity(?SignalResponseHighActivity $high_activity): sel /** * Gets location_spoofing. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing */ public function getLocationSpoofing(): ?SignalResponseLocationSpoofing { @@ -718,7 +756,7 @@ public function getLocationSpoofing(): ?SignalResponseLocationSpoofing /** * Sets location_spoofing. * - * @param SignalResponseLocationSpoofing $location_spoofing location_spoofing + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing $location_spoofing location_spoofing * * @return $this */ @@ -731,6 +769,8 @@ public function setLocationSpoofing(?SignalResponseLocationSpoofing $location_sp /** * Gets suspect_score. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore */ public function getSuspectScore(): ?SignalResponseSuspectScore { @@ -740,7 +780,7 @@ public function getSuspectScore(): ?SignalResponseSuspectScore /** * Sets suspect_score. * - * @param SignalResponseSuspectScore $suspect_score suspect_score + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore $suspect_score suspect_score * * @return $this */ @@ -753,6 +793,8 @@ public function setSuspectScore(?SignalResponseSuspectScore $suspect_score): sel /** * Gets raw_device_attributes. + * + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes */ public function getRawDeviceAttributes(): ?SignalResponseRawDeviceAttributes { @@ -762,7 +804,7 @@ public function getRawDeviceAttributes(): ?SignalResponseRawDeviceAttributes /** * Sets raw_device_attributes. * - * @param SignalResponseRawDeviceAttributes $raw_device_attributes raw_device_attributes + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes $raw_device_attributes raw_device_attributes * * @return $this */ diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 05b6ab5a..7d8255c1 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\BotdResult */ public function getData(): ?BotdResult { @@ -206,7 +208,7 @@ public function getData(): ?BotdResult /** * Sets data. * - * @param BotdResult $data data + * @param ?\Fingerprint\ServerAPI\Model\BotdResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?BotdResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index d9d0022a..dfec88dc 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData */ public function getData(): ?ProductsResponseIdentificationData { @@ -206,7 +208,7 @@ public function getData(): ?ProductsResponseIdentificationData /** * Sets data. * - * @param ProductsResponseIdentificationData $data data + * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?ProductsResponseIdentificationData $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ public function getError(): ?IdentificationError { @@ -228,7 +232,7 @@ public function getError(): ?IdentificationError /** * Sets error. * - * @param IdentificationError $error error + * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 5e6294d2..1bf397fc 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -402,6 +402,8 @@ public function setIp(string $ip): self /** * Gets ip_location. + * + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ public function getIpLocation(): ?DeprecatedIPLocation { @@ -411,7 +413,7 @@ public function getIpLocation(): ?DeprecatedIPLocation /** * Sets ip_location. * - * @param DeprecatedIPLocation $ip_location ip_location + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -514,6 +516,8 @@ public function setTag(array $tag): self /** * Gets linked_id. + * + * @return ?string */ public function getLinkedId(): ?string { @@ -523,7 +527,7 @@ public function getLinkedId(): ?string /** * Sets linked_id. * - * @param string $linked_id a customer-provided id that was sent with identification request + * @param ?string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -536,6 +540,8 @@ public function setLinkedId(?string $linked_id): self /** * Gets confidence. + * + * @return ?\Fingerprint\ServerAPI\Model\Confidence */ public function getConfidence(): ?Confidence { @@ -545,7 +551,7 @@ public function getConfidence(): ?Confidence /** * Sets confidence. * - * @param Confidence $confidence confidence + * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 233734d2..1e560cb3 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -174,7 +174,7 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return parent::listInvalidProperties(); + return []; } /** diff --git a/src/Model/Response.php b/src/Model/Response.php index b8e54550..2aa4f347 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -266,6 +266,8 @@ public function setVisits(array $visits): self /** * Gets last_timestamp. + * + * @return ?int */ public function getLastTimestamp(): ?int { @@ -275,7 +277,7 @@ public function getLastTimestamp(): ?int /** * Sets last_timestamp. * - * @param int $last_timestamp ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. + * @param ?int $last_timestamp ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. * * @return $this */ @@ -288,6 +290,8 @@ public function setLastTimestamp(?int $last_timestamp): self /** * Gets pagination_key. + * + * @return ?string */ public function getPaginationKey(): ?string { @@ -297,7 +301,7 @@ public function getPaginationKey(): ?string /** * Sets pagination_key. * - * @param string $pagination_key Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. + * @param ?string $pagination_key Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. * * @return $this */ diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 383134e5..e3b67f55 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -393,6 +393,8 @@ public function setIp(string $ip): self /** * Gets ip_location. + * + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ public function getIpLocation(): ?DeprecatedIPLocation { @@ -402,7 +404,7 @@ public function getIpLocation(): ?DeprecatedIPLocation /** * Sets ip_location. * - * @param DeprecatedIPLocation $ip_location ip_location + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -505,6 +507,8 @@ public function setTag(array $tag): self /** * Gets linked_id. + * + * @return ?string */ public function getLinkedId(): ?string { @@ -514,7 +518,7 @@ public function getLinkedId(): ?string /** * Sets linked_id. * - * @param string $linked_id a customer-provided id that was sent with identification request + * @param ?string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -527,6 +531,8 @@ public function setLinkedId(?string $linked_id): self /** * Gets confidence. + * + * @return ?\Fingerprint\ServerAPI\Model\Confidence */ public function getConfidence(): ?Confidence { @@ -536,7 +542,7 @@ public function getConfidence(): ?Confidence /** * Sets confidence. * - * @param Confidence $confidence confidence + * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 94b5e5c5..0edbcaf2 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\ClonedAppResult */ public function getData(): ?ClonedAppResult { @@ -206,7 +208,7 @@ public function getData(): ?ClonedAppResult /** * Sets data. * - * @param ClonedAppResult $data data + * @param ?\Fingerprint\ServerAPI\Model\ClonedAppResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?ClonedAppResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 7d276ca0..15d6b196 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\EmulatorResult */ public function getData(): ?EmulatorResult { @@ -206,7 +208,7 @@ public function getData(): ?EmulatorResult /** * Sets data. * - * @param EmulatorResult $data data + * @param ?\Fingerprint\ServerAPI\Model\EmulatorResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?EmulatorResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index 4604cc6a..95f0737a 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\FactoryResetResult */ public function getData(): ?FactoryResetResult { @@ -206,7 +208,7 @@ public function getData(): ?FactoryResetResult /** * Sets data. * - * @param FactoryResetResult $data data + * @param ?\Fingerprint\ServerAPI\Model\FactoryResetResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?FactoryResetResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index 1ffb8297..86aba169 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\FridaResult */ public function getData(): ?FridaResult { @@ -206,7 +208,7 @@ public function getData(): ?FridaResult /** * Sets data. * - * @param FridaResult $data data + * @param ?\Fingerprint\ServerAPI\Model\FridaResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?FridaResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 6bccfd1a..9a1e755a 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\HighActivityResult */ public function getData(): ?HighActivityResult { @@ -206,7 +208,7 @@ public function getData(): ?HighActivityResult /** * Sets data. * - * @param HighActivityResult $data data + * @param ?\Fingerprint\ServerAPI\Model\HighActivityResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?HighActivityResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index cf0e38dc..561c0eba 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\IncognitoResult */ public function getData(): ?IncognitoResult { @@ -206,7 +208,7 @@ public function getData(): ?IncognitoResult /** * Sets data. * - * @param IncognitoResult $data data + * @param ?\Fingerprint\ServerAPI\Model\IncognitoResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?IncognitoResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index 34e14b10..00a37d29 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\IpBlockListResult */ public function getData(): ?IpBlockListResult { @@ -206,7 +208,7 @@ public function getData(): ?IpBlockListResult /** * Sets data. * - * @param IpBlockListResult $data data + * @param ?\Fingerprint\ServerAPI\Model\IpBlockListResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?IpBlockListResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index 29ccda62..48e5fa40 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\IpInfoResult */ public function getData(): ?IpInfoResult { @@ -206,7 +208,7 @@ public function getData(): ?IpInfoResult /** * Sets data. * - * @param IpInfoResult $data data + * @param ?\Fingerprint\ServerAPI\Model\IpInfoResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?IpInfoResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index 80f630af..5d33f2fe 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\JailbrokenResult */ public function getData(): ?JailbrokenResult { @@ -206,7 +208,7 @@ public function getData(): ?JailbrokenResult /** * Sets data. * - * @param JailbrokenResult $data data + * @param ?\Fingerprint\ServerAPI\Model\JailbrokenResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?JailbrokenResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index ed6dfee7..aef5b071 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult */ public function getData(): ?LocationSpoofingResult { @@ -206,7 +208,7 @@ public function getData(): ?LocationSpoofingResult /** * Sets data. * - * @param LocationSpoofingResult $data data + * @param ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?LocationSpoofingResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index a5b03b89..a97c78aa 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult */ public function getData(): ?PrivacySettingsResult { @@ -206,7 +208,7 @@ public function getData(): ?PrivacySettingsResult /** * Sets data. * - * @param PrivacySettingsResult $data data + * @param ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?PrivacySettingsResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index a58f07e0..0f354989 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\ProxyResult */ public function getData(): ?ProxyResult { @@ -206,7 +208,7 @@ public function getData(): ?ProxyResult /** * Sets data. * - * @param ProxyResult $data data + * @param ?\Fingerprint\ServerAPI\Model\ProxyResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?ProxyResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 820bdac3..b079b123 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult */ public function getData(): array { @@ -206,7 +208,7 @@ public function getData(): array /** * Sets data. * - * @param RawDeviceAttributesResult $data data + * @param ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?array $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index 0a01e9f3..d5ed6c79 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\RootAppsResult */ public function getData(): ?RootAppsResult { @@ -206,7 +208,7 @@ public function getData(): ?RootAppsResult /** * Sets data. * - * @param RootAppsResult $data data + * @param ?\Fingerprint\ServerAPI\Model\RootAppsResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?RootAppsResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index e20baa97..3614acf0 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\SuspectScoreResult */ public function getData(): ?SuspectScoreResult { @@ -206,7 +208,7 @@ public function getData(): ?SuspectScoreResult /** * Sets data. * - * @param SuspectScoreResult $data data + * @param ?\Fingerprint\ServerAPI\Model\SuspectScoreResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?SuspectScoreResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 2753a81e..4efe22d6 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\TamperingResult */ public function getData(): ?TamperingResult { @@ -206,7 +208,7 @@ public function getData(): ?TamperingResult /** * Sets data. * - * @param TamperingResult $data data + * @param ?\Fingerprint\ServerAPI\Model\TamperingResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?TamperingResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 619c632b..06ac9768 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\TorResult */ public function getData(): ?TorResult { @@ -206,7 +208,7 @@ public function getData(): ?TorResult /** * Sets data. * - * @param TorResult $data data + * @param ?\Fingerprint\ServerAPI\Model\TorResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?TorResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index f22f1aba..906eedd2 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\VirtualMachineResult */ public function getData(): ?VirtualMachineResult { @@ -206,7 +208,7 @@ public function getData(): ?VirtualMachineResult /** * Sets data. * - * @param VirtualMachineResult $data data + * @param ?\Fingerprint\ServerAPI\Model\VirtualMachineResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?VirtualMachineResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 2f1a193f..b96d13c5 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets data. + * + * @return ?\Fingerprint\ServerAPI\Model\VpnResult */ public function getData(): ?VpnResult { @@ -206,7 +208,7 @@ public function getData(): ?VpnResult /** * Sets data. * - * @param VpnResult $data data + * @param ?\Fingerprint\ServerAPI\Model\VpnResult $data data * * @return $this */ @@ -219,6 +221,8 @@ public function setData(?VpnResult $data): self /** * Gets error. + * + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ public function getError(): ?ProductError { @@ -228,7 +232,7 @@ public function getError(): ?ProductError /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index fb950e9c..0c2835d8 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -197,6 +197,8 @@ public function valid(): bool /** * Gets iso_code. + * + * @return ?string */ public function getIsoCode(): ?string { @@ -206,7 +208,7 @@ public function getIsoCode(): ?string /** * Sets iso_code. * - * @param string $iso_code iso_code + * @param ?string $iso_code iso_code * * @return $this */ @@ -219,6 +221,8 @@ public function setIsoCode(?string $iso_code): self /** * Gets name. + * + * @return ?string */ public function getName(): ?string { @@ -228,7 +232,7 @@ public function getName(): ?string /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ diff --git a/src/Model/Visit.php b/src/Model/Visit.php index f6724fdc..dc2e5461 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -393,6 +393,8 @@ public function setIp(string $ip): self /** * Gets ip_location. + * + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ public function getIpLocation(): ?DeprecatedIPLocation { @@ -402,7 +404,7 @@ public function getIpLocation(): ?DeprecatedIPLocation /** * Sets ip_location. * - * @param DeprecatedIPLocation $ip_location ip_location + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -505,6 +507,8 @@ public function setTag(array $tag): self /** * Gets linked_id. + * + * @return ?string */ public function getLinkedId(): ?string { @@ -514,7 +518,7 @@ public function getLinkedId(): ?string /** * Sets linked_id. * - * @param string $linked_id a customer-provided id that was sent with identification request + * @param ?string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -527,6 +531,8 @@ public function setLinkedId(?string $linked_id): self /** * Gets confidence. + * + * @return ?\Fingerprint\ServerAPI\Model\Confidence */ public function getConfidence(): ?Confidence { @@ -536,7 +542,7 @@ public function getConfidence(): ?Confidence /** * Sets confidence. * - * @param Confidence $confidence confidence + * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index 117dba4b..2b5651e8 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -265,6 +265,8 @@ public function setOriginTimezone(string $origin_timezone): self /** * Gets origin_country. + * + * @return ?string */ public function getOriginCountry(): ?string { @@ -274,7 +276,7 @@ public function getOriginCountry(): ?string /** * Sets origin_country. * - * @param string $origin_country Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). + * @param ?string $origin_country Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). * * @return $this */ diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index 6009a49b..a71cabf8 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -462,6 +462,8 @@ public function setVisitorId(string $visitor_id): self /** * Gets client_referrer. + * + * @return ?string */ public function getClientReferrer(): ?string { @@ -471,7 +473,7 @@ public function getClientReferrer(): ?string /** * Sets client_referrer. * - * @param string $client_referrer client_referrer + * @param ?string $client_referrer client_referrer * * @return $this */ @@ -484,6 +486,8 @@ public function setClientReferrer(?string $client_referrer): self /** * Gets user_agent. + * + * @return ?string */ public function getUserAgent(): ?string { @@ -493,7 +497,7 @@ public function getUserAgent(): ?string /** * Sets user_agent. * - * @param string $user_agent user_agent + * @param ?string $user_agent user_agent * * @return $this */ @@ -506,6 +510,8 @@ public function setUserAgent(?string $user_agent): self /** * Gets bot. + * + * @return ?\Fingerprint\ServerAPI\Model\BotdDetectionResult */ public function getBot(): ?BotdDetectionResult { @@ -515,7 +521,7 @@ public function getBot(): ?BotdDetectionResult /** * Sets bot. * - * @param BotdDetectionResult $bot bot + * @param ?\Fingerprint\ServerAPI\Model\BotdDetectionResult $bot bot * * @return $this */ @@ -528,6 +534,8 @@ public function setBot(?BotdDetectionResult $bot): self /** * Gets ip_info. + * + * @return ?\Fingerprint\ServerAPI\Model\IpInfoResult */ public function getIpInfo(): ?IpInfoResult { @@ -537,7 +545,7 @@ public function getIpInfo(): ?IpInfoResult /** * Sets ip_info. * - * @param IpInfoResult $ip_info ip_info + * @param ?\Fingerprint\ServerAPI\Model\IpInfoResult $ip_info ip_info * * @return $this */ @@ -572,6 +580,8 @@ public function setIncognito(bool $incognito): self /** * Gets root_apps. + * + * @return ?\Fingerprint\ServerAPI\Model\RootAppsResult */ public function getRootApps(): ?RootAppsResult { @@ -581,7 +591,7 @@ public function getRootApps(): ?RootAppsResult /** * Sets root_apps. * - * @param RootAppsResult $root_apps root_apps + * @param ?\Fingerprint\ServerAPI\Model\RootAppsResult $root_apps root_apps * * @return $this */ @@ -594,6 +604,8 @@ public function setRootApps(?RootAppsResult $root_apps): self /** * Gets emulator. + * + * @return ?\Fingerprint\ServerAPI\Model\EmulatorResult */ public function getEmulator(): ?EmulatorResult { @@ -603,7 +615,7 @@ public function getEmulator(): ?EmulatorResult /** * Sets emulator. * - * @param EmulatorResult $emulator emulator + * @param ?\Fingerprint\ServerAPI\Model\EmulatorResult $emulator emulator * * @return $this */ @@ -616,6 +628,8 @@ public function setEmulator(?EmulatorResult $emulator): self /** * Gets cloned_app. + * + * @return ?\Fingerprint\ServerAPI\Model\ClonedAppResult */ public function getClonedApp(): ?ClonedAppResult { @@ -625,7 +639,7 @@ public function getClonedApp(): ?ClonedAppResult /** * Sets cloned_app. * - * @param ClonedAppResult $cloned_app cloned_app + * @param ?\Fingerprint\ServerAPI\Model\ClonedAppResult $cloned_app cloned_app * * @return $this */ @@ -638,6 +652,8 @@ public function setClonedApp(?ClonedAppResult $cloned_app): self /** * Gets factory_reset. + * + * @return ?\Fingerprint\ServerAPI\Model\FactoryResetResult */ public function getFactoryReset(): ?FactoryResetResult { @@ -647,7 +663,7 @@ public function getFactoryReset(): ?FactoryResetResult /** * Sets factory_reset. * - * @param FactoryResetResult $factory_reset factory_reset + * @param ?\Fingerprint\ServerAPI\Model\FactoryResetResult $factory_reset factory_reset * * @return $this */ @@ -660,6 +676,8 @@ public function setFactoryReset(?FactoryResetResult $factory_reset): self /** * Gets jailbroken. + * + * @return ?\Fingerprint\ServerAPI\Model\JailbrokenResult */ public function getJailbroken(): ?JailbrokenResult { @@ -669,7 +687,7 @@ public function getJailbroken(): ?JailbrokenResult /** * Sets jailbroken. * - * @param JailbrokenResult $jailbroken jailbroken + * @param ?\Fingerprint\ServerAPI\Model\JailbrokenResult $jailbroken jailbroken * * @return $this */ @@ -682,6 +700,8 @@ public function setJailbroken(?JailbrokenResult $jailbroken): self /** * Gets frida. + * + * @return ?\Fingerprint\ServerAPI\Model\FridaResult */ public function getFrida(): ?FridaResult { @@ -691,7 +711,7 @@ public function getFrida(): ?FridaResult /** * Sets frida. * - * @param FridaResult $frida frida + * @param ?\Fingerprint\ServerAPI\Model\FridaResult $frida frida * * @return $this */ @@ -704,6 +724,8 @@ public function setFrida(?FridaResult $frida): self /** * Gets ip_blocklist. + * + * @return ?\Fingerprint\ServerAPI\Model\IpBlockListResult */ public function getIpBlocklist(): ?IpBlockListResult { @@ -713,7 +735,7 @@ public function getIpBlocklist(): ?IpBlockListResult /** * Sets ip_blocklist. * - * @param IpBlockListResult $ip_blocklist ip_blocklist + * @param ?\Fingerprint\ServerAPI\Model\IpBlockListResult $ip_blocklist ip_blocklist * * @return $this */ @@ -726,6 +748,8 @@ public function setIpBlocklist(?IpBlockListResult $ip_blocklist): self /** * Gets tor. + * + * @return ?\Fingerprint\ServerAPI\Model\TorResult */ public function getTor(): ?TorResult { @@ -735,7 +759,7 @@ public function getTor(): ?TorResult /** * Sets tor. * - * @param TorResult $tor tor + * @param ?\Fingerprint\ServerAPI\Model\TorResult $tor tor * * @return $this */ @@ -748,6 +772,8 @@ public function setTor(?TorResult $tor): self /** * Gets privacy_settings. + * + * @return ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult */ public function getPrivacySettings(): ?PrivacySettingsResult { @@ -757,7 +783,7 @@ public function getPrivacySettings(): ?PrivacySettingsResult /** * Sets privacy_settings. * - * @param PrivacySettingsResult $privacy_settings privacy_settings + * @param ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $privacy_settings privacy_settings * * @return $this */ @@ -770,6 +796,8 @@ public function setPrivacySettings(?PrivacySettingsResult $privacy_settings): se /** * Gets virtual_machine. + * + * @return ?\Fingerprint\ServerAPI\Model\VirtualMachineResult */ public function getVirtualMachine(): ?VirtualMachineResult { @@ -779,7 +807,7 @@ public function getVirtualMachine(): ?VirtualMachineResult /** * Sets virtual_machine. * - * @param VirtualMachineResult $virtual_machine virtual_machine + * @param ?\Fingerprint\ServerAPI\Model\VirtualMachineResult $virtual_machine virtual_machine * * @return $this */ @@ -792,6 +820,8 @@ public function setVirtualMachine(?VirtualMachineResult $virtual_machine): self /** * Gets vpn. + * + * @return ?\Fingerprint\ServerAPI\Model\VpnResult */ public function getVpn(): ?VpnResult { @@ -801,7 +831,7 @@ public function getVpn(): ?VpnResult /** * Sets vpn. * - * @param VpnResult $vpn vpn + * @param ?\Fingerprint\ServerAPI\Model\VpnResult $vpn vpn * * @return $this */ @@ -814,6 +844,8 @@ public function setVpn(?VpnResult $vpn): self /** * Gets proxy. + * + * @return ?\Fingerprint\ServerAPI\Model\ProxyResult */ public function getProxy(): ?ProxyResult { @@ -823,7 +855,7 @@ public function getProxy(): ?ProxyResult /** * Sets proxy. * - * @param ProxyResult $proxy proxy + * @param ?\Fingerprint\ServerAPI\Model\ProxyResult $proxy proxy * * @return $this */ @@ -836,6 +868,8 @@ public function setProxy(?ProxyResult $proxy): self /** * Gets tampering. + * + * @return ?\Fingerprint\ServerAPI\Model\TamperingResult */ public function getTampering(): ?TamperingResult { @@ -845,7 +879,7 @@ public function getTampering(): ?TamperingResult /** * Sets tampering. * - * @param TamperingResult $tampering tampering + * @param ?\Fingerprint\ServerAPI\Model\TamperingResult $tampering tampering * * @return $this */ @@ -858,6 +892,8 @@ public function setTampering(?TamperingResult $tampering): self /** * Gets raw_device_attributes. + * + * @return ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult */ public function getRawDeviceAttributes(): ?RawDeviceAttributesResult { @@ -867,7 +903,7 @@ public function getRawDeviceAttributes(): ?RawDeviceAttributesResult /** * Sets raw_device_attributes. * - * @param RawDeviceAttributesResult $raw_device_attributes raw_device_attributes + * @param ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $raw_device_attributes raw_device_attributes * * @return $this */ @@ -880,6 +916,8 @@ public function setRawDeviceAttributes(?RawDeviceAttributesResult $raw_device_at /** * Gets high_activity. + * + * @return ?\Fingerprint\ServerAPI\Model\HighActivityResult */ public function getHighActivity(): ?HighActivityResult { @@ -889,7 +927,7 @@ public function getHighActivity(): ?HighActivityResult /** * Sets high_activity. * - * @param HighActivityResult $high_activity high_activity + * @param ?\Fingerprint\ServerAPI\Model\HighActivityResult $high_activity high_activity * * @return $this */ @@ -902,6 +940,8 @@ public function setHighActivity(?HighActivityResult $high_activity): self /** * Gets location_spoofing. + * + * @return ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult */ public function getLocationSpoofing(): ?LocationSpoofingResult { @@ -911,7 +951,7 @@ public function getLocationSpoofing(): ?LocationSpoofingResult /** * Sets location_spoofing. * - * @param LocationSpoofingResult $location_spoofing location_spoofing + * @param ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $location_spoofing location_spoofing * * @return $this */ @@ -924,6 +964,8 @@ public function setLocationSpoofing(?LocationSpoofingResult $location_spoofing): /** * Gets suspect_score. + * + * @return ?\Fingerprint\ServerAPI\Model\SuspectScoreResult */ public function getSuspectScore(): ?SuspectScoreResult { @@ -933,7 +975,7 @@ public function getSuspectScore(): ?SuspectScoreResult /** * Sets suspect_score. * - * @param SuspectScoreResult $suspect_score suspect_score + * @param ?\Fingerprint\ServerAPI\Model\SuspectScoreResult $suspect_score suspect_score * * @return $this */ @@ -1012,6 +1054,8 @@ public function setIp(string $ip): self /** * Gets ip_location. + * + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ public function getIpLocation(): ?DeprecatedIPLocation { @@ -1021,7 +1065,7 @@ public function getIpLocation(): ?DeprecatedIPLocation /** * Sets ip_location. * - * @param DeprecatedIPLocation $ip_location ip_location + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -1124,6 +1168,8 @@ public function setTag(array $tag): self /** * Gets linked_id. + * + * @return ?string */ public function getLinkedId(): ?string { @@ -1133,7 +1179,7 @@ public function getLinkedId(): ?string /** * Sets linked_id. * - * @param string $linked_id a customer-provided id that was sent with identification request + * @param ?string $linked_id a customer-provided id that was sent with identification request * * @return $this */ @@ -1146,6 +1192,8 @@ public function setLinkedId(?string $linked_id): self /** * Gets confidence. + * + * @return ?\Fingerprint\ServerAPI\Model\Confidence */ public function getConfidence(): ?Confidence { @@ -1155,7 +1203,7 @@ public function getConfidence(): ?Confidence /** * Sets confidence. * - * @param Confidence $confidence confidence + * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 0b480bf6..a0786595 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -158,12 +158,12 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa */ public function listInvalidProperties(): array { - {{#parent}} + {{#parentSchema}} $invalidProperties = parent::listInvalidProperties(); - {{/parent}} - {{^parent}} + {{/parentSchema}} + {{^parentSchema}} $invalidProperties = []; - {{/parent}} + {{/parentSchema}} {{#vars}} {{#required}} diff --git a/test/Sealed/SealedTest.php b/test/Sealed/SealedTest.php index a110d84d..6c9dedb7 100644 --- a/test/Sealed/SealedTest.php +++ b/test/Sealed/SealedTest.php @@ -2,6 +2,11 @@ namespace Fingerprint\ServerAPI\Sealed; +use DateTime; +use Fingerprint\ServerAPI\Model\BotdDetectionResult; +use Fingerprint\ServerAPI\Model\BrowserDetails; +use Fingerprint\ServerAPI\Model\Confidence; +use Fingerprint\ServerAPI\Model\DeprecatedIPLocation; use Fingerprint\ServerAPI\Model\EventResponse; use Fingerprint\ServerAPI\ObjectSerializer; use GuzzleHttp\Psr7\Response; @@ -9,6 +14,9 @@ class SealedTest extends TestCase { + public const VALID_KEY = "p2PA7MGy5tx56cnyJaFZMr96BCFwZeHjZV2EqMvTq53="; + public const INVALID_KEY = "p2PA7MGy5tx56cnyJaFZMr96BCFwZeHjZV2EqMvTq54="; + public const SEALED_RESULT = "noXc7SXO+mqeAGrvBMgObi/S0fXTpP3zupk8qFqsO/1zdtWCD169iLA3VkkZh9ICHpZ0oWRzqG0M9/TnCeKFohgBLqDp6O0zEfXOv6i5q++aucItznQdLwrKLP+O0blfb4dWVI8/aSbd4ELAZuJJxj9bCoVZ1vk+ShbUXCRZTD30OIEAr3eiG9aw00y1UZIqMgX6CkFlU9L9OnKLsNsyomPIaRHTmgVTI5kNhrnVNyNsnzt9rY7fUD52DQxJILVPrUJ1Q+qW7VyNslzGYBPG0DyYlKbRAomKJDQIkdj/Uwa6bhSTq4XYNVvbk5AJ/dGwvsVdOnkMT2Ipd67KwbKfw5bqQj/cw6bj8Cp2FD4Dy4Ud4daBpPRsCyxBM2jOjVz1B/lAyrOp8BweXOXYugwdPyEn38MBZ5oL4D38jIwR/QiVnMHpERh93jtgwh9Abza6i4/zZaDAbPhtZLXSM5ztdctv8bAb63CppLU541Kf4OaLO3QLvfLRXK2n8bwEwzVAqQ22dyzt6/vPiRbZ5akh8JB6QFXG0QJF9DejsIspKF3JvOKjG2edmC9o+GfL3hwDBiihYXCGY9lElZICAdt+7rZm5UxMx7STrVKy81xcvfaIp1BwGh/HyMsJnkE8IczzRFpLlHGYuNDxdLoBjiifrmHvOCUDcV8UvhSV+UAZtAVejdNGo5G/bz0NF21HUO4pVRPu6RqZIs/aX4hlm6iO/0Ru00ct8pfadUIgRcephTuFC2fHyZxNBC6NApRtLSNLfzYTTo/uSjgcu6rLWiNo5G7yfrM45RXjalFEFzk75Z/fu9lCJJa5uLFgDNKlU+IaFjArfXJCll3apbZp4/LNKiU35ZlB7ZmjDTrji1wLep8iRVVEGht/DW00MTok7Zn7Fv+MlxgWmbZB3BuezwTmXb/fNw=="; /** * @var string */ @@ -26,8 +34,8 @@ class SealedTest extends TestCase protected function setUp(): void { - $this->validKey = base64_decode("p2PA7MGy5tx56cnyJaFZMr96BCFwZeHjZV2EqMvTq53="); - $this->invalidKey = base64_decode("p2PA7MGy5tx56cnyJaFZMr96BCFwZeHjZV2EqMvTq54="); + $this->validKey = base64_decode(self::VALID_KEY); + $this->invalidKey = base64_decode(self::INVALID_KEY); $this->keys = [ new DecryptionKey($this->invalidKey, DecryptionAlgorithm::AES_256_GCM), @@ -37,7 +45,7 @@ protected function setUp(): void public function testUnsealEventResponse() { - $sealedResult = base64_decode("noXc7SXO+mqeAGrvBMgObi/S0fXTpP3zupk8qFqsO/1zdtWCD169iLA3VkkZh9ICHpZ0oWRzqG0M9/TnCeKFohgBLqDp6O0zEfXOv6i5q++aucItznQdLwrKLP+O0blfb4dWVI8/aSbd4ELAZuJJxj9bCoVZ1vk+ShbUXCRZTD30OIEAr3eiG9aw00y1UZIqMgX6CkFlU9L9OnKLsNsyomPIaRHTmgVTI5kNhrnVNyNsnzt9rY7fUD52DQxJILVPrUJ1Q+qW7VyNslzGYBPG0DyYlKbRAomKJDQIkdj/Uwa6bhSTq4XYNVvbk5AJ/dGwvsVdOnkMT2Ipd67KwbKfw5bqQj/cw6bj8Cp2FD4Dy4Ud4daBpPRsCyxBM2jOjVz1B/lAyrOp8BweXOXYugwdPyEn38MBZ5oL4D38jIwR/QiVnMHpERh93jtgwh9Abza6i4/zZaDAbPhtZLXSM5ztdctv8bAb63CppLU541Kf4OaLO3QLvfLRXK2n8bwEwzVAqQ22dyzt6/vPiRbZ5akh8JB6QFXG0QJF9DejsIspKF3JvOKjG2edmC9o+GfL3hwDBiihYXCGY9lElZICAdt+7rZm5UxMx7STrVKy81xcvfaIp1BwGh/HyMsJnkE8IczzRFpLlHGYuNDxdLoBjiifrmHvOCUDcV8UvhSV+UAZtAVejdNGo5G/bz0NF21HUO4pVRPu6RqZIs/aX4hlm6iO/0Ru00ct8pfadUIgRcephTuFC2fHyZxNBC6NApRtLSNLfzYTTo/uSjgcu6rLWiNo5G7yfrM45RXjalFEFzk75Z/fu9lCJJa5uLFgDNKlU+IaFjArfXJCll3apbZp4/LNKiU35ZlB7ZmjDTrji1wLep8iRVVEGht/DW00MTok7Zn7Fv+MlxgWmbZB3BuezwTmXb/fNw=="); + $sealedResult = base64_decode(self::SEALED_RESULT); $response = new Response(200, [], "{\"products\":{\"identification\":{\"data\":{\"visitorId\":\"2ZEDCZEfOfXjEmMuE3tq\",\"requestId\":\"1703067132750.Z5hutJ\",\"browserDetails\":{\"browserName\":\"Safari\",\"browserMajorVersion\":\"17\",\"browserFullVersion\":\"17.3\",\"os\":\"Mac OS X\",\"osVersion\":\"10.15.7\",\"device\":\"Other\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15\"},\"incognito\":false,\"ip\":\"::1\",\"ipLocation\":{\"accuracyRadius\":1000,\"latitude\":59.3241,\"longitude\":18.0517,\"postalCode\":\"100 05\",\"timezone\":\"Europe/Stockholm\",\"city\":{\"name\":\"Stockholm\"},\"country\":{\"code\":\"SE\",\"name\":\"Sweden\"},\"continent\":{\"code\":\"EU\",\"name\":\"Europe\"},\"subdivisions\":[{\"isoCode\":\"AB\",\"name\":\"Stockholm County\"}]},\"timestamp\":1703067136286,\"time\":\"2023-12-20T10:12:16Z\",\"url\":\"http://localhost:8080/\",\"tag\":{\"foo\":\"bar\"},\"confidence\":{\"score\":1},\"visitorFound\":true,\"firstSeenAt\":{\"global\":\"2023-12-15T12:13:55.103Z\",\"subscription\":\"2023-12-15T12:13:55.103Z\"},\"lastSeenAt\":{\"global\":\"2023-12-19T11:39:51.52Z\",\"subscription\":\"2023-12-19T11:39:51.52Z\"}}},\"botd\":{\"data\":{\"bot\":{\"result\":\"notDetected\"},\"meta\":{\"foo\":\"bar\"},\"url\":\"http://localhost:8080/\",\"ip\":\"::1\",\"time\":\"2023-12-20T10:12:13.894Z\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15\",\"requestId\":\"1703067132750.Z5hutJ\"}}}}"); @@ -144,4 +152,22 @@ public function testUnsealEventResponseWithInvalidNonce() $this->keys ); } + + public function testTypesAreDefinedCorrect() + { + $sealed = base64_decode(self::SEALED_RESULT); + $unsealed = Sealed::unsealEventResponse($sealed, $this->keys); + $ipLocation = $unsealed->getProducts()->getIdentification()->getData()->getIpLocation(); + $identificationTime = $unsealed->getProducts()->getIdentification()->getData()->getTime(); + $botTime = $unsealed->getProducts()->getBotd()->getData()->getTime(); + $browserDetails = $unsealed->getProducts()->getIdentification()->getData()->getBrowserDetails(); + $confidence = $unsealed->getProducts()->getIdentification()->getData()->getConfidence(); + $botResult = $unsealed->getProducts()->getBotd()->getData()->getBot(); + $this->assertEquals(DeprecatedIPLocation::class, get_class($ipLocation)); + $this->assertEquals(DateTime::class, get_class($identificationTime)); + $this->assertEquals(DateTime::class, get_class($botTime)); + $this->assertEquals(BrowserDetails::class, get_class($browserDetails)); + $this->assertEquals(Confidence::class, get_class($confidence)); + $this->assertEquals(BotdDetectionResult::class, get_class($botResult)); + } } From 9f489ef588141e4e701574a932aa0b6e2ba7cd12 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 21 Aug 2024 12:52:10 +0300 Subject: [PATCH 14/14] refactor: use parentschema instead of parent on model template --- src/Model/RawDeviceAttributesResult.php | 2 +- template/model_generic.mustache | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 1e560cb3..233734d2 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -174,7 +174,7 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return []; + return parent::listInvalidProperties(); } /** diff --git a/template/model_generic.mustache b/template/model_generic.mustache index a0786595..0b480bf6 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -158,12 +158,12 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa */ public function listInvalidProperties(): array { - {{#parentSchema}} + {{#parent}} $invalidProperties = parent::listInvalidProperties(); - {{/parentSchema}} - {{^parentSchema}} + {{/parent}} + {{^parent}} $invalidProperties = []; - {{/parentSchema}} + {{/parent}} {{#vars}} {{#required}}