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 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,17 +54,45 @@ } 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())); exit(1); } +$eventPromise = $client->getEventAsync($request_id); +$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())); + exit(1); +})->wait(); + +$visitsPromise = $client->getVisitsAsync($visitor_id); +$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())); + exit(1); +})->wait(); + $webhookSecret = "secret"; $webhookData = "data"; $webhookHeader = "v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db"; -$isValidWebhookSign = \Fingerprint\ServerAPI\Webhook\WebhookVerifier::IsValidWebhookSignature($webhookHeader, $webhookData, $webhookSecret); +$isValidWebhookSign = WebhookVerifier::IsValidWebhookSignature($webhookHeader, $webhookData, $webhookSecret); if($isValidWebhookSign) { fwrite(STDOUT, sprintf("\n\nVerified webhook signature\n")); } else { diff --git a/scripts/generate.sh b/scripts/generate.sh index 6dfff69c..90e9d983 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -40,6 +40,10 @@ rm -f ./src/Model/* java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l php -i ./res/fingerprint-server-api.yaml -o ./ -c config.json +if [ -z "$GITHUB_ACTIONS" ]; then + docker-compose run --rm lint +fi + # fix invalid code generated for structure with additionalProperties ( # Model file fix @@ -50,6 +54,18 @@ java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l php -i ./res/f fi ) +# fix invalid code generated for SignalResponseRawDeviceAttributes +( + # 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 + 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 + fi +) + ( # Readme file fix replacement=$(printf 'The rawAttributes object follows this general shape: `{ value: any } | { error: { name: string; message: string; } }`\n') @@ -67,7 +83,3 @@ mv -f src/README.md ./README.md mv -f src/composer.json composer.json find ./docs -type f ! -name "DecryptionKey.md" ! -name "Sealed.md" ! -name "Webhook.md" -exec rm {} + mv -f src/docs/* ./docs - -if [ -z "$GITHUB_ACTIONS" ]; then - docker-compose run --rm lint -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/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index 31cbbb38..e2413418 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; } @@ -81,12 +79,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(string $request_id): array { $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; $request = $this->getEventRequest($request_id); @@ -122,68 +119,111 @@ public function getEvent($request_id) throw $apiException; } - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $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); + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); - break; - } + 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; - throw $e; - } catch (\Exception $_) { + case 404: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\ErrorEvent404Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + + break; } + + throw $e; } } + /** + * 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) + * + * @throws \InvalidArgumentException + * @throws SerializationException + */ + public function getEventAsync(string $request_id): PromiseInterface + { + $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; + } + + $serialized = ObjectSerializer::deserialize($response, $returnType); + + return [$serialized, $response]; + }, + function ($e) { + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + 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; + } + + throw $e; + } + ); + } + /** * Operation getVisits. * @@ -198,12 +238,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(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); @@ -239,78 +278,123 @@ public function getVisits($visitor_id, $request_id = null, $linked_id = null, $l throw $apiException; } - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $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); + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); - break; - } + switch ($e->getCode()) { + case 200: + $errorDetail = ObjectSerializer::deserialize($response, '\Fingerprint\ServerAPI\Model\Response'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); - throw $e; - } catch (\Exception $_) { + 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; } + + throw $e; } } /** - * Create request for operation 'getEvent'. + * Operation getVisitsAsync. * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * Get visits by visitorId * - * @return Request + * @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 + */ + 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); + + 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; + } + + $serialized = ObjectSerializer::deserialize($response, $returnType); + + return [$serialized, $response]; + }, + function ($e) { + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + + 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; + } + + throw $e; + } + ); + } + + /** + * Create request for operation 'getEvent'. * * @throws \InvalidArgumentException + * @throws SerializationException */ - 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))) { @@ -372,18 +456,10 @@ protected function getEventRequest($request_id) /** * 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) - * - * @return Request - * * @throws \InvalidArgumentException + * @throws SerializationException */ - 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))) { @@ -466,11 +542,9 @@ protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id /** * 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..a31ebdff 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -28,6 +28,9 @@ namespace Fingerprint\ServerAPI; +use Fingerprint\ServerAPI\Model\ModelInterface; +use Psr\Http\Message\ResponseInterface; + /** * ApiException Class Doc Comment. * @@ -39,39 +42,34 @@ */ class ApiException extends \Exception { - /** - * The deserialized response object. - */ - protected $responseObject; + protected ResponseInterface $responseObject; + protected ModelInterface $errorDetails; - /** - * 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; } + + public function getErrorDetails(): ModelInterface + { + return $this->errorDetails; + } + + public function setErrorDetails(ModelInterface $errorDetails): void + { + $this->errorDetails = $errorDetails; + } } diff --git a/src/Configuration.php b/src/Configuration.php index c605ebd1..0cf80b52 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(string $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..6e544e45 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,17 +205,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets asn. - * - * @return string */ - public function getAsn() + public function getAsn(): string { return $this->container['asn']; } @@ -243,7 +225,7 @@ public function getAsn() * * @return $this */ - public function setAsn($asn) + public function setAsn(string $asn): self { $this->container['asn'] = $asn; @@ -252,10 +234,8 @@ public function setAsn($asn) /** * Gets network. - * - * @return string */ - public function getNetwork() + public function getNetwork(): string { return $this->container['network']; } @@ -267,7 +247,7 @@ public function getNetwork() * * @return $this */ - public function setNetwork($network) + public function setNetwork(string $network): self { $this->container['network'] = $network; @@ -277,9 +257,9 @@ public function setNetwork($network) /** * Gets name. * - * @return string + * @return ?string */ - public function getName() + public function getName(): ?string { return $this->container['name']; } @@ -287,11 +267,11 @@ public function getName() /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ - public function setName($name) + public function setName(?string $name): self { $this->container['name'] = $name; @@ -302,11 +282,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 +292,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 +304,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 +318,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..27120931 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,17 +222,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return string */ - public function getResult() + public function getResult(): string { return $this->container['result']; } @@ -260,7 +242,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(string $result): self { $allowedValues = $this->getResultAllowableValues(); if (!in_array($result, $allowedValues, true)) { @@ -279,9 +261,9 @@ public function setResult($result) /** * Gets type. * - * @return string + * @return ?string */ - public function getType() + public function getType(): ?string { return $this->container['type']; } @@ -289,11 +271,11 @@ public function getType() /** * Sets type. * - * @param string $type type + * @param ?string $type type * * @return $this */ - public function setType($type) + public function setType(?string $type): self { $this->container['type'] = $type; @@ -304,11 +286,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 +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; } @@ -332,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; @@ -347,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/BotdResult.php b/src/Model/BotdResult.php index 24083d55..178a37d2 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,17 +243,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -281,7 +263,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -290,10 +272,8 @@ public function setIp($ip) /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -305,7 +285,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -314,10 +294,8 @@ public function setTime($time) /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -329,7 +307,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -338,10 +316,8 @@ public function setUrl($url) /** * Gets user_agent. - * - * @return string */ - public function getUserAgent() + public function getUserAgent(): string { return $this->container['user_agent']; } @@ -353,7 +329,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent) + public function setUserAgent(string $user_agent): self { $this->container['user_agent'] = $user_agent; @@ -362,10 +338,8 @@ public function setUserAgent($user_agent) /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -377,7 +351,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -387,9 +361,9 @@ public function setRequestId($request_id) /** * Gets linked_id. * - * @return string + * @return ?string */ - public function getLinkedId() + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -397,11 +371,11 @@ public function getLinkedId() /** * Sets linked_id. * - * @param string $linked_id linked_id + * @param ?string $linked_id linked_id * * @return $this */ - public function setLinkedId($linked_id) + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -410,10 +384,8 @@ public function setLinkedId($linked_id) /** * Gets bot. - * - * @return BotdDetectionResult */ - public function getBot() + public function getBot(): BotdDetectionResult { return $this->container['bot']; } @@ -425,7 +397,7 @@ public function getBot() * * @return $this */ - public function setBot($bot) + public function setBot(BotdDetectionResult $bot): self { $this->container['bot'] = $bot; @@ -436,11 +408,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 +418,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 +430,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 +444,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..d04d9bc8 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,17 +250,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets browser_name. - * - * @return string */ - public function getBrowserName() + public function getBrowserName(): string { return $this->container['browser_name']; } @@ -288,7 +270,7 @@ public function getBrowserName() * * @return $this */ - public function setBrowserName($browser_name) + public function setBrowserName(string $browser_name): self { $this->container['browser_name'] = $browser_name; @@ -297,10 +279,8 @@ public function setBrowserName($browser_name) /** * Gets browser_major_version. - * - * @return string */ - public function getBrowserMajorVersion() + public function getBrowserMajorVersion(): string { return $this->container['browser_major_version']; } @@ -312,7 +292,7 @@ public function getBrowserMajorVersion() * * @return $this */ - public function setBrowserMajorVersion($browser_major_version) + public function setBrowserMajorVersion(string $browser_major_version): self { $this->container['browser_major_version'] = $browser_major_version; @@ -321,10 +301,8 @@ public function setBrowserMajorVersion($browser_major_version) /** * Gets browser_full_version. - * - * @return string */ - public function getBrowserFullVersion() + public function getBrowserFullVersion(): string { return $this->container['browser_full_version']; } @@ -336,7 +314,7 @@ public function getBrowserFullVersion() * * @return $this */ - public function setBrowserFullVersion($browser_full_version) + public function setBrowserFullVersion(string $browser_full_version): self { $this->container['browser_full_version'] = $browser_full_version; @@ -345,10 +323,8 @@ public function setBrowserFullVersion($browser_full_version) /** * Gets os. - * - * @return string */ - public function getOs() + public function getOs(): string { return $this->container['os']; } @@ -360,7 +336,7 @@ public function getOs() * * @return $this */ - public function setOs($os) + public function setOs(string $os): self { $this->container['os'] = $os; @@ -369,10 +345,8 @@ public function setOs($os) /** * Gets os_version. - * - * @return string */ - public function getOsVersion() + public function getOsVersion(): string { return $this->container['os_version']; } @@ -384,7 +358,7 @@ public function getOsVersion() * * @return $this */ - public function setOsVersion($os_version) + public function setOsVersion(string $os_version): self { $this->container['os_version'] = $os_version; @@ -393,10 +367,8 @@ public function setOsVersion($os_version) /** * Gets device. - * - * @return string */ - public function getDevice() + public function getDevice(): string { return $this->container['device']; } @@ -408,7 +380,7 @@ public function getDevice() * * @return $this */ - public function setDevice($device) + public function setDevice(string $device): self { $this->container['device'] = $device; @@ -417,10 +389,8 @@ public function setDevice($device) /** * Gets user_agent. - * - * @return string */ - public function getUserAgent() + public function getUserAgent(): string { return $this->container['user_agent']; } @@ -432,7 +402,7 @@ public function getUserAgent() * * @return $this */ - public function setUserAgent($user_agent) + public function setUserAgent(string $user_agent): self { $this->container['user_agent'] = $user_agent; @@ -442,9 +412,9 @@ public function setUserAgent($user_agent) /** * Gets bot_probability. * - * @return int + * @return ?int */ - public function getBotProbability() + public function getBotProbability(): ?int { return $this->container['bot_probability']; } @@ -452,11 +422,11 @@ public function getBotProbability() /** * Sets bot_probability. * - * @param int $bot_probability bot_probability + * @param ?int $bot_probability bot_probability * * @return $this */ - public function setBotProbability($bot_probability) + public function setBotProbability(?int $bot_probability): self { $this->container['bot_probability'] = $bot_probability; @@ -467,11 +437,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 +447,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 +459,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 +473,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..61fd7c2d 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -228,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -239,11 +221,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 +231,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 +243,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 +257,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..ac489b0d 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets score. - * - * @return float */ - public function getScore() + public function getScore(): float { return $this->container['score']; } @@ -228,7 +210,7 @@ public function getScore() * * @return $this */ - public function setScore($score) + public function setScore(float $score): self { $this->container['score'] = $score; @@ -239,11 +221,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 +231,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 +243,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 +257,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..1b8c9294 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,17 +196,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -234,7 +216,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -244,9 +226,9 @@ public function setResult($result) /** * Gets name. * - * @return string + * @return ?string */ - public function getName() + public function getName(): ?string { return $this->container['name']; } @@ -254,11 +236,11 @@ public function getName() /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ - public function setName($name) + public function setName(?string $name): self { $this->container['name'] = $name; @@ -269,11 +251,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 +261,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 +273,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 +287,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..9739584c 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()); } @@ -258,9 +242,9 @@ public function valid() /** * Gets accuracy_radius. * - * @return int + * @return ?int */ - public function getAccuracyRadius() + public function getAccuracyRadius(): ?int { return $this->container['accuracy_radius']; } @@ -268,11 +252,11 @@ public function getAccuracyRadius() /** * 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 */ - public function setAccuracyRadius($accuracy_radius) + public function setAccuracyRadius(?int $accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -282,9 +266,9 @@ public function setAccuracyRadius($accuracy_radius) /** * Gets latitude. * - * @return float + * @return ?double */ - public function getLatitude() + public function getLatitude(): ?float { return $this->container['latitude']; } @@ -292,11 +276,11 @@ public function getLatitude() /** * Sets latitude. * - * @param float $latitude latitude + * @param ?double $latitude latitude * * @return $this */ - public function setLatitude($latitude) + public function setLatitude(?float $latitude): self { $this->container['latitude'] = $latitude; @@ -306,9 +290,9 @@ public function setLatitude($latitude) /** * Gets longitude. * - * @return float + * @return ?double */ - public function getLongitude() + public function getLongitude(): ?float { return $this->container['longitude']; } @@ -316,11 +300,11 @@ public function getLongitude() /** * Sets longitude. * - * @param float $longitude longitude + * @param ?double $longitude longitude * * @return $this */ - public function setLongitude($longitude) + public function setLongitude(?float $longitude): self { $this->container['longitude'] = $longitude; @@ -330,9 +314,9 @@ public function setLongitude($longitude) /** * Gets postal_code. * - * @return string + * @return ?string */ - public function getPostalCode() + public function getPostalCode(): ?string { return $this->container['postal_code']; } @@ -340,11 +324,11 @@ public function getPostalCode() /** * Sets postal_code. * - * @param string $postal_code postal_code + * @param ?string $postal_code postal_code * * @return $this */ - public function setPostalCode($postal_code) + public function setPostalCode(?string $postal_code): self { $this->container['postal_code'] = $postal_code; @@ -354,9 +338,9 @@ public function setPostalCode($postal_code) /** * Gets timezone. * - * @return string + * @return ?string */ - public function getTimezone() + public function getTimezone(): ?string { return $this->container['timezone']; } @@ -364,11 +348,11 @@ public function getTimezone() /** * Sets timezone. * - * @param string $timezone timezone + * @param ?string $timezone timezone * * @return $this */ - public function setTimezone($timezone) + public function setTimezone(?string $timezone): self { $this->container['timezone'] = $timezone; @@ -378,9 +362,9 @@ public function setTimezone($timezone) /** * Gets city. * - * @return DeprecatedIPLocationCity + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity */ - public function getCity() + public function getCity(): ?DeprecatedIPLocationCity { return $this->container['city']; } @@ -388,11 +372,11 @@ public function getCity() /** * Sets city. * - * @param DeprecatedIPLocationCity $city city + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity $city city * * @return $this */ - public function setCity($city) + public function setCity(?DeprecatedIPLocationCity $city): self { $this->container['city'] = $city; @@ -402,9 +386,9 @@ public function setCity($city) /** * Gets country. * - * @return Location + * @return ?\Fingerprint\ServerAPI\Model\Location */ - public function getCountry() + public function getCountry(): ?Location { return $this->container['country']; } @@ -412,11 +396,11 @@ public function getCountry() /** * Sets country. * - * @param Location $country country + * @param ?\Fingerprint\ServerAPI\Model\Location $country country * * @return $this */ - public function setCountry($country) + public function setCountry(?Location $country): self { $this->container['country'] = $country; @@ -426,9 +410,9 @@ public function setCountry($country) /** * Gets continent. * - * @return Location + * @return ?\Fingerprint\ServerAPI\Model\Location */ - public function getContinent() + public function getContinent(): ?Location { return $this->container['continent']; } @@ -436,11 +420,11 @@ public function getContinent() /** * Sets continent. * - * @param Location $continent continent + * @param ?\Fingerprint\ServerAPI\Model\Location $continent continent * * @return $this */ - public function setContinent($continent) + public function setContinent(?Location $continent): self { $this->container['continent'] = $continent; @@ -450,9 +434,9 @@ public function setContinent($continent) /** * Gets subdivisions. * - * @return \Fingerprint\ServerAPI\Model\Subdivision[] + * @return ?\Fingerprint\ServerAPI\Model\Subdivision[] */ - public function getSubdivisions() + public function getSubdivisions(): ?array { return $this->container['subdivisions']; } @@ -460,11 +444,11 @@ public function getSubdivisions() /** * Sets subdivisions. * - * @param \Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions + * @param ?\Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * * @return $this */ - public function setSubdivisions($subdivisions) + public function setSubdivisions(?array $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..fdffb4e1 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()); } @@ -208,9 +192,9 @@ public function valid() /** * Gets name. * - * @return string + * @return ?string */ - public function getName() + public function getName(): ?string { return $this->container['name']; } @@ -218,11 +202,11 @@ public function getName() /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ - public function setName($name) + public function setName(?string $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..0a4398fd 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -228,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -239,11 +221,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 +231,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 +243,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 +257,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..b8093804 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()); } @@ -208,9 +192,9 @@ public function valid() /** * Gets error. * - * @return ErrorEvent403ResponseError + * @return ?\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError */ - public function getError() + public function getError(): ?ErrorEvent403ResponseError { return $this->container['error']; } @@ -218,11 +202,11 @@ public function getError() /** * Sets error. * - * @param ErrorEvent403ResponseError $error error + * @param ?\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError $error error * * @return $this */ - public function setError($error) + public function setError(?ErrorEvent403ResponseError $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..702c754c 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,17 +226,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -264,7 +246,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode(string $code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -282,10 +264,8 @@ public function setCode($code) /** * Gets message. - * - * @return string */ - public function getMessage() + public function getMessage(): string { return $this->container['message']; } @@ -297,7 +277,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message) + public function setMessage(string $message): self { $this->container['message'] = $message; @@ -308,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]); } @@ -321,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; } @@ -336,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; @@ -351,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/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index 7c7da1d0..b03ce283 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()); } @@ -208,9 +192,9 @@ public function valid() /** * Gets error. * - * @return ErrorEvent404ResponseError + * @return ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError */ - public function getError() + public function getError(): ?ErrorEvent404ResponseError { return $this->container['error']; } @@ -218,11 +202,11 @@ public function getError() /** * Sets error. * - * @param ErrorEvent404ResponseError $error error + * @param ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError $error error * * @return $this */ - public function setError($error) + public function setError(?ErrorEvent404ResponseError $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..607b1924 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,17 +220,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -258,7 +240,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode(string $code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -276,10 +258,8 @@ public function setCode($code) /** * Gets message. - * - * @return string */ - public function getMessage() + public function getMessage(): string { return $this->container['message']; } @@ -291,7 +271,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message) + public function setMessage(string $message): self { $this->container['message'] = $message; @@ -302,11 +282,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 +292,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 +304,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 +318,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..297998f3 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets error. - * - * @return string */ - public function getError() + public function getError(): string { return $this->container['error']; } @@ -228,7 +210,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError(string $error): self { $this->container['error'] = $error; @@ -239,11 +221,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 +231,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 +243,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 +257,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..ee5b3fbe 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,17 +198,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets products. - * - * @return ProductsResponse */ - public function getProducts() + public function getProducts(): ProductsResponse { return $this->container['products']; } @@ -236,7 +218,7 @@ public function getProducts() * * @return $this */ - public function setProducts($products) + public function setProducts(ProductsResponse $products): self { $this->container['products'] = $products; @@ -246,9 +228,9 @@ public function setProducts($products) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -256,11 +238,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $error): self { $this->container['error'] = $error; @@ -271,11 +253,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 +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; } @@ -299,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; @@ -314,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/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 7329208d..fbf1834d 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,17 +199,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -237,7 +219,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -246,10 +228,8 @@ public function setTime($time) /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -261,7 +241,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -272,11 +252,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 +262,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 +274,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 +288,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..ad511bad 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -228,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -239,11 +221,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 +231,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 +243,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 +257,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..20879925 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,17 +196,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -234,7 +216,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -244,9 +226,9 @@ public function setResult($result) /** * Gets daily_requests. * - * @return float + * @return ?float */ - public function getDailyRequests() + public function getDailyRequests(): ?float { return $this->container['daily_requests']; } @@ -254,11 +236,11 @@ public function getDailyRequests() /** * 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 */ - public function setDailyRequests($daily_requests) + public function setDailyRequests(?float $daily_requests): self { $this->container['daily_requests'] = $daily_requests; @@ -269,11 +251,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 +261,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 +273,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 +287,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..6f769e05 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()); } @@ -256,9 +240,9 @@ public function valid() /** * Gets accuracy_radius. * - * @return int + * @return ?int */ - public function getAccuracyRadius() + public function getAccuracyRadius(): ?int { return $this->container['accuracy_radius']; } @@ -266,11 +250,11 @@ public function getAccuracyRadius() /** * 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 */ - public function setAccuracyRadius($accuracy_radius) + public function setAccuracyRadius(?int $accuracy_radius): self { $this->container['accuracy_radius'] = $accuracy_radius; @@ -280,9 +264,9 @@ public function setAccuracyRadius($accuracy_radius) /** * Gets latitude. * - * @return float + * @return ?double */ - public function getLatitude() + public function getLatitude(): ?float { return $this->container['latitude']; } @@ -290,11 +274,11 @@ public function getLatitude() /** * Sets latitude. * - * @param float $latitude latitude + * @param ?double $latitude latitude * * @return $this */ - public function setLatitude($latitude) + public function setLatitude(?float $latitude): self { $this->container['latitude'] = $latitude; @@ -304,9 +288,9 @@ public function setLatitude($latitude) /** * Gets longitude. * - * @return float + * @return ?double */ - public function getLongitude() + public function getLongitude(): ?float { return $this->container['longitude']; } @@ -314,11 +298,11 @@ public function getLongitude() /** * Sets longitude. * - * @param float $longitude longitude + * @param ?double $longitude longitude * * @return $this */ - public function setLongitude($longitude) + public function setLongitude(?float $longitude): self { $this->container['longitude'] = $longitude; @@ -328,9 +312,9 @@ public function setLongitude($longitude) /** * Gets postal_code. * - * @return string + * @return ?string */ - public function getPostalCode() + public function getPostalCode(): ?string { return $this->container['postal_code']; } @@ -338,11 +322,11 @@ public function getPostalCode() /** * Sets postal_code. * - * @param string $postal_code postal_code + * @param ?string $postal_code postal_code * * @return $this */ - public function setPostalCode($postal_code) + public function setPostalCode(?string $postal_code): self { $this->container['postal_code'] = $postal_code; @@ -352,9 +336,9 @@ public function setPostalCode($postal_code) /** * Gets timezone. * - * @return string + * @return ?string */ - public function getTimezone() + public function getTimezone(): ?string { return $this->container['timezone']; } @@ -362,11 +346,11 @@ public function getTimezone() /** * Sets timezone. * - * @param string $timezone timezone + * @param ?string $timezone timezone * * @return $this */ - public function setTimezone($timezone) + public function setTimezone(?string $timezone): self { $this->container['timezone'] = $timezone; @@ -376,9 +360,9 @@ public function setTimezone($timezone) /** * Gets city. * - * @return IPLocationCity + * @return ?\Fingerprint\ServerAPI\Model\IPLocationCity */ - public function getCity() + public function getCity(): ?IPLocationCity { return $this->container['city']; } @@ -386,11 +370,11 @@ public function getCity() /** * Sets city. * - * @param IPLocationCity $city city + * @param ?\Fingerprint\ServerAPI\Model\IPLocationCity $city city * * @return $this */ - public function setCity($city) + public function setCity(?IPLocationCity $city): self { $this->container['city'] = $city; @@ -400,9 +384,9 @@ public function setCity($city) /** * Gets country. * - * @return Location + * @return ?\Fingerprint\ServerAPI\Model\Location */ - public function getCountry() + public function getCountry(): ?Location { return $this->container['country']; } @@ -410,11 +394,11 @@ public function getCountry() /** * Sets country. * - * @param Location $country country + * @param ?\Fingerprint\ServerAPI\Model\Location $country country * * @return $this */ - public function setCountry($country) + public function setCountry(?Location $country): self { $this->container['country'] = $country; @@ -424,9 +408,9 @@ public function setCountry($country) /** * Gets continent. * - * @return Location + * @return ?\Fingerprint\ServerAPI\Model\Location */ - public function getContinent() + public function getContinent(): ?Location { return $this->container['continent']; } @@ -434,11 +418,11 @@ public function getContinent() /** * Sets continent. * - * @param Location $continent continent + * @param ?\Fingerprint\ServerAPI\Model\Location $continent continent * * @return $this */ - public function setContinent($continent) + public function setContinent(?Location $continent): self { $this->container['continent'] = $continent; @@ -448,9 +432,9 @@ public function setContinent($continent) /** * Gets subdivisions. * - * @return \Fingerprint\ServerAPI\Model\Subdivision[] + * @return ?\Fingerprint\ServerAPI\Model\Subdivision[] */ - public function getSubdivisions() + public function getSubdivisions(): ?array { return $this->container['subdivisions']; } @@ -458,11 +442,11 @@ public function getSubdivisions() /** * Sets subdivisions. * - * @param \Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions + * @param ?\Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * * @return $this */ - public function setSubdivisions($subdivisions) + public function setSubdivisions(?array $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..c0637bf3 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()); } @@ -208,9 +192,9 @@ public function valid() /** * Gets name. * - * @return string + * @return ?string */ - public function getName() + public function getName(): ?string { return $this->container['name']; } @@ -218,11 +202,11 @@ public function getName() /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ - public function setName($name) + public function setName(?string $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..c8890cc4 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,17 +222,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -260,7 +242,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode(string $code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -278,10 +260,8 @@ public function setCode($code) /** * Gets message. - * - * @return string */ - public function getMessage() + public function getMessage(): string { return $this->container['message']; } @@ -293,7 +273,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message) + public function setMessage(string $message): self { $this->container['message'] = $message; @@ -304,11 +284,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 +294,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 +306,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 +320,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..6299cc93 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -228,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -239,11 +221,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 +231,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 +243,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 +257,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..c6131829 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,17 +199,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -237,7 +219,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -246,10 +228,8 @@ public function setResult($result) /** * Gets details. - * - * @return IpBlockListResultDetails */ - public function getDetails() + public function getDetails(): IpBlockListResultDetails { return $this->container['details']; } @@ -261,7 +241,7 @@ public function getDetails() * * @return $this */ - public function setDetails($details) + public function setDetails(IpBlockListResultDetails $details): self { $this->container['details'] = $details; @@ -272,11 +252,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 +262,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 +274,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 +288,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..0695fbc1 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,17 +199,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets email_spam. - * - * @return bool */ - public function getEmailSpam() + public function getEmailSpam(): bool { return $this->container['email_spam']; } @@ -237,7 +219,7 @@ public function getEmailSpam() * * @return $this */ - public function setEmailSpam($email_spam) + public function setEmailSpam(bool $email_spam): self { $this->container['email_spam'] = $email_spam; @@ -246,10 +228,8 @@ public function setEmailSpam($email_spam) /** * Gets attack_source. - * - * @return bool */ - public function getAttackSource() + public function getAttackSource(): bool { return $this->container['attack_source']; } @@ -261,7 +241,7 @@ public function getAttackSource() * * @return $this */ - public function setAttackSource($attack_source) + public function setAttackSource(bool $attack_source): self { $this->container['attack_source'] = $attack_source; @@ -272,11 +252,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 +262,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 +274,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 +288,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..2a6a7d98 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()); } @@ -216,9 +200,9 @@ public function valid() /** * Gets v4. * - * @return IpInfoResultV4 + * @return ?\Fingerprint\ServerAPI\Model\IpInfoResultV4 */ - public function getV4() + public function getV4(): ?IpInfoResultV4 { return $this->container['v4']; } @@ -226,11 +210,11 @@ public function getV4() /** * Sets v4. * - * @param IpInfoResultV4 $v4 v4 + * @param ?\Fingerprint\ServerAPI\Model\IpInfoResultV4 $v4 v4 * * @return $this */ - public function setV4($v4) + public function setV4(?IpInfoResultV4 $v4): self { $this->container['v4'] = $v4; @@ -240,9 +224,9 @@ public function setV4($v4) /** * Gets v6. * - * @return IpInfoResultV6 + * @return ?\Fingerprint\ServerAPI\Model\IpInfoResultV6 */ - public function getV6() + public function getV6(): ?IpInfoResultV6 { return $this->container['v6']; } @@ -250,11 +234,11 @@ public function getV6() /** * Sets v6. * - * @param IpInfoResultV6 $v6 v6 + * @param ?\Fingerprint\ServerAPI\Model\IpInfoResultV6 $v6 v6 * * @return $this */ - public function setV6($v6) + public function setV6(?IpInfoResultV6 $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..8a2f36d3 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,17 +211,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets address. - * - * @return string */ - public function getAddress() + public function getAddress(): string { return $this->container['address']; } @@ -249,7 +231,7 @@ public function getAddress() * * @return $this */ - public function setAddress($address) + public function setAddress(string $address): self { $this->container['address'] = $address; @@ -258,10 +240,8 @@ public function setAddress($address) /** * Gets geolocation. - * - * @return IPLocation */ - public function getGeolocation() + public function getGeolocation(): IPLocation { return $this->container['geolocation']; } @@ -273,7 +253,7 @@ public function getGeolocation() * * @return $this */ - public function setGeolocation($geolocation) + public function setGeolocation(IPLocation $geolocation): self { $this->container['geolocation'] = $geolocation; @@ -283,9 +263,9 @@ public function setGeolocation($geolocation) /** * Gets asn. * - * @return ASN + * @return ?\Fingerprint\ServerAPI\Model\ASN */ - public function getAsn() + public function getAsn(): ?ASN { return $this->container['asn']; } @@ -293,11 +273,11 @@ public function getAsn() /** * Sets asn. * - * @param ASN $asn asn + * @param ?\Fingerprint\ServerAPI\Model\ASN $asn asn * * @return $this */ - public function setAsn($asn) + public function setAsn(?ASN $asn): self { $this->container['asn'] = $asn; @@ -307,9 +287,9 @@ public function setAsn($asn) /** * Gets datacenter. * - * @return DataCenter + * @return ?\Fingerprint\ServerAPI\Model\DataCenter */ - public function getDatacenter() + public function getDatacenter(): ?DataCenter { return $this->container['datacenter']; } @@ -317,11 +297,11 @@ public function getDatacenter() /** * Sets datacenter. * - * @param DataCenter $datacenter datacenter + * @param ?\Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter * * @return $this */ - public function setDatacenter($datacenter) + public function setDatacenter(?DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; @@ -332,11 +312,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 +322,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 +334,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 +348,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..0774ae9c 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,17 +211,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets address. - * - * @return string */ - public function getAddress() + public function getAddress(): string { return $this->container['address']; } @@ -249,7 +231,7 @@ public function getAddress() * * @return $this */ - public function setAddress($address) + public function setAddress(string $address): self { $this->container['address'] = $address; @@ -258,10 +240,8 @@ public function setAddress($address) /** * Gets geolocation. - * - * @return IPLocation */ - public function getGeolocation() + public function getGeolocation(): IPLocation { return $this->container['geolocation']; } @@ -273,7 +253,7 @@ public function getGeolocation() * * @return $this */ - public function setGeolocation($geolocation) + public function setGeolocation(IPLocation $geolocation): self { $this->container['geolocation'] = $geolocation; @@ -283,9 +263,9 @@ public function setGeolocation($geolocation) /** * Gets asn. * - * @return ASN + * @return ?\Fingerprint\ServerAPI\Model\ASN */ - public function getAsn() + public function getAsn(): ?ASN { return $this->container['asn']; } @@ -293,11 +273,11 @@ public function getAsn() /** * Sets asn. * - * @param ASN $asn asn + * @param ?\Fingerprint\ServerAPI\Model\ASN $asn asn * * @return $this */ - public function setAsn($asn) + public function setAsn(?ASN $asn): self { $this->container['asn'] = $asn; @@ -307,9 +287,9 @@ public function setAsn($asn) /** * Gets datacenter. * - * @return DataCenter + * @return ?\Fingerprint\ServerAPI\Model\DataCenter */ - public function getDatacenter() + public function getDatacenter(): ?DataCenter { return $this->container['datacenter']; } @@ -317,11 +297,11 @@ public function getDatacenter() /** * Sets datacenter. * - * @param DataCenter $datacenter datacenter + * @param ?\Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter * * @return $this */ - public function setDatacenter($datacenter) + public function setDatacenter(?DataCenter $datacenter): self { $this->container['datacenter'] = $datacenter; @@ -332,11 +312,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 +322,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 +334,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 +348,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..fa94ca4d 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -228,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -239,11 +221,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 +231,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 +243,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 +257,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..10af00e7 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,17 +199,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -237,7 +219,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode(string $code): self { $this->container['code'] = $code; @@ -246,10 +228,8 @@ public function setCode($code) /** * Gets name. - * - * @return string */ - public function getName() + public function getName(): string { return $this->container['name']; } @@ -261,7 +241,7 @@ public function getName() * * @return $this */ - public function setName($name) + public function setName(string $name): self { $this->container['name'] = $name; @@ -272,11 +252,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 +262,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 +274,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 +288,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..fb7e697c 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -228,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -239,11 +221,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 +231,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 +243,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 +257,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..f2c782c5 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets error. - * - * @return string */ - public function getError() + public function getError(): string { return $this->container['error']; } @@ -228,7 +210,7 @@ public function getError() * * @return $this */ - public function setError($error) + public function setError(string $error): self { $this->container['error'] = $error; @@ -239,11 +221,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 +231,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 +243,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 +257,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..28bcb9a6 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -228,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -239,11 +221,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 +231,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 +243,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 +257,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..5a0879e9 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,17 +222,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets code. - * - * @return string */ - public function getCode() + public function getCode(): string { return $this->container['code']; } @@ -260,7 +242,7 @@ public function getCode() * * @return $this */ - public function setCode($code) + public function setCode(string $code): self { $allowedValues = $this->getCodeAllowableValues(); if (!in_array($code, $allowedValues, true)) { @@ -278,10 +260,8 @@ public function setCode($code) /** * Gets message. - * - * @return string */ - public function getMessage() + public function getMessage(): string { return $this->container['message']; } @@ -293,7 +273,7 @@ public function getMessage() * * @return $this */ - public function setMessage($message) + public function setMessage(string $message): self { $this->container['message'] = $message; @@ -304,11 +284,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 +294,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 +306,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 +320,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..dffaf631 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()); } @@ -330,9 +314,9 @@ public function valid() /** * Gets identification. * - * @return ProductsResponseIdentification + * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification */ - public function getIdentification() + public function getIdentification(): ?ProductsResponseIdentification { return $this->container['identification']; } @@ -340,11 +324,11 @@ public function getIdentification() /** * Sets identification. * - * @param ProductsResponseIdentification $identification identification + * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentification $identification identification * * @return $this */ - public function setIdentification($identification) + public function setIdentification(?ProductsResponseIdentification $identification): self { $this->container['identification'] = $identification; @@ -354,9 +338,9 @@ public function setIdentification($identification) /** * Gets botd. * - * @return ProductsResponseBotd + * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseBotd */ - public function getBotd() + public function getBotd(): ?ProductsResponseBotd { return $this->container['botd']; } @@ -364,11 +348,11 @@ public function getBotd() /** * Sets botd. * - * @param ProductsResponseBotd $botd botd + * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseBotd $botd botd * * @return $this */ - public function setBotd($botd) + public function setBotd(?ProductsResponseBotd $botd): self { $this->container['botd'] = $botd; @@ -378,9 +362,9 @@ public function setBotd($botd) /** * Gets ip_info. * - * @return SignalResponseIpInfo + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo */ - public function getIpInfo() + public function getIpInfo(): ?SignalResponseIpInfo { return $this->container['ip_info']; } @@ -388,11 +372,11 @@ public function getIpInfo() /** * Sets ip_info. * - * @param SignalResponseIpInfo $ip_info ip_info + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIpInfo $ip_info ip_info * * @return $this */ - public function setIpInfo($ip_info) + public function setIpInfo(?SignalResponseIpInfo $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -402,9 +386,9 @@ public function setIpInfo($ip_info) /** * Gets incognito. * - * @return SignalResponseIncognito + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIncognito */ - public function getIncognito() + public function getIncognito(): ?SignalResponseIncognito { return $this->container['incognito']; } @@ -412,11 +396,11 @@ public function getIncognito() /** * Sets incognito. * - * @param SignalResponseIncognito $incognito incognito + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIncognito $incognito incognito * * @return $this */ - public function setIncognito($incognito) + public function setIncognito(?SignalResponseIncognito $incognito): self { $this->container['incognito'] = $incognito; @@ -426,9 +410,9 @@ public function setIncognito($incognito) /** * Gets root_apps. * - * @return SignalResponseRootApps + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRootApps */ - public function getRootApps() + public function getRootApps(): ?SignalResponseRootApps { return $this->container['root_apps']; } @@ -436,11 +420,11 @@ public function getRootApps() /** * Sets root_apps. * - * @param SignalResponseRootApps $root_apps root_apps + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseRootApps $root_apps root_apps * * @return $this */ - public function setRootApps($root_apps) + public function setRootApps(?SignalResponseRootApps $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -450,9 +434,9 @@ public function setRootApps($root_apps) /** * Gets emulator. * - * @return SignalResponseEmulator + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseEmulator */ - public function getEmulator() + public function getEmulator(): ?SignalResponseEmulator { return $this->container['emulator']; } @@ -460,11 +444,11 @@ public function getEmulator() /** * Sets emulator. * - * @param SignalResponseEmulator $emulator emulator + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseEmulator $emulator emulator * * @return $this */ - public function setEmulator($emulator) + public function setEmulator(?SignalResponseEmulator $emulator): self { $this->container['emulator'] = $emulator; @@ -474,9 +458,9 @@ public function setEmulator($emulator) /** * Gets cloned_app. * - * @return SignalResponseClonedApp + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp */ - public function getClonedApp() + public function getClonedApp(): ?SignalResponseClonedApp { return $this->container['cloned_app']; } @@ -484,11 +468,11 @@ public function getClonedApp() /** * Sets cloned_app. * - * @param SignalResponseClonedApp $cloned_app cloned_app + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseClonedApp $cloned_app cloned_app * * @return $this */ - public function setClonedApp($cloned_app) + public function setClonedApp(?SignalResponseClonedApp $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -498,9 +482,9 @@ public function setClonedApp($cloned_app) /** * Gets factory_reset. * - * @return SignalResponseFactoryReset + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset */ - public function getFactoryReset() + public function getFactoryReset(): ?SignalResponseFactoryReset { return $this->container['factory_reset']; } @@ -508,11 +492,11 @@ public function getFactoryReset() /** * Sets factory_reset. * - * @param SignalResponseFactoryReset $factory_reset factory_reset + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset $factory_reset factory_reset * * @return $this */ - public function setFactoryReset($factory_reset) + public function setFactoryReset(?SignalResponseFactoryReset $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -522,9 +506,9 @@ public function setFactoryReset($factory_reset) /** * Gets jailbroken. * - * @return SignalResponseJailbroken + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken */ - public function getJailbroken() + public function getJailbroken(): ?SignalResponseJailbroken { return $this->container['jailbroken']; } @@ -532,11 +516,11 @@ public function getJailbroken() /** * Sets jailbroken. * - * @param SignalResponseJailbroken $jailbroken jailbroken + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseJailbroken $jailbroken jailbroken * * @return $this */ - public function setJailbroken($jailbroken) + public function setJailbroken(?SignalResponseJailbroken $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -546,9 +530,9 @@ public function setJailbroken($jailbroken) /** * Gets frida. * - * @return SignalResponseFrida + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseFrida */ - public function getFrida() + public function getFrida(): ?SignalResponseFrida { return $this->container['frida']; } @@ -556,11 +540,11 @@ public function getFrida() /** * Sets frida. * - * @param SignalResponseFrida $frida frida + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseFrida $frida frida * * @return $this */ - public function setFrida($frida) + public function setFrida(?SignalResponseFrida $frida): self { $this->container['frida'] = $frida; @@ -570,9 +554,9 @@ public function setFrida($frida) /** * Gets ip_blocklist. * - * @return SignalResponseIpBlocklist + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist */ - public function getIpBlocklist() + public function getIpBlocklist(): ?SignalResponseIpBlocklist { return $this->container['ip_blocklist']; } @@ -580,11 +564,11 @@ public function getIpBlocklist() /** * Sets ip_blocklist. * - * @param SignalResponseIpBlocklist $ip_blocklist ip_blocklist + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist $ip_blocklist ip_blocklist * * @return $this */ - public function setIpBlocklist($ip_blocklist) + public function setIpBlocklist(?SignalResponseIpBlocklist $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -594,9 +578,9 @@ public function setIpBlocklist($ip_blocklist) /** * Gets tor. * - * @return SignalResponseTor + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseTor */ - public function getTor() + public function getTor(): ?SignalResponseTor { return $this->container['tor']; } @@ -604,11 +588,11 @@ public function getTor() /** * Sets tor. * - * @param SignalResponseTor $tor tor + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseTor $tor tor * * @return $this */ - public function setTor($tor) + public function setTor(?SignalResponseTor $tor): self { $this->container['tor'] = $tor; @@ -618,9 +602,9 @@ public function setTor($tor) /** * Gets privacy_settings. * - * @return SignalResponsePrivacySettings + * @return ?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings */ - public function getPrivacySettings() + public function getPrivacySettings(): ?SignalResponsePrivacySettings { return $this->container['privacy_settings']; } @@ -628,11 +612,11 @@ public function getPrivacySettings() /** * Sets privacy_settings. * - * @param SignalResponsePrivacySettings $privacy_settings privacy_settings + * @param ?\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings $privacy_settings privacy_settings * * @return $this */ - public function setPrivacySettings($privacy_settings) + public function setPrivacySettings(?SignalResponsePrivacySettings $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -642,9 +626,9 @@ public function setPrivacySettings($privacy_settings) /** * Gets virtual_machine. * - * @return SignalResponseVirtualMachine + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine */ - public function getVirtualMachine() + public function getVirtualMachine(): ?SignalResponseVirtualMachine { return $this->container['virtual_machine']; } @@ -652,11 +636,11 @@ public function getVirtualMachine() /** * Sets virtual_machine. * - * @param SignalResponseVirtualMachine $virtual_machine virtual_machine + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine $virtual_machine virtual_machine * * @return $this */ - public function setVirtualMachine($virtual_machine) + public function setVirtualMachine(?SignalResponseVirtualMachine $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -666,9 +650,9 @@ public function setVirtualMachine($virtual_machine) /** * Gets vpn. * - * @return SignalResponseVpn + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseVpn */ - public function getVpn() + public function getVpn(): ?SignalResponseVpn { return $this->container['vpn']; } @@ -676,11 +660,11 @@ public function getVpn() /** * Sets vpn. * - * @param SignalResponseVpn $vpn vpn + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseVpn $vpn vpn * * @return $this */ - public function setVpn($vpn) + public function setVpn(?SignalResponseVpn $vpn): self { $this->container['vpn'] = $vpn; @@ -690,9 +674,9 @@ public function setVpn($vpn) /** * Gets proxy. * - * @return SignalResponseProxy + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseProxy */ - public function getProxy() + public function getProxy(): ?SignalResponseProxy { return $this->container['proxy']; } @@ -700,11 +684,11 @@ public function getProxy() /** * Sets proxy. * - * @param SignalResponseProxy $proxy proxy + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseProxy $proxy proxy * * @return $this */ - public function setProxy($proxy) + public function setProxy(?SignalResponseProxy $proxy): self { $this->container['proxy'] = $proxy; @@ -714,9 +698,9 @@ public function setProxy($proxy) /** * Gets tampering. * - * @return SignalResponseTampering + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseTampering */ - public function getTampering() + public function getTampering(): ?SignalResponseTampering { return $this->container['tampering']; } @@ -724,11 +708,11 @@ public function getTampering() /** * Sets tampering. * - * @param SignalResponseTampering $tampering tampering + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseTampering $tampering tampering * * @return $this */ - public function setTampering($tampering) + public function setTampering(?SignalResponseTampering $tampering): self { $this->container['tampering'] = $tampering; @@ -738,9 +722,9 @@ public function setTampering($tampering) /** * Gets high_activity. * - * @return SignalResponseHighActivity + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity */ - public function getHighActivity() + public function getHighActivity(): ?SignalResponseHighActivity { return $this->container['high_activity']; } @@ -748,11 +732,11 @@ public function getHighActivity() /** * Sets high_activity. * - * @param SignalResponseHighActivity $high_activity high_activity + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseHighActivity $high_activity high_activity * * @return $this */ - public function setHighActivity($high_activity) + public function setHighActivity(?SignalResponseHighActivity $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -762,9 +746,9 @@ public function setHighActivity($high_activity) /** * Gets location_spoofing. * - * @return SignalResponseLocationSpoofing + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing */ - public function getLocationSpoofing() + public function getLocationSpoofing(): ?SignalResponseLocationSpoofing { return $this->container['location_spoofing']; } @@ -772,11 +756,11 @@ public function getLocationSpoofing() /** * Sets location_spoofing. * - * @param SignalResponseLocationSpoofing $location_spoofing location_spoofing + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing $location_spoofing location_spoofing * * @return $this */ - public function setLocationSpoofing($location_spoofing) + public function setLocationSpoofing(?SignalResponseLocationSpoofing $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -786,9 +770,9 @@ public function setLocationSpoofing($location_spoofing) /** * Gets suspect_score. * - * @return SignalResponseSuspectScore + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore */ - public function getSuspectScore() + public function getSuspectScore(): ?SignalResponseSuspectScore { return $this->container['suspect_score']; } @@ -796,11 +780,11 @@ public function getSuspectScore() /** * Sets suspect_score. * - * @param SignalResponseSuspectScore $suspect_score suspect_score + * @param ?\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore $suspect_score suspect_score * * @return $this */ - public function setSuspectScore($suspect_score) + public function setSuspectScore(?SignalResponseSuspectScore $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -810,9 +794,9 @@ public function setSuspectScore($suspect_score) /** * Gets raw_device_attributes. * - * @return SignalResponseRawDeviceAttributes + * @return ?\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes */ - public function getRawDeviceAttributes() + public function getRawDeviceAttributes(): ?SignalResponseRawDeviceAttributes { return $this->container['raw_device_attributes']; } @@ -820,11 +804,11 @@ public function getRawDeviceAttributes() /** * 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 */ - public function setRawDeviceAttributes($raw_device_attributes) + public function setRawDeviceAttributes(?SignalResponseRawDeviceAttributes $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..7d8255c1 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return BotdResult + * @return ?\Fingerprint\ServerAPI\Model\BotdResult */ - public function getData() + public function getData(): ?BotdResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param BotdResult $data data + * @param ?\Fingerprint\ServerAPI\Model\BotdResult $data data * * @return $this */ - public function setData($data) + public function setData(?BotdResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..dfec88dc 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return ProductsResponseIdentificationData + * @return ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData */ - public function getData() + public function getData(): ?ProductsResponseIdentificationData { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param ProductsResponseIdentificationData $data data + * @param ?\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData $data data * * @return $this */ - public function setData($data) + public function setData(?ProductsResponseIdentificationData $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return IdentificationError + * @return ?\Fingerprint\ServerAPI\Model\IdentificationError */ - public function getError() + public function getError(): ?IdentificationError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param IdentificationError $error error + * @param ?\Fingerprint\ServerAPI\Model\IdentificationError $error error * * @return $this */ - public function setError($error) + public function setError(?IdentificationError $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..1bf397fc 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,17 +307,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -345,7 +327,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -354,10 +336,8 @@ public function setRequestId($request_id) /** * Gets browser_details. - * - * @return BrowserDetails */ - public function getBrowserDetails() + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -369,7 +349,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details) + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -378,10 +358,8 @@ public function setBrowserDetails($browser_details) /** * Gets incognito. - * - * @return bool */ - public function getIncognito() + public function getIncognito(): bool { return $this->container['incognito']; } @@ -393,7 +371,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito(bool $incognito): self { $this->container['incognito'] = $incognito; @@ -402,10 +380,8 @@ public function setIncognito($incognito) /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -417,7 +393,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -427,9 +403,9 @@ public function setIp($ip) /** * Gets ip_location. * - * @return DeprecatedIPLocation + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ - public function getIpLocation() + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } @@ -437,11 +413,11 @@ public function getIpLocation() /** * Sets ip_location. * - * @param DeprecatedIPLocation $ip_location ip_location + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ - public function setIpLocation($ip_location) + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -450,10 +426,8 @@ public function setIpLocation($ip_location) /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -465,7 +439,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -474,10 +448,8 @@ public function setTimestamp($timestamp) /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -489,7 +461,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -498,10 +470,8 @@ public function setTime($time) /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -513,7 +483,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -525,7 +495,7 @@ public function setUrl($url) * * @return map[string,object] */ - public function getTag() + public function getTag(): array { return $this->container['tag']; } @@ -537,7 +507,7 @@ public function getTag() * * @return $this */ - public function setTag($tag) + public function setTag(array $tag): self { $this->container['tag'] = $tag; @@ -547,9 +517,9 @@ public function setTag($tag) /** * Gets linked_id. * - * @return string + * @return ?string */ - public function getLinkedId() + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -557,11 +527,11 @@ public function getLinkedId() /** * 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 */ - public function setLinkedId($linked_id) + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -571,9 +541,9 @@ public function setLinkedId($linked_id) /** * Gets confidence. * - * @return Confidence + * @return ?\Fingerprint\ServerAPI\Model\Confidence */ - public function getConfidence() + public function getConfidence(): ?Confidence { return $this->container['confidence']; } @@ -581,11 +551,11 @@ public function getConfidence() /** * Sets confidence. * - * @param Confidence $confidence confidence + * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ - public function setConfidence($confidence) + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -594,10 +564,8 @@ public function setConfidence($confidence) /** * Gets visitor_found. - * - * @return bool */ - public function getVisitorFound() + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -609,7 +577,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found) + public function setVisitorFound(bool $visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -618,10 +586,8 @@ public function setVisitorFound($visitor_found) /** * Gets first_seen_at. - * - * @return SeenAt */ - public function getFirstSeenAt() + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -633,7 +599,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at) + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -642,10 +608,8 @@ public function setFirstSeenAt($first_seen_at) /** * Gets last_seen_at. - * - * @return SeenAt */ - public function getLastSeenAt() + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -657,7 +621,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at) + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -666,10 +630,8 @@ public function setLastSeenAt($last_seen_at) /** * Gets visitor_id. - * - * @return string */ - public function getVisitorId() + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -681,7 +643,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id) + public function setVisitorId(string $visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -692,11 +654,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 +664,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 +676,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 +690,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..0ba7fc50 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -228,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -239,11 +221,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 +231,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 +243,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 +257,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..233734d2 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,9 +172,9 @@ public function getModelName() * * @return array invalid properties with reasons */ - public function listInvalidProperties() + public function listInvalidProperties(): array { - return []; + return parent::listInvalidProperties(); } /** @@ -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..2aa4f347 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,17 +213,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets visitor_id. - * - * @return string */ - public function getVisitorId() + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -251,7 +233,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id) + public function setVisitorId(string $visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -263,7 +245,7 @@ public function setVisitorId($visitor_id) * * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] */ - public function getVisits() + public function getVisits(): array { return $this->container['visits']; } @@ -275,7 +257,7 @@ public function getVisits() * * @return $this */ - public function setVisits($visits) + public function setVisits(array $visits): self { $this->container['visits'] = $visits; @@ -285,9 +267,9 @@ public function setVisits($visits) /** * Gets last_timestamp. * - * @return int + * @return ?int */ - public function getLastTimestamp() + public function getLastTimestamp(): ?int { return $this->container['last_timestamp']; } @@ -295,11 +277,11 @@ public function getLastTimestamp() /** * 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 */ - public function setLastTimestamp($last_timestamp) + public function setLastTimestamp(?int $last_timestamp): self { $this->container['last_timestamp'] = $last_timestamp; @@ -309,9 +291,9 @@ public function setLastTimestamp($last_timestamp) /** * Gets pagination_key. * - * @return string + * @return ?string */ - public function getPaginationKey() + public function getPaginationKey(): ?string { return $this->container['pagination_key']; } @@ -319,11 +301,11 @@ public function getPaginationKey() /** * 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 */ - public function setPaginationKey($pagination_key) + public function setPaginationKey(?string $pagination_key): self { $this->container['pagination_key'] = $pagination_key; @@ -334,11 +316,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 +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; } @@ -362,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; @@ -377,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/ResponseVisits.php b/src/Model/ResponseVisits.php index 36789502..e3b67f55 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,17 +298,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -336,7 +318,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -345,10 +327,8 @@ public function setRequestId($request_id) /** * Gets browser_details. - * - * @return BrowserDetails */ - public function getBrowserDetails() + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -360,7 +340,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details) + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -369,10 +349,8 @@ public function setBrowserDetails($browser_details) /** * Gets incognito. - * - * @return bool */ - public function getIncognito() + public function getIncognito(): bool { return $this->container['incognito']; } @@ -384,7 +362,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito(bool $incognito): self { $this->container['incognito'] = $incognito; @@ -393,10 +371,8 @@ public function setIncognito($incognito) /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -408,7 +384,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -418,9 +394,9 @@ public function setIp($ip) /** * Gets ip_location. * - * @return DeprecatedIPLocation + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ - public function getIpLocation() + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } @@ -428,11 +404,11 @@ public function getIpLocation() /** * Sets ip_location. * - * @param DeprecatedIPLocation $ip_location ip_location + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ - public function setIpLocation($ip_location) + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -441,10 +417,8 @@ public function setIpLocation($ip_location) /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -456,7 +430,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -465,10 +439,8 @@ public function setTimestamp($timestamp) /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -480,7 +452,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -489,10 +461,8 @@ public function setTime($time) /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -504,7 +474,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -516,7 +486,7 @@ public function setUrl($url) * * @return map[string,object] */ - public function getTag() + public function getTag(): array { return $this->container['tag']; } @@ -528,7 +498,7 @@ public function getTag() * * @return $this */ - public function setTag($tag) + public function setTag(array $tag): self { $this->container['tag'] = $tag; @@ -538,9 +508,9 @@ public function setTag($tag) /** * Gets linked_id. * - * @return string + * @return ?string */ - public function getLinkedId() + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -548,11 +518,11 @@ public function getLinkedId() /** * 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 */ - public function setLinkedId($linked_id) + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -562,9 +532,9 @@ public function setLinkedId($linked_id) /** * Gets confidence. * - * @return Confidence + * @return ?\Fingerprint\ServerAPI\Model\Confidence */ - public function getConfidence() + public function getConfidence(): ?Confidence { return $this->container['confidence']; } @@ -572,11 +542,11 @@ public function getConfidence() /** * Sets confidence. * - * @param Confidence $confidence confidence + * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ - public function setConfidence($confidence) + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -585,10 +555,8 @@ public function setConfidence($confidence) /** * Gets visitor_found. - * - * @return bool */ - public function getVisitorFound() + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -600,7 +568,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found) + public function setVisitorFound(bool $visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -609,10 +577,8 @@ public function setVisitorFound($visitor_found) /** * Gets first_seen_at. - * - * @return SeenAt */ - public function getFirstSeenAt() + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -624,7 +590,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at) + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -633,10 +599,8 @@ public function setFirstSeenAt($first_seen_at) /** * Gets last_seen_at. - * - * @return SeenAt */ - public function getLastSeenAt() + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -648,7 +612,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at) + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -659,11 +623,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 +633,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 +645,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 +659,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..6c1c82cf 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -228,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -239,11 +221,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 +231,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 +243,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 +257,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..29de802d 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,17 +199,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets global. - * - * @return \DateTime */ - public function getGlobal() + public function getGlobal(): \DateTime { return $this->container['global']; } @@ -237,7 +219,7 @@ public function getGlobal() * * @return $this */ - public function setGlobal($global) + public function setGlobal(\DateTime $global): self { $this->container['global'] = $global; @@ -246,10 +228,8 @@ public function setGlobal($global) /** * Gets subscription. - * - * @return \DateTime */ - public function getSubscription() + public function getSubscription(): \DateTime { return $this->container['subscription']; } @@ -261,7 +241,7 @@ public function getSubscription() * * @return $this */ - public function setSubscription($subscription) + public function setSubscription(\DateTime $subscription): self { $this->container['subscription'] = $subscription; @@ -272,11 +252,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 +262,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 +274,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 +288,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..0edbcaf2 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return ClonedAppResult + * @return ?\Fingerprint\ServerAPI\Model\ClonedAppResult */ - public function getData() + public function getData(): ?ClonedAppResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param ClonedAppResult $data data + * @param ?\Fingerprint\ServerAPI\Model\ClonedAppResult $data data * * @return $this */ - public function setData($data) + public function setData(?ClonedAppResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..15d6b196 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return EmulatorResult + * @return ?\Fingerprint\ServerAPI\Model\EmulatorResult */ - public function getData() + public function getData(): ?EmulatorResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param EmulatorResult $data data + * @param ?\Fingerprint\ServerAPI\Model\EmulatorResult $data data * * @return $this */ - public function setData($data) + public function setData(?EmulatorResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..95f0737a 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return FactoryResetResult + * @return ?\Fingerprint\ServerAPI\Model\FactoryResetResult */ - public function getData() + public function getData(): ?FactoryResetResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param FactoryResetResult $data data + * @param ?\Fingerprint\ServerAPI\Model\FactoryResetResult $data data * * @return $this */ - public function setData($data) + public function setData(?FactoryResetResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..86aba169 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return FridaResult + * @return ?\Fingerprint\ServerAPI\Model\FridaResult */ - public function getData() + public function getData(): ?FridaResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param FridaResult $data data + * @param ?\Fingerprint\ServerAPI\Model\FridaResult $data data * * @return $this */ - public function setData($data) + public function setData(?FridaResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..9a1e755a 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return HighActivityResult + * @return ?\Fingerprint\ServerAPI\Model\HighActivityResult */ - public function getData() + public function getData(): ?HighActivityResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param HighActivityResult $data data + * @param ?\Fingerprint\ServerAPI\Model\HighActivityResult $data data * * @return $this */ - public function setData($data) + public function setData(?HighActivityResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..561c0eba 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return IncognitoResult + * @return ?\Fingerprint\ServerAPI\Model\IncognitoResult */ - public function getData() + public function getData(): ?IncognitoResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param IncognitoResult $data data + * @param ?\Fingerprint\ServerAPI\Model\IncognitoResult $data data * * @return $this */ - public function setData($data) + public function setData(?IncognitoResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..00a37d29 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return IpBlockListResult + * @return ?\Fingerprint\ServerAPI\Model\IpBlockListResult */ - public function getData() + public function getData(): ?IpBlockListResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param IpBlockListResult $data data + * @param ?\Fingerprint\ServerAPI\Model\IpBlockListResult $data data * * @return $this */ - public function setData($data) + public function setData(?IpBlockListResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..48e5fa40 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return IpInfoResult + * @return ?\Fingerprint\ServerAPI\Model\IpInfoResult */ - public function getData() + public function getData(): ?IpInfoResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param IpInfoResult $data data + * @param ?\Fingerprint\ServerAPI\Model\IpInfoResult $data data * * @return $this */ - public function setData($data) + public function setData(?IpInfoResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..5d33f2fe 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return JailbrokenResult + * @return ?\Fingerprint\ServerAPI\Model\JailbrokenResult */ - public function getData() + public function getData(): ?JailbrokenResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param JailbrokenResult $data data + * @param ?\Fingerprint\ServerAPI\Model\JailbrokenResult $data data * * @return $this */ - public function setData($data) + public function setData(?JailbrokenResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..aef5b071 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return LocationSpoofingResult + * @return ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult */ - public function getData() + public function getData(): ?LocationSpoofingResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param LocationSpoofingResult $data data + * @param ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $data data * * @return $this */ - public function setData($data) + public function setData(?LocationSpoofingResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..a97c78aa 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return PrivacySettingsResult + * @return ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult */ - public function getData() + public function getData(): ?PrivacySettingsResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param PrivacySettingsResult $data data + * @param ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $data data * * @return $this */ - public function setData($data) + public function setData(?PrivacySettingsResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..0f354989 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return ProxyResult + * @return ?\Fingerprint\ServerAPI\Model\ProxyResult */ - public function getData() + public function getData(): ?ProxyResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param ProxyResult $data data + * @param ?\Fingerprint\ServerAPI\Model\ProxyResult $data data * * @return $this */ - public function setData($data) + public function setData(?ProxyResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..b079b123 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return RawDeviceAttributesResult + * @return ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult */ - public function getData() + public function getData(): array { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param RawDeviceAttributesResult $data data + * @param ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $data data * * @return $this */ - public function setData($data) + public function setData(?array $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..d5ed6c79 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return RootAppsResult + * @return ?\Fingerprint\ServerAPI\Model\RootAppsResult */ - public function getData() + public function getData(): ?RootAppsResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param RootAppsResult $data data + * @param ?\Fingerprint\ServerAPI\Model\RootAppsResult $data data * * @return $this */ - public function setData($data) + public function setData(?RootAppsResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..3614acf0 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return SuspectScoreResult + * @return ?\Fingerprint\ServerAPI\Model\SuspectScoreResult */ - public function getData() + public function getData(): ?SuspectScoreResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param SuspectScoreResult $data data + * @param ?\Fingerprint\ServerAPI\Model\SuspectScoreResult $data data * * @return $this */ - public function setData($data) + public function setData(?SuspectScoreResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..4efe22d6 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return TamperingResult + * @return ?\Fingerprint\ServerAPI\Model\TamperingResult */ - public function getData() + public function getData(): ?TamperingResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param TamperingResult $data data + * @param ?\Fingerprint\ServerAPI\Model\TamperingResult $data data * * @return $this */ - public function setData($data) + public function setData(?TamperingResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..06ac9768 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return TorResult + * @return ?\Fingerprint\ServerAPI\Model\TorResult */ - public function getData() + public function getData(): ?TorResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param TorResult $data data + * @param ?\Fingerprint\ServerAPI\Model\TorResult $data data * * @return $this */ - public function setData($data) + public function setData(?TorResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..906eedd2 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return VirtualMachineResult + * @return ?\Fingerprint\ServerAPI\Model\VirtualMachineResult */ - public function getData() + public function getData(): ?VirtualMachineResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param VirtualMachineResult $data data + * @param ?\Fingerprint\ServerAPI\Model\VirtualMachineResult $data data * * @return $this */ - public function setData($data) + public function setData(?VirtualMachineResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..b96d13c5 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets data. * - * @return VpnResult + * @return ?\Fingerprint\ServerAPI\Model\VpnResult */ - public function getData() + public function getData(): ?VpnResult { return $this->container['data']; } @@ -224,11 +208,11 @@ public function getData() /** * Sets data. * - * @param VpnResult $data data + * @param ?\Fingerprint\ServerAPI\Model\VpnResult $data data * * @return $this */ - public function setData($data) + public function setData(?VpnResult $data): self { $this->container['data'] = $data; @@ -238,9 +222,9 @@ public function setData($data) /** * Gets error. * - * @return ProductError + * @return ?\Fingerprint\ServerAPI\Model\ProductError */ - public function getError() + public function getError(): ?ProductError { return $this->container['error']; } @@ -248,11 +232,11 @@ public function getError() /** * Sets error. * - * @param ProductError $error error + * @param ?\Fingerprint\ServerAPI\Model\ProductError $error error * * @return $this */ - public function setError($error) + public function setError(?ProductError $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..0c2835d8 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()); } @@ -214,9 +198,9 @@ public function valid() /** * Gets iso_code. * - * @return string + * @return ?string */ - public function getIsoCode() + public function getIsoCode(): ?string { return $this->container['iso_code']; } @@ -224,11 +208,11 @@ public function getIsoCode() /** * Sets iso_code. * - * @param string $iso_code iso_code + * @param ?string $iso_code iso_code * * @return $this */ - public function setIsoCode($iso_code) + public function setIsoCode(?string $iso_code): self { $this->container['iso_code'] = $iso_code; @@ -238,9 +222,9 @@ public function setIsoCode($iso_code) /** * Gets name. * - * @return string + * @return ?string */ - public function getName() + public function getName(): ?string { return $this->container['name']; } @@ -248,11 +232,11 @@ public function getName() /** * Sets name. * - * @param string $name name + * @param ?string $name name * * @return $this */ - public function setName($name) + public function setName(?string $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..3225bda1 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return int */ - public function getResult() + public function getResult(): int { return $this->container['result']; } @@ -228,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(int $result): self { $this->container['result'] = $result; @@ -239,11 +221,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 +231,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 +243,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 +257,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..e642bcd4 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,17 +199,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -237,7 +219,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -246,10 +228,8 @@ public function setResult($result) /** * Gets anomaly_score. - * - * @return float */ - public function getAnomalyScore() + public function getAnomalyScore(): float { return $this->container['anomaly_score']; } @@ -261,7 +241,7 @@ public function getAnomalyScore() * * @return $this */ - public function setAnomalyScore($anomaly_score) + public function setAnomalyScore(float $anomaly_score): self { $this->container['anomaly_score'] = $anomaly_score; @@ -272,11 +252,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 +262,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 +274,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 +288,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..c09aeaaf 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -228,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -239,11 +221,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 +231,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 +243,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 +257,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..644f9144 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,17 +190,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -228,7 +210,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -239,11 +221,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 +231,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 +243,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 +257,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..dc2e5461 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,17 +298,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -336,7 +318,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -345,10 +327,8 @@ public function setRequestId($request_id) /** * Gets browser_details. - * - * @return BrowserDetails */ - public function getBrowserDetails() + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -360,7 +340,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details) + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -369,10 +349,8 @@ public function setBrowserDetails($browser_details) /** * Gets incognito. - * - * @return bool */ - public function getIncognito() + public function getIncognito(): bool { return $this->container['incognito']; } @@ -384,7 +362,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito(bool $incognito): self { $this->container['incognito'] = $incognito; @@ -393,10 +371,8 @@ public function setIncognito($incognito) /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -408,7 +384,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -418,9 +394,9 @@ public function setIp($ip) /** * Gets ip_location. * - * @return DeprecatedIPLocation + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ - public function getIpLocation() + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } @@ -428,11 +404,11 @@ public function getIpLocation() /** * Sets ip_location. * - * @param DeprecatedIPLocation $ip_location ip_location + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ - public function setIpLocation($ip_location) + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -441,10 +417,8 @@ public function setIpLocation($ip_location) /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -456,7 +430,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -465,10 +439,8 @@ public function setTimestamp($timestamp) /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -480,7 +452,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -489,10 +461,8 @@ public function setTime($time) /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -504,7 +474,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -516,7 +486,7 @@ public function setUrl($url) * * @return map[string,object] */ - public function getTag() + public function getTag(): array { return $this->container['tag']; } @@ -528,7 +498,7 @@ public function getTag() * * @return $this */ - public function setTag($tag) + public function setTag(array $tag): self { $this->container['tag'] = $tag; @@ -538,9 +508,9 @@ public function setTag($tag) /** * Gets linked_id. * - * @return string + * @return ?string */ - public function getLinkedId() + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -548,11 +518,11 @@ public function getLinkedId() /** * 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 */ - public function setLinkedId($linked_id) + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -562,9 +532,9 @@ public function setLinkedId($linked_id) /** * Gets confidence. * - * @return Confidence + * @return ?\Fingerprint\ServerAPI\Model\Confidence */ - public function getConfidence() + public function getConfidence(): ?Confidence { return $this->container['confidence']; } @@ -572,11 +542,11 @@ public function getConfidence() /** * Sets confidence. * - * @param Confidence $confidence confidence + * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ - public function setConfidence($confidence) + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -585,10 +555,8 @@ public function setConfidence($confidence) /** * Gets visitor_found. - * - * @return bool */ - public function getVisitorFound() + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -600,7 +568,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found) + public function setVisitorFound(bool $visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -609,10 +577,8 @@ public function setVisitorFound($visitor_found) /** * Gets first_seen_at. - * - * @return SeenAt */ - public function getFirstSeenAt() + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -624,7 +590,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at) + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -633,10 +599,8 @@ public function setFirstSeenAt($first_seen_at) /** * Gets last_seen_at. - * - * @return SeenAt */ - public function getLastSeenAt() + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -648,7 +612,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at) + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -659,11 +623,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 +633,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 +645,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 +659,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..2b5651e8 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,17 +214,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets result. - * - * @return bool */ - public function getResult() + public function getResult(): bool { return $this->container['result']; } @@ -252,7 +234,7 @@ public function getResult() * * @return $this */ - public function setResult($result) + public function setResult(bool $result): self { $this->container['result'] = $result; @@ -261,10 +243,8 @@ public function setResult($result) /** * Gets origin_timezone. - * - * @return string */ - public function getOriginTimezone() + public function getOriginTimezone(): string { return $this->container['origin_timezone']; } @@ -276,7 +256,7 @@ public function getOriginTimezone() * * @return $this */ - public function setOriginTimezone($origin_timezone) + public function setOriginTimezone(string $origin_timezone): self { $this->container['origin_timezone'] = $origin_timezone; @@ -286,9 +266,9 @@ public function setOriginTimezone($origin_timezone) /** * Gets origin_country. * - * @return string + * @return ?string */ - public function getOriginCountry() + public function getOriginCountry(): ?string { return $this->container['origin_country']; } @@ -296,11 +276,11 @@ public function getOriginCountry() /** * 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 */ - public function setOriginCountry($origin_country) + public function setOriginCountry(?string $origin_country): self { $this->container['origin_country'] = $origin_country; @@ -309,10 +289,8 @@ public function setOriginCountry($origin_country) /** * Gets methods. - * - * @return VpnResultMethods */ - public function getMethods() + public function getMethods(): VpnResultMethods { return $this->container['methods']; } @@ -324,7 +302,7 @@ public function getMethods() * * @return $this */ - public function setMethods($methods) + public function setMethods(VpnResultMethods $methods): self { $this->container['methods'] = $methods; @@ -335,11 +313,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 +323,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 +335,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 +349,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..3c4f1f36 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,17 +208,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets timezone_mismatch. - * - * @return bool */ - public function getTimezoneMismatch() + public function getTimezoneMismatch(): bool { return $this->container['timezone_mismatch']; } @@ -246,7 +228,7 @@ public function getTimezoneMismatch() * * @return $this */ - public function setTimezoneMismatch($timezone_mismatch) + public function setTimezoneMismatch(bool $timezone_mismatch): self { $this->container['timezone_mismatch'] = $timezone_mismatch; @@ -255,10 +237,8 @@ public function setTimezoneMismatch($timezone_mismatch) /** * Gets public_vpn. - * - * @return bool */ - public function getPublicVpn() + public function getPublicVpn(): bool { return $this->container['public_vpn']; } @@ -270,7 +250,7 @@ public function getPublicVpn() * * @return $this */ - public function setPublicVpn($public_vpn) + public function setPublicVpn(bool $public_vpn): self { $this->container['public_vpn'] = $public_vpn; @@ -279,10 +259,8 @@ public function setPublicVpn($public_vpn) /** * Gets auxiliary_mobile. - * - * @return bool */ - public function getAuxiliaryMobile() + public function getAuxiliaryMobile(): bool { return $this->container['auxiliary_mobile']; } @@ -294,7 +272,7 @@ public function getAuxiliaryMobile() * * @return $this */ - public function setAuxiliaryMobile($auxiliary_mobile) + public function setAuxiliaryMobile(bool $auxiliary_mobile): self { $this->container['auxiliary_mobile'] = $auxiliary_mobile; @@ -305,11 +283,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 +293,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 +305,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 +319,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..a71cabf8 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,17 +433,15 @@ public function listInvalidProperties() * * @return bool True if all properties are valid */ - public function valid() + public function valid(): bool { return 0 === count($this->listInvalidProperties()); } /** * Gets visitor_id. - * - * @return string */ - public function getVisitorId() + public function getVisitorId(): string { return $this->container['visitor_id']; } @@ -471,7 +453,7 @@ public function getVisitorId() * * @return $this */ - public function setVisitorId($visitor_id) + public function setVisitorId(string $visitor_id): self { $this->container['visitor_id'] = $visitor_id; @@ -481,9 +463,9 @@ public function setVisitorId($visitor_id) /** * Gets client_referrer. * - * @return string + * @return ?string */ - public function getClientReferrer() + public function getClientReferrer(): ?string { return $this->container['client_referrer']; } @@ -491,11 +473,11 @@ public function getClientReferrer() /** * Sets client_referrer. * - * @param string $client_referrer client_referrer + * @param ?string $client_referrer client_referrer * * @return $this */ - public function setClientReferrer($client_referrer) + public function setClientReferrer(?string $client_referrer): self { $this->container['client_referrer'] = $client_referrer; @@ -505,9 +487,9 @@ public function setClientReferrer($client_referrer) /** * Gets user_agent. * - * @return string + * @return ?string */ - public function getUserAgent() + public function getUserAgent(): ?string { return $this->container['user_agent']; } @@ -515,11 +497,11 @@ public function getUserAgent() /** * Sets user_agent. * - * @param string $user_agent user_agent + * @param ?string $user_agent user_agent * * @return $this */ - public function setUserAgent($user_agent) + public function setUserAgent(?string $user_agent): self { $this->container['user_agent'] = $user_agent; @@ -529,9 +511,9 @@ public function setUserAgent($user_agent) /** * Gets bot. * - * @return BotdDetectionResult + * @return ?\Fingerprint\ServerAPI\Model\BotdDetectionResult */ - public function getBot() + public function getBot(): ?BotdDetectionResult { return $this->container['bot']; } @@ -539,11 +521,11 @@ public function getBot() /** * Sets bot. * - * @param BotdDetectionResult $bot bot + * @param ?\Fingerprint\ServerAPI\Model\BotdDetectionResult $bot bot * * @return $this */ - public function setBot($bot) + public function setBot(?BotdDetectionResult $bot): self { $this->container['bot'] = $bot; @@ -553,9 +535,9 @@ public function setBot($bot) /** * Gets ip_info. * - * @return IpInfoResult + * @return ?\Fingerprint\ServerAPI\Model\IpInfoResult */ - public function getIpInfo() + public function getIpInfo(): ?IpInfoResult { return $this->container['ip_info']; } @@ -563,11 +545,11 @@ public function getIpInfo() /** * Sets ip_info. * - * @param IpInfoResult $ip_info ip_info + * @param ?\Fingerprint\ServerAPI\Model\IpInfoResult $ip_info ip_info * * @return $this */ - public function setIpInfo($ip_info) + public function setIpInfo(?IpInfoResult $ip_info): self { $this->container['ip_info'] = $ip_info; @@ -576,10 +558,8 @@ public function setIpInfo($ip_info) /** * Gets incognito. - * - * @return bool */ - public function getIncognito() + public function getIncognito(): bool { return $this->container['incognito']; } @@ -591,7 +571,7 @@ public function getIncognito() * * @return $this */ - public function setIncognito($incognito) + public function setIncognito(bool $incognito): self { $this->container['incognito'] = $incognito; @@ -601,9 +581,9 @@ public function setIncognito($incognito) /** * Gets root_apps. * - * @return RootAppsResult + * @return ?\Fingerprint\ServerAPI\Model\RootAppsResult */ - public function getRootApps() + public function getRootApps(): ?RootAppsResult { return $this->container['root_apps']; } @@ -611,11 +591,11 @@ public function getRootApps() /** * Sets root_apps. * - * @param RootAppsResult $root_apps root_apps + * @param ?\Fingerprint\ServerAPI\Model\RootAppsResult $root_apps root_apps * * @return $this */ - public function setRootApps($root_apps) + public function setRootApps(?RootAppsResult $root_apps): self { $this->container['root_apps'] = $root_apps; @@ -625,9 +605,9 @@ public function setRootApps($root_apps) /** * Gets emulator. * - * @return EmulatorResult + * @return ?\Fingerprint\ServerAPI\Model\EmulatorResult */ - public function getEmulator() + public function getEmulator(): ?EmulatorResult { return $this->container['emulator']; } @@ -635,11 +615,11 @@ public function getEmulator() /** * Sets emulator. * - * @param EmulatorResult $emulator emulator + * @param ?\Fingerprint\ServerAPI\Model\EmulatorResult $emulator emulator * * @return $this */ - public function setEmulator($emulator) + public function setEmulator(?EmulatorResult $emulator): self { $this->container['emulator'] = $emulator; @@ -649,9 +629,9 @@ public function setEmulator($emulator) /** * Gets cloned_app. * - * @return ClonedAppResult + * @return ?\Fingerprint\ServerAPI\Model\ClonedAppResult */ - public function getClonedApp() + public function getClonedApp(): ?ClonedAppResult { return $this->container['cloned_app']; } @@ -659,11 +639,11 @@ public function getClonedApp() /** * Sets cloned_app. * - * @param ClonedAppResult $cloned_app cloned_app + * @param ?\Fingerprint\ServerAPI\Model\ClonedAppResult $cloned_app cloned_app * * @return $this */ - public function setClonedApp($cloned_app) + public function setClonedApp(?ClonedAppResult $cloned_app): self { $this->container['cloned_app'] = $cloned_app; @@ -673,9 +653,9 @@ public function setClonedApp($cloned_app) /** * Gets factory_reset. * - * @return FactoryResetResult + * @return ?\Fingerprint\ServerAPI\Model\FactoryResetResult */ - public function getFactoryReset() + public function getFactoryReset(): ?FactoryResetResult { return $this->container['factory_reset']; } @@ -683,11 +663,11 @@ public function getFactoryReset() /** * Sets factory_reset. * - * @param FactoryResetResult $factory_reset factory_reset + * @param ?\Fingerprint\ServerAPI\Model\FactoryResetResult $factory_reset factory_reset * * @return $this */ - public function setFactoryReset($factory_reset) + public function setFactoryReset(?FactoryResetResult $factory_reset): self { $this->container['factory_reset'] = $factory_reset; @@ -697,9 +677,9 @@ public function setFactoryReset($factory_reset) /** * Gets jailbroken. * - * @return JailbrokenResult + * @return ?\Fingerprint\ServerAPI\Model\JailbrokenResult */ - public function getJailbroken() + public function getJailbroken(): ?JailbrokenResult { return $this->container['jailbroken']; } @@ -707,11 +687,11 @@ public function getJailbroken() /** * Sets jailbroken. * - * @param JailbrokenResult $jailbroken jailbroken + * @param ?\Fingerprint\ServerAPI\Model\JailbrokenResult $jailbroken jailbroken * * @return $this */ - public function setJailbroken($jailbroken) + public function setJailbroken(?JailbrokenResult $jailbroken): self { $this->container['jailbroken'] = $jailbroken; @@ -721,9 +701,9 @@ public function setJailbroken($jailbroken) /** * Gets frida. * - * @return FridaResult + * @return ?\Fingerprint\ServerAPI\Model\FridaResult */ - public function getFrida() + public function getFrida(): ?FridaResult { return $this->container['frida']; } @@ -731,11 +711,11 @@ public function getFrida() /** * Sets frida. * - * @param FridaResult $frida frida + * @param ?\Fingerprint\ServerAPI\Model\FridaResult $frida frida * * @return $this */ - public function setFrida($frida) + public function setFrida(?FridaResult $frida): self { $this->container['frida'] = $frida; @@ -745,9 +725,9 @@ public function setFrida($frida) /** * Gets ip_blocklist. * - * @return IpBlockListResult + * @return ?\Fingerprint\ServerAPI\Model\IpBlockListResult */ - public function getIpBlocklist() + public function getIpBlocklist(): ?IpBlockListResult { return $this->container['ip_blocklist']; } @@ -755,11 +735,11 @@ public function getIpBlocklist() /** * Sets ip_blocklist. * - * @param IpBlockListResult $ip_blocklist ip_blocklist + * @param ?\Fingerprint\ServerAPI\Model\IpBlockListResult $ip_blocklist ip_blocklist * * @return $this */ - public function setIpBlocklist($ip_blocklist) + public function setIpBlocklist(?IpBlockListResult $ip_blocklist): self { $this->container['ip_blocklist'] = $ip_blocklist; @@ -769,9 +749,9 @@ public function setIpBlocklist($ip_blocklist) /** * Gets tor. * - * @return TorResult + * @return ?\Fingerprint\ServerAPI\Model\TorResult */ - public function getTor() + public function getTor(): ?TorResult { return $this->container['tor']; } @@ -779,11 +759,11 @@ public function getTor() /** * Sets tor. * - * @param TorResult $tor tor + * @param ?\Fingerprint\ServerAPI\Model\TorResult $tor tor * * @return $this */ - public function setTor($tor) + public function setTor(?TorResult $tor): self { $this->container['tor'] = $tor; @@ -793,9 +773,9 @@ public function setTor($tor) /** * Gets privacy_settings. * - * @return PrivacySettingsResult + * @return ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult */ - public function getPrivacySettings() + public function getPrivacySettings(): ?PrivacySettingsResult { return $this->container['privacy_settings']; } @@ -803,11 +783,11 @@ public function getPrivacySettings() /** * Sets privacy_settings. * - * @param PrivacySettingsResult $privacy_settings privacy_settings + * @param ?\Fingerprint\ServerAPI\Model\PrivacySettingsResult $privacy_settings privacy_settings * * @return $this */ - public function setPrivacySettings($privacy_settings) + public function setPrivacySettings(?PrivacySettingsResult $privacy_settings): self { $this->container['privacy_settings'] = $privacy_settings; @@ -817,9 +797,9 @@ public function setPrivacySettings($privacy_settings) /** * Gets virtual_machine. * - * @return VirtualMachineResult + * @return ?\Fingerprint\ServerAPI\Model\VirtualMachineResult */ - public function getVirtualMachine() + public function getVirtualMachine(): ?VirtualMachineResult { return $this->container['virtual_machine']; } @@ -827,11 +807,11 @@ public function getVirtualMachine() /** * Sets virtual_machine. * - * @param VirtualMachineResult $virtual_machine virtual_machine + * @param ?\Fingerprint\ServerAPI\Model\VirtualMachineResult $virtual_machine virtual_machine * * @return $this */ - public function setVirtualMachine($virtual_machine) + public function setVirtualMachine(?VirtualMachineResult $virtual_machine): self { $this->container['virtual_machine'] = $virtual_machine; @@ -841,9 +821,9 @@ public function setVirtualMachine($virtual_machine) /** * Gets vpn. * - * @return VpnResult + * @return ?\Fingerprint\ServerAPI\Model\VpnResult */ - public function getVpn() + public function getVpn(): ?VpnResult { return $this->container['vpn']; } @@ -851,11 +831,11 @@ public function getVpn() /** * Sets vpn. * - * @param VpnResult $vpn vpn + * @param ?\Fingerprint\ServerAPI\Model\VpnResult $vpn vpn * * @return $this */ - public function setVpn($vpn) + public function setVpn(?VpnResult $vpn): self { $this->container['vpn'] = $vpn; @@ -865,9 +845,9 @@ public function setVpn($vpn) /** * Gets proxy. * - * @return ProxyResult + * @return ?\Fingerprint\ServerAPI\Model\ProxyResult */ - public function getProxy() + public function getProxy(): ?ProxyResult { return $this->container['proxy']; } @@ -875,11 +855,11 @@ public function getProxy() /** * Sets proxy. * - * @param ProxyResult $proxy proxy + * @param ?\Fingerprint\ServerAPI\Model\ProxyResult $proxy proxy * * @return $this */ - public function setProxy($proxy) + public function setProxy(?ProxyResult $proxy): self { $this->container['proxy'] = $proxy; @@ -889,9 +869,9 @@ public function setProxy($proxy) /** * Gets tampering. * - * @return TamperingResult + * @return ?\Fingerprint\ServerAPI\Model\TamperingResult */ - public function getTampering() + public function getTampering(): ?TamperingResult { return $this->container['tampering']; } @@ -899,11 +879,11 @@ public function getTampering() /** * Sets tampering. * - * @param TamperingResult $tampering tampering + * @param ?\Fingerprint\ServerAPI\Model\TamperingResult $tampering tampering * * @return $this */ - public function setTampering($tampering) + public function setTampering(?TamperingResult $tampering): self { $this->container['tampering'] = $tampering; @@ -913,9 +893,9 @@ public function setTampering($tampering) /** * Gets raw_device_attributes. * - * @return RawDeviceAttributesResult + * @return ?\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult */ - public function getRawDeviceAttributes() + public function getRawDeviceAttributes(): ?RawDeviceAttributesResult { return $this->container['raw_device_attributes']; } @@ -923,11 +903,11 @@ public function getRawDeviceAttributes() /** * 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 */ - public function setRawDeviceAttributes($raw_device_attributes) + public function setRawDeviceAttributes(?RawDeviceAttributesResult $raw_device_attributes): self { $this->container['raw_device_attributes'] = $raw_device_attributes; @@ -937,9 +917,9 @@ public function setRawDeviceAttributes($raw_device_attributes) /** * Gets high_activity. * - * @return HighActivityResult + * @return ?\Fingerprint\ServerAPI\Model\HighActivityResult */ - public function getHighActivity() + public function getHighActivity(): ?HighActivityResult { return $this->container['high_activity']; } @@ -947,11 +927,11 @@ public function getHighActivity() /** * Sets high_activity. * - * @param HighActivityResult $high_activity high_activity + * @param ?\Fingerprint\ServerAPI\Model\HighActivityResult $high_activity high_activity * * @return $this */ - public function setHighActivity($high_activity) + public function setHighActivity(?HighActivityResult $high_activity): self { $this->container['high_activity'] = $high_activity; @@ -961,9 +941,9 @@ public function setHighActivity($high_activity) /** * Gets location_spoofing. * - * @return LocationSpoofingResult + * @return ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult */ - public function getLocationSpoofing() + public function getLocationSpoofing(): ?LocationSpoofingResult { return $this->container['location_spoofing']; } @@ -971,11 +951,11 @@ public function getLocationSpoofing() /** * Sets location_spoofing. * - * @param LocationSpoofingResult $location_spoofing location_spoofing + * @param ?\Fingerprint\ServerAPI\Model\LocationSpoofingResult $location_spoofing location_spoofing * * @return $this */ - public function setLocationSpoofing($location_spoofing) + public function setLocationSpoofing(?LocationSpoofingResult $location_spoofing): self { $this->container['location_spoofing'] = $location_spoofing; @@ -985,9 +965,9 @@ public function setLocationSpoofing($location_spoofing) /** * Gets suspect_score. * - * @return SuspectScoreResult + * @return ?\Fingerprint\ServerAPI\Model\SuspectScoreResult */ - public function getSuspectScore() + public function getSuspectScore(): ?SuspectScoreResult { return $this->container['suspect_score']; } @@ -995,11 +975,11 @@ public function getSuspectScore() /** * Sets suspect_score. * - * @param SuspectScoreResult $suspect_score suspect_score + * @param ?\Fingerprint\ServerAPI\Model\SuspectScoreResult $suspect_score suspect_score * * @return $this */ - public function setSuspectScore($suspect_score) + public function setSuspectScore(?SuspectScoreResult $suspect_score): self { $this->container['suspect_score'] = $suspect_score; @@ -1008,10 +988,8 @@ public function setSuspectScore($suspect_score) /** * Gets request_id. - * - * @return string */ - public function getRequestId() + public function getRequestId(): string { return $this->container['request_id']; } @@ -1023,7 +1001,7 @@ public function getRequestId() * * @return $this */ - public function setRequestId($request_id) + public function setRequestId(string $request_id): self { $this->container['request_id'] = $request_id; @@ -1032,10 +1010,8 @@ public function setRequestId($request_id) /** * Gets browser_details. - * - * @return BrowserDetails */ - public function getBrowserDetails() + public function getBrowserDetails(): BrowserDetails { return $this->container['browser_details']; } @@ -1047,7 +1023,7 @@ public function getBrowserDetails() * * @return $this */ - public function setBrowserDetails($browser_details) + public function setBrowserDetails(BrowserDetails $browser_details): self { $this->container['browser_details'] = $browser_details; @@ -1056,10 +1032,8 @@ public function setBrowserDetails($browser_details) /** * Gets ip. - * - * @return string */ - public function getIp() + public function getIp(): string { return $this->container['ip']; } @@ -1071,7 +1045,7 @@ public function getIp() * * @return $this */ - public function setIp($ip) + public function setIp(string $ip): self { $this->container['ip'] = $ip; @@ -1081,9 +1055,9 @@ public function setIp($ip) /** * Gets ip_location. * - * @return DeprecatedIPLocation + * @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation */ - public function getIpLocation() + public function getIpLocation(): ?DeprecatedIPLocation { return $this->container['ip_location']; } @@ -1091,11 +1065,11 @@ public function getIpLocation() /** * Sets ip_location. * - * @param DeprecatedIPLocation $ip_location ip_location + * @param ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location * * @return $this */ - public function setIpLocation($ip_location) + public function setIpLocation(?DeprecatedIPLocation $ip_location): self { $this->container['ip_location'] = $ip_location; @@ -1104,10 +1078,8 @@ public function setIpLocation($ip_location) /** * Gets timestamp. - * - * @return int */ - public function getTimestamp() + public function getTimestamp(): int { return $this->container['timestamp']; } @@ -1119,7 +1091,7 @@ public function getTimestamp() * * @return $this */ - public function setTimestamp($timestamp) + public function setTimestamp(int $timestamp): self { $this->container['timestamp'] = $timestamp; @@ -1128,10 +1100,8 @@ public function setTimestamp($timestamp) /** * Gets time. - * - * @return \DateTime */ - public function getTime() + public function getTime(): \DateTime { return $this->container['time']; } @@ -1143,7 +1113,7 @@ public function getTime() * * @return $this */ - public function setTime($time) + public function setTime(\DateTime $time): self { $this->container['time'] = $time; @@ -1152,10 +1122,8 @@ public function setTime($time) /** * Gets url. - * - * @return string */ - public function getUrl() + public function getUrl(): string { return $this->container['url']; } @@ -1167,7 +1135,7 @@ public function getUrl() * * @return $this */ - public function setUrl($url) + public function setUrl(string $url): self { $this->container['url'] = $url; @@ -1179,7 +1147,7 @@ public function setUrl($url) * * @return map[string,object] */ - public function getTag() + public function getTag(): array { return $this->container['tag']; } @@ -1191,7 +1159,7 @@ public function getTag() * * @return $this */ - public function setTag($tag) + public function setTag(array $tag): self { $this->container['tag'] = $tag; @@ -1201,9 +1169,9 @@ public function setTag($tag) /** * Gets linked_id. * - * @return string + * @return ?string */ - public function getLinkedId() + public function getLinkedId(): ?string { return $this->container['linked_id']; } @@ -1211,11 +1179,11 @@ public function getLinkedId() /** * 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 */ - public function setLinkedId($linked_id) + public function setLinkedId(?string $linked_id): self { $this->container['linked_id'] = $linked_id; @@ -1225,9 +1193,9 @@ public function setLinkedId($linked_id) /** * Gets confidence. * - * @return Confidence + * @return ?\Fingerprint\ServerAPI\Model\Confidence */ - public function getConfidence() + public function getConfidence(): ?Confidence { return $this->container['confidence']; } @@ -1235,11 +1203,11 @@ public function getConfidence() /** * Sets confidence. * - * @param Confidence $confidence confidence + * @param ?\Fingerprint\ServerAPI\Model\Confidence $confidence confidence * * @return $this */ - public function setConfidence($confidence) + public function setConfidence(?Confidence $confidence): self { $this->container['confidence'] = $confidence; @@ -1248,10 +1216,8 @@ public function setConfidence($confidence) /** * Gets visitor_found. - * - * @return bool */ - public function getVisitorFound() + public function getVisitorFound(): bool { return $this->container['visitor_found']; } @@ -1263,7 +1229,7 @@ public function getVisitorFound() * * @return $this */ - public function setVisitorFound($visitor_found) + public function setVisitorFound(bool $visitor_found): self { $this->container['visitor_found'] = $visitor_found; @@ -1272,10 +1238,8 @@ public function setVisitorFound($visitor_found) /** * Gets first_seen_at. - * - * @return SeenAt */ - public function getFirstSeenAt() + public function getFirstSeenAt(): SeenAt { return $this->container['first_seen_at']; } @@ -1287,7 +1251,7 @@ public function getFirstSeenAt() * * @return $this */ - public function setFirstSeenAt($first_seen_at) + public function setFirstSeenAt(SeenAt $first_seen_at): self { $this->container['first_seen_at'] = $first_seen_at; @@ -1296,10 +1260,8 @@ public function setFirstSeenAt($first_seen_at) /** * Gets last_seen_at. - * - * @return SeenAt */ - public function getLastSeenAt() + public function getLastSeenAt(): SeenAt { return $this->container['last_seen_at']; } @@ -1311,7 +1273,7 @@ public function getLastSeenAt() * * @return $this */ - public function setLastSeenAt($last_seen_at) + public function setLastSeenAt(SeenAt $last_seen_at): self { $this->container['last_seen_at'] = $last_seen_at; @@ -1322,11 +1284,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 +1294,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 +1306,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 +1320,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..6eaa1a32 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -29,6 +29,8 @@ namespace Fingerprint\ServerAPI; +use Psr\Http\Message\ResponseInterface; + /** * 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; @@ -95,23 +97,6 @@ public static function sanitizeForSerialization($data, $format = null) 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($filename) - { - 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. @@ -120,7 +105,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 +121,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); @@ -145,38 +130,6 @@ public static function toQueryValue($object, $format = null) 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($value) - { - 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($value) - { - 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 @@ -188,7 +141,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); @@ -198,62 +151,55 @@ public static function toString($value, $format = null) } /** - * Serialize an array to a string. + * Deserialize a JSON string into an object. * - * @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 + * @param string $class class name is passed as a string * - * @return string + * @throws \Exception */ - public static function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false) + public static function deserialize(ResponseInterface $response, string $class): mixed { - 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, '', '&')); - } + $data = $response->getBody()->getContents(); + $response->getBody()->rewind(); - switch ($collectionFormat) { - case 'pipes': - return implode('|', $collection); + return self::mapToClass($data, $class, $response); + } - case 'tsv': - return implode("\t", $collection); + 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]; - case 'ssv': - return implode(' ', $collection); + if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { + continue; + } - case 'csv': - // Deliberate fall through. CSV is default format. - default: - return implode(',', $collection); + $propertyValue = $data->{$instance::attributeMap()[$property]}; + if (isset($propertyValue)) { + $instance->{$propertySetter}(self::castData($propertyValue, $type, $response)); + } } + + return $instance; } - /** - * 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 - * - * @throws \Exception - */ - public static function deserialize($data, $class, $httpHeaders = null): mixed + protected static function castData(mixed $data, string $class, ResponseInterface $response): 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, ',')) { $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); } } @@ -263,7 +209,7 @@ public static function deserialize($data, $class, $httpHeaders = null): mixed $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; @@ -305,7 +251,7 @@ public static function deserialize($data, $class, $httpHeaders = null): mixed return (float) $originalData; } if ('string' === $normalizedClass && is_object($data)) { - throw new \Exception('Cannot convert object to string'); + throw new SerializationException($response); } settype($data, $class); @@ -313,7 +259,7 @@ public static function deserialize($data, $class, $httpHeaders = null): mixed return $data; } - throw new \Exception('Serialization error: Could not convert '.gettype($originalData).' to '.$class); + throw new SerializationException($response); } elseif (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues())) { $imploded = implode("', '", $class::getAllowableEnumValues()); @@ -324,20 +270,6 @@ public static function deserialize($data, $class, $httpHeaders = null): mixed 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/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/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/ApiException.mustache b/template/ApiException.mustache index d8b983c9..fe6fd54d 100644 --- a/template/ApiException.mustache +++ b/template/ApiException.mustache @@ -19,6 +19,8 @@ namespace {{invokerPackage}}; use \Exception; +use Fingerprint\ServerAPI\Model\ModelInterface; +use Psr\Http\Message\ResponseInterface; /** * ApiException Class Doc Comment @@ -30,46 +32,35 @@ use \Exception; */ class ApiException extends Exception { + protected ResponseInterface $responseObject; + protected ModelInterface $errorDetails; - /** - * 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; } + + 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/Configuration.mustache b/template/Configuration.mustache index a4249245..f2690a18 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(string $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/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 config = $config ?: new Configuration(); } - /** - * @return Configuration - */ - public function getConfig() + public function getConfig(): Configuration { return $this->config; } @@ -82,14 +75,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}}{{dataType}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): array { $returnType = '{{returnType}}'; $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); @@ -123,14 +114,8 @@ use \GuzzleHttp\Exception\GuzzleException; } {{#returnType}} - $responseBody = $response->getBody()->getContents(); - $response->getBody()->rewind(); - try { - $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); - } catch (\Exception $e) { - throw new SerializationException($response, $e); - } + $serialized = ObjectSerializer::deserialize($response, $returnType); return [$serialized, $response]; {{/returnType}} @@ -139,42 +124,98 @@ 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}} + $errorDetail = ObjectSerializer::deserialize($response, '{{dataType}}'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; {{/dataType}} {{/responses}} + } + throw $e; + } + } + + /** + * 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 + * @throws SerializationException + */ + 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}}); + + 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}} + + $serialized = ObjectSerializer::deserialize($response, $returnType); + + return [$serialized, $response]; + {{/returnType}} + {{^returnType}} + return [null, $response]; + {{/returnType}} + }, + function ($e) { + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + switch ($e->getCode()) { + {{#responses}} + {{#dataType}} + {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + $errorDetail = ObjectSerializer::deserialize($response, '{{dataType}}'); + $e->setErrorDetails($errorDetail); + $e->setResponseObject($response); + break; + {{/dataType}} + {{/responses}} } throw $e; - } catch (\Exception $_) { } - } + ); } /** * 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 - * @return \GuzzleHttp\Psr7\Request + * @throws SerializationException */ - 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}} @@ -340,9 +381,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..0b480bf6 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,10 +246,9 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa /** * Gets {{name}} - * - * @return {{datatype}} + * @return {{^required}}?{{/required}}{{datatype}} */ - public function {{getter}}() + 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}}']; } @@ -269,11 +256,11 @@ 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 */ - public function {{setter}}(${{name}}) + 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(); @@ -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( 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); } diff --git a/test/Sealed/SealedTest.php b/test/Sealed/SealedTest.php index 608394de..6c9dedb7 100644 --- a/test/Sealed/SealedTest.php +++ b/test/Sealed/SealedTest.php @@ -2,11 +2,21 @@ 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; use PHPUnit\Framework\TestCase; 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 */ @@ -24,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), @@ -35,9 +45,11 @@ 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\"}}}}"); - $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)); + $expectedResponse = ObjectSerializer::deserialize($response, EventResponse::class); $eventResponse = Sealed::unsealEventResponse( $sealedResult, @@ -140,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)); + } }