diff --git a/.git_hooks/pre-commit b/.git_hooks/pre-commit new file mode 100755 index 00000000..4dfceeb5 --- /dev/null +++ b/.git_hooks/pre-commit @@ -0,0 +1,3 @@ +#!/bin/sh + +docker run --rm -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:${FIXER_VERSION:-3-php8.3} fix --config=/code/.php-cs-fixer.php /code/src \ No newline at end of file diff --git a/.gitignore b/.gitignore index c54920c8..84ff5e8f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ .vscode .env release/yarn-error.log -release/node_modules \ No newline at end of file +release/node_modules +.php-cs-fixer.cache \ No newline at end of file diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php new file mode 100644 index 00000000..59505d88 --- /dev/null +++ b/.php-cs-fixer.php @@ -0,0 +1,21 @@ +setRules([ + '@PSR12' => true, + '@PhpCsFixer' => true, + 'array_indentation' => true, + 'trailing_comma_in_multiline' => ['elements' => ['arrays']], + 'no_whitespace_before_comma_in_array' => true, + 'whitespace_after_comma_in_array' => true, + 'array_syntax' => ['syntax' => 'short'], + 'binary_operator_spaces' => [ + 'default' => 'single_space', + 'operators' => ['=>' => null], + ], + 'multiline_whitespace_before_semicolons' => false, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__) + ); \ No newline at end of file diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore index 7d61e7c8..9bf2c9b9 100644 --- a/.swagger-codegen-ignore +++ b/.swagger-codegen-ignore @@ -3,4 +3,6 @@ src/phpunit.xml.dist src/.travis.yml src/.php_cs src/git_push.sh -src/test/** \ No newline at end of file +src/test/** +src/HeaderSelector.php +src/ObjectSerializer.php \ No newline at end of file diff --git a/composer.json b/composer.json index b3a04720..61e80160 100644 --- a/composer.json +++ b/composer.json @@ -40,8 +40,7 @@ }, "require-dev": { "phpunit/phpunit": "8.5.33", - "squizlabs/php_codesniffer": "~2.6", - "friendsofphp/php-cs-fixer": "~2.19" + "vlucas/phpdotenv": "^5.6" }, "autoload": { "psr-4": { "Fingerprint\\ServerAPI\\" : "./src" } diff --git a/composer.lock b/composer.lock index c2fd2464..2b131405 100644 --- a/composer.lock +++ b/composer.lock @@ -4,28 +4,28 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "683b80cf00c63b24702815cf520d56ec", + "content-hash": "d252675910c39b945743e945daf6ff88", "packages": [ { "name": "graham-campbell/result-type", - "version": "v1.1.1", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831" + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.1" + "phpoption/phpoption": "^1.9.3" }, "require-dev": { - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "autoload": { @@ -54,7 +54,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" }, "funding": [ { @@ -66,26 +66,26 @@ "type": "tidelift" } ], - "time": "2023-02-25T20:23:15+00:00" + "time": "2024-07-20T21:45:45+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.5.0", + "version": "7.9.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", - "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.9 || ^2.4", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -94,10 +94,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -110,9 +111,6 @@ "bamarni-bin": { "bin-links": true, "forward-command": false - }, - "branch-alias": { - "dev-master": "7.5-dev" } }, "autoload": { @@ -176,38 +174,55 @@ "rest", "web service" ], - "time": "2022-08-28T15:39:27+00:00" + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2024-07-24T11:22:20+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "b94b2807d85443f9719887892882d0329d1e2598" + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", - "reference": "b94b2807d85443f9719887892882d0329d1e2598", + "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -242,20 +257,38 @@ "keywords": [ "promise" ], - "time": "2022-08-28T14:55:35+00:00" + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2024-07-18T10:29:17+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.5.0", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "shasum": "" }, "require": { @@ -269,9 +302,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -342,7 +375,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" + "source": "https://github.com/guzzle/psr7/tree/2.7.0" }, "funding": [ { @@ -358,20 +391,20 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:11:26+00:00" + "time": "2024-07-18T11:15:46+00:00" }, { "name": "phpoption/phpoption", - "version": "1.9.1", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", "shasum": "" }, "require": { @@ -379,13 +412,13 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "1.9-dev" @@ -421,7 +454,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" }, "funding": [ { @@ -433,25 +466,25 @@ "type": "tidelift" } ], - "time": "2023-02-25T19:38:58+00:00" + "time": "2024-07-20T21:41:07+00:00" }, { "name": "psr/http-client", - "version": "1.0.1", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -471,7 +504,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -482,24 +515,27 @@ "psr", "psr-18" ], - "time": "2020-06-29T06:28:15+00:00" + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -523,7 +559,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -535,22 +571,22 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", - "version": "1.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { @@ -559,7 +595,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -574,7 +610,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -588,9 +624,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "ralouphie/getallheaders", @@ -638,25 +674,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -684,20 +720,37 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "time": "2022-01-02T09:53:40+00:00" + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { @@ -711,9 +764,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -749,20 +799,37 @@ "polyfill", "portable" ], - "time": "2022-11-03T14:55:06+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -776,9 +843,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -815,20 +879,37 @@ "portable", "shim" ], - "time": "2022-11-03T14:55:06+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -836,9 +917,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -881,35 +959,52 @@ "portable", "shim" ], - "time": "2022-11-03T14:55:06+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v5.5.0", + "version": "v5.6.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.2", - "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.8", - "symfony/polyfill-ctype": "^1.23", - "symfony/polyfill-mbstring": "^1.23.1", - "symfony/polyfill-php80": "^1.23.1" + "graham-campbell/result-type": "^1.1.3", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "suggest": { "ext-filter": "Required to use the boolean validator." @@ -918,10 +1013,10 @@ "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { - "dev-master": "5.5-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -953,7 +1048,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" }, "funding": [ { @@ -965,41 +1060,41 @@ "type": "tidelift" } ], - "time": "2022-10-16T01:01:54+00:00" + "time": "2024-07-20T21:52:34+00:00" } ], "packages-dev": [ { - "name": "composer/pcre", - "version": "1.0.1", + "name": "doctrine/instantiator", + "version": "1.5.0", "source": { "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5" + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, "autoload": { "psr-4": { - "Composer\\Pcre\\": "src" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1008,572 +1103,180 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" } ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" + "constructor", + "instantiate" ], - "time": "2022-01-21T20:24:37+00:00" - }, - { - "name": "composer/semver", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" }, { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" }, { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" } ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { - "name": "composer/xdebug-handler", - "version": "2.0.5", + "name": "myclabs/deep-copy", + "version": "1.12.0", "source": { "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { - "composer/pcre": "^1", - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1 || ^2 || ^3" + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], "psr-4": { - "Composer\\XdebugHandler\\": "src" + "DeepCopy\\": "src/DeepCopy/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + }, + "funding": [ { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" } ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "time": "2022-02-24T20:20:32+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { - "name": "doctrine/annotations", - "version": "1.14.3", + "name": "phar-io/manifest", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af" + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", - "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { - "doctrine/lexer": "^1 || ^2", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" }, { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" }, { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } ], - "time": "2023-02-01T09:20:38+00:00" + "time": "2024-03-03T12:33:53+00:00" }, { - "name": "doctrine/deprecations", - "version": "v1.0.0", + "name": "phar-io/version", + "version": "3.2.1", "source": { "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": "^7.1|^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "time": "2022-05-02T15:47:09+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2022-12-30T00:15:36+00:00" - }, - { - "name": "doctrine/lexer", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "time": "2022-12-14T08:49:07+00:00" - }, - { - "name": "friendsofphp/php-cs-fixer", - "version": "v2.19.3", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8", - "shasum": "" - }, - "require": { - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.2 || ^2.0", - "doctrine/annotations": "^1.2", - "ext-json": "*", - "ext-tokenizer": "*", - "php": "^5.6 || ^7.0 || ^8.0", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", - "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", - "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0", - "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" - }, - "require-dev": { - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.4", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.4.2", - "php-cs-fixer/accessible-object": "^1.0", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", - "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", - "symfony/phpunit-bridge": "^5.2.1", - "symfony/yaml": "^3.0 || ^4.0 || ^5.0" - }, - "suggest": { - "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." - }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", - "extra": { - "branch-alias": { - "dev-master": "2.19-dev" - } - }, - "autoload": { - "psr-4": { - "PhpCsFixer\\": "src/" - }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/Test/IsIdenticalConstraint.php", - "tests/Test/TokensWithObservedTransformers.php", - "tests/TestCase.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Dariusz RumiƄski", - "email": "dariusz.ruminski@gmail.com" - } - ], - "description": "A tool to automatically fix PHP code style", - "time": "2021-11-15T17:17:55+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2022-03-03T13:19:32+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -1603,72 +1306,24 @@ } ], "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, "time": "2022-02-21T01:04:05+00:00" }, { - "name": "php-cs-fixer/diff", - "version": "v1.3.1", + "name": "phpunit/php-code-coverage", + "version": "7.0.17", "source": { "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "SpacePossum" - } - ], - "description": "sebastian/diff v2 backport support for PHP5.6", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], - "abandoned": true, - "time": "2020-10-14T08:39:05+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "7.0.15", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "819f92bba8b001d4363065928088de22f25a3a48" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", - "reference": "819f92bba8b001d4363065928088de22f25a3a48", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/40a4ed114a4aea5afd6df8d0f0c9cd3033097f66", + "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66", "shasum": "" }, "require": { @@ -1677,1051 +1332,22 @@ "php": ">=7.2", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.3 || ^4.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1.3" - }, - "require-dev": { - "phpunit/phpunit": "^8.2.2" - }, - "suggest": { - "ext-xdebug": "^2.7.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2021-07-26T12:20:09+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "2.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", - "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2021-12-02T12:42:26+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "2.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2020-11-30T08:20:02+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "abandoned": true, - "time": "2020-08-04T08:28:15+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "8.5.33", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", - "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.0", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.2", - "phpunit/php-code-coverage": "^7.0.12", - "phpunit/php-file-iterator": "^2.0.4", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.5", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.5", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "8.5-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2023-02-27T13:04:50+00:00" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "time": "2016-08-06T20:24:11+00:00" - }, - { - "name": "psr/container", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2021-11-05T16:50:12+00:00" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "time": "2019-01-08T18:20:26+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2020-11-30T08:15:22+00:00" - }, - { - "name": "sebastian/comparator", - "version": "3.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", - "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2022-09-14T12:31:48+00:00" - }, - { - "name": "sebastian/diff", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "time": "2020-11-30T07:59:04+00:00" - }, - { - "name": "sebastian/environment", - "version": "4.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2020-11-30T07:53:42+00:00" - }, - { - "name": "sebastian/exporter", - "version": "3.1.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", - "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2022-09-14T06:00:17+00:00" - }, - { - "name": "sebastian/global-state", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921", - "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921", - "shasum": "" - }, - "require": { - "php": ">=7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^8.0" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2022-02-10T06:55:38+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2020-11-30T07:40:27+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2020-11-30T07:37:18+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2020-11-30T07:34:24+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2020-11-30T07:30:19+00:00" - }, - { - "name": "sebastian/type", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", - "shasum": "" - }, - "require": { - "php": ">=7.2" + "phpunit/php-token-stream": "^3.1.3 || ^4.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^4.2.2", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^8.2" + "phpunit/phpunit": "^8.2.2" + }, + "suggest": { + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -2740,26 +1366,44 @@ "role": "lead" } ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "time": "2020-11-30T07:25:11+00:00" + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.17" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:09:37+00:00" }, { - "name": "sebastian/version", - "version": "2.0.1", + "name": "phpunit/php-file-iterator", + "version": "2.0.6", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "69deeb8664f611f156a924154985fbd4911eb36b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/69deeb8664f611f156a924154985fbd4911eb36b", + "reference": "69deeb8664f611f156a924154985fbd4911eb36b", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -2783,68 +1427,45 @@ "role": "lead" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-01T13:39:50+00:00" }, { - "name": "squizlabs/php_codesniffer", - "version": "2.9.2", + "name": "phpunit/php-text-template", + "version": "1.2.1", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "shasum": "" }, "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" + "php": ">=5.3.3" }, - "bin": [ - "scripts/phpcs", - "scripts/phpcbf" - ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, "autoload": { "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2853,915 +1474,978 @@ ], "authors": [ { - "name": "Greg Sherwood", + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", "role": "lead" } ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "phpcs", - "standards" + "template" ], - "time": "2018-11-07T22:31:41+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, + "time": "2015-06-21T13:50:34+00:00" }, { - "name": "symfony/console", - "version": "v5.4.21", + "name": "phpunit/php-timer", + "version": "2.1.4", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "c77433ddc6cdc689caf48065d9ea22ca0853fbd9" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c77433ddc6cdc689caf48065d9ea22ca0853fbd9", - "reference": "c77433ddc6cdc689caf48065d9ea22ca0853fbd9", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/a691211e94ff39a34811abd521c31bd5b305b0bb", + "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" + "php": ">=7.1" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "phpunit/phpunit": "^8.5" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "cli", - "command line", - "console", - "terminal" + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2023-02-25T16:59:41+00:00" + "time": "2024-03-01T13:42:41+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v5.4.21", + "name": "phpunit/php-token-stream", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "f0ae1383a8285dfc6752b8d8602790953118ff5a" + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f0ae1383a8285dfc6752b8d8602790953118ff5a", - "reference": "f0ae1383a8285dfc6752b8d8602790953118ff5a", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "symfony/dependency-injection": "<4.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "ext-tokenizer": "*", + "php": "^7.3 || ^8.0" }, "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "phpunit/phpunit": "^9.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + }, + "funding": [ { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "time": "2023-02-14T08:03:56+00:00" + "abandoned": true, + "time": "2020-08-04T08:28:15+00:00" }, { - "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.2", + "name": "phpunit/phpunit", + "version": "8.5.33", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/event-dispatcher": "^1" + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.4", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.5", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.5", + "sebastian/global-state": "^3.0.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", + "sebastian/version": "^2.0.1" }, "suggest": { - "symfony/event-dispatcher-implementation": "" + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0.0" }, + "bin": [ + "phpunit" + ], "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "8.5-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.33" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2023-02-27T13:04:50+00:00" }, { - "name": "symfony/filesystem", - "version": "v5.4.21", + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/e75960b1bbfd2b8c9e483e0d74811d555ca3de9f", - "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54", + "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" }, "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.3" + }, + "funding": [ { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "time": "2023-02-14T08:03:56+00:00" + "time": "2024-03-01T13:45:45+00:00" }, { - "name": "symfony/finder", - "version": "v5.4.21", + "name": "sebastian/comparator", + "version": "3.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19" + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" } ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "time": "2023-02-16T09:33:00+00:00" + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:31:48+00:00" }, { - "name": "symfony/options-resolver", - "version": "v5.4.21", + "name": "sebastian/diff", + "version": "3.0.6", "source": { "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9" + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/98ff311ca519c3aa73ccd3de053bdb377171d7b6", + "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "config", - "configuration", - "options" + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2024-03-02T06:16:36+00:00" }, { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "name": "sebastian/environment", + "version": "4.2.5", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "56932f6049a0482853056ffd617c91ffcc754205" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/56932f6049a0482853056ffd617c91ffcc754205", + "reference": "56932f6049a0482853056ffd617c91ffcc754205", "shasum": "" }, "require": { "php": ">=7.1" }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, "suggest": { - "ext-intl": "For best performance" + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "4.2-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-03-01T13:49:59+00:00" }, { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "name": "sebastian/exporter", + "version": "3.1.6", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1939bc8fd1d39adcfa88c5b35335910869214c56", + "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2", + "sebastian/recursion-context": "^3.0" }, - "suggest": { - "ext-intl": "For best performance" + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.1.x-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" + "export", + "exporter" ], - "time": "2022-11-03T14:55:06+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:21:38+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", + "name": "sebastian/global-state", + "version": "3.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/91c7c47047a971f02de57ed6f040087ef110c5d9", + "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^8.0" + }, + "suggest": { + "ext-uopz": "*" }, - "type": "metapackage", + "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.5" + }, + "funding": [ { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2024-03-02T06:13:16+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.27.0", + "name": "sebastian/object-enumerator", + "version": "3.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "ac5b293dba925751b808e02923399fb44ff0d541" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/ac5b293dba925751b808e02923399fb44ff0d541", + "reference": "ac5b293dba925751b808e02923399fb44ff0d541", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.0.x-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-03-01T13:54:02+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "name": "sebastian/object-reflector", + "version": "1.1.3", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "1d439c229e61f244ff1f211e5c99737f90c67def" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/1d439c229e61f244ff1f211e5c99737f90c67def", + "reference": "1d439c229e61f244ff1f211e5c99737f90c67def", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "1.1-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-03-01T13:56:04+00:00" }, { - "name": "symfony/process", - "version": "v5.4.21", + "name": "sebastian/recursion-context", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd", - "reference": "d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/9bfd3c6f1f08c026f542032dfb42813544f7d64c", + "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "time": "2023-02-21T19:46:44+00:00" + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-01T14:07:30+00:00" }, { - "name": "symfony/service-contracts", - "version": "v2.5.2", + "name": "sebastian/resource-operations", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/72a7f7674d053d548003b16ff5a106e7e0e06eee", + "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "2.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.3" + }, + "funding": [ { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2022-05-30T19:17:29+00:00" + "time": "2024-03-01T13:59:09+00:00" }, { - "name": "symfony/stopwatch", - "version": "v5.4.21", + "name": "sebastian/type", + "version": "1.1.5", "source": { "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f83692cd869a6f2391691d40a01e8acb89e76fee", - "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/18f071c3a29892b037d35e6b20ddf3ea39b42874", + "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1|^2|^3" + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/1.1.5" + }, + "funding": [ { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Provides a way to profile code", - "homepage": "https://symfony.com", - "time": "2023-02-14T08:03:56+00:00" + "time": "2024-03-01T14:04:07+00:00" }, { - "name": "symfony/string", - "version": "v5.4.21", + "name": "sebastian/version", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "edac10d167b78b1d90f46a80320d632de0bd9f2f" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/edac10d167b78b1d90f46a80320d632de0bd9f2f", - "reference": "edac10d167b78b1d90f46a80320d632de0bd9f2f", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" - }, - "conflict": { - "symfony/translation-contracts": ">=3.0" - }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "php": ">=5.6" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "time": "2023-02-22T08:00:55+00:00" + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, + "time": "2016-10-03T07:35:21+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -3788,7 +2472,17 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2021-07-28T10:34:58+00:00" + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" } ], "aliases": [], @@ -3797,11 +2491,13 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.1", + "php": ">=8.1", "ext-curl": "*", "ext-json": "*", - "ext-mbstring": "*" + "ext-mbstring": "*", + "ext-zlib": "*", + "ext-openssl": "*" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/contributing.md b/contributing.md index 00355047..75717c83 100644 --- a/contributing.md +++ b/contributing.md @@ -5,8 +5,8 @@ Most files in the project are autogenerated by [swagger-codegen](https://swagger.io/tools/swagger-codegen/) for php. - [template](./template) - folder contains redefined templates of `swagger-codegen`. Original templates you can find in [swagger-codegen repo](https://github.com/swagger-api/swagger-codegen/tree/751e59df060b1c3ecf54921e104f2086dfa9f820/modules/swagger-codegen/src/main/resources/php). -- [docs](./docs) - generated documentation for models and [API Client](./docs/Api/FingerprintApi.md). -- [src](./src) - API Client code is generated automatically. +- [docs](./docs) - generated documentation for models and [API Client](docs/Api/FingerprintApi.md). +- [src](./src) - API Client code and generated models. ## Code generation diff --git a/docker-compose.yml b/docker-compose.yml index bef1d6f3..d94eb86e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3' services: composer: - image: composer:1.9.3 + image: composer:2.7 environment: - COMPOSER_CACHE_DIR=/app/.cache/composer volumes: @@ -20,4 +20,10 @@ services: working_dir: /app entrypoint: vendor/bin/phpunit env_file: - - .env \ No newline at end of file + - .env + lint: + image: ghcr.io/php-cs-fixer/php-cs-fixer:${FIXER_VERSION:-3-php8.3} + volumes: + - .:/code + - ./.php-cs-fixer.php:/code/.php-cs-fixer.php + command: fix --config=/code/.php-cs-fixer.php /code/src \ No newline at end of file diff --git a/docs/Api/FingerprintApi.md b/docs/Api/FingerprintApi.md index e9b81abc..14da8e99 100644 --- a/docs/Api/FingerprintApi.md +++ b/docs/Api/FingerprintApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description [**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId # **getEvent** -> \Fingerprint\ServerAPI\Model\EventResponse getEvent($request_id) +> [ \Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface ] getEvent($request_id) Get event by requestId @@ -31,14 +31,14 @@ use GuzzleHttp\Client; $config = Configuration::getDefaultConfiguration(FPJS_API_SECRET, Configuration::REGION_EUROPE); $client = new FingerprintApi( new Client(), - $config +$config ); $request_id = "request_id_example"; // string | The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. try { - $result = $client->getEvent($request_id); - echo "
" . $response->__toString() . "
"; + list($model, $httpResponse) = $client->getEvent($request_id); + echo "
" . $httpResponse->getBody()->getContents() . "
"; } catch (Exception $e) { echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; } @@ -53,7 +53,10 @@ Name | Type | Description | Notes ### Return type -[**\Fingerprint\ServerAPI\Model\EventResponse**](../Model/EventResponse.md) +Array: +0. [**\Fingerprint\ServerAPI\Model\EventResponse**](../Model/EventResponse.md) | null, +1. \Psr\Http\Message\ResponseInterface + ### Authorization @@ -67,7 +70,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getVisits** -> \Fingerprint\ServerAPI\Model\Response getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) +> [ \Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface ] getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) Get visits by visitorId @@ -90,7 +93,7 @@ use GuzzleHttp\Client; $config = Configuration::getDefaultConfiguration(FPJS_API_SECRET, Configuration::REGION_EUROPE); $client = new FingerprintApi( new Client(), - $config +$config ); $visitor_id = "visitor_id_example"; // string | Unique identifier of the visitor issued by Fingerprint Pro. @@ -101,8 +104,8 @@ $pagination_key = "pagination_key_example"; // string | Use `paginationKey` to g $before = 789; // int | ⚠ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. try { - $result = $client->getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - echo "
" . $response->__toString() . "
"; + list($model, $httpResponse) = $client->getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); + echo "
" . $httpResponse->getBody()->getContents() . "
"; } catch (Exception $e) { echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL; } @@ -122,7 +125,10 @@ Name | Type | Description | Notes ### Return type -[**\Fingerprint\ServerAPI\Model\Response**](../Model/Response.md) +Array: +0. [**\Fingerprint\ServerAPI\Model\Response**](../Model/Response.md) | null, +1. \Psr\Http\Message\ResponseInterface + ### Authorization diff --git a/run_checks.php b/run_checks.php index 6244d346..4f5831f2 100644 --- a/run_checks.php +++ b/run_checks.php @@ -1,7 +1,5 @@ getVisits($visitor_id); - fwrite(STDOUT, sprintf("Got visits: %s \n", $result)); + list($result, $response) = $client->getVisits($visitor_id); + 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())); exit(1); } try { - $result = $client->getEvent($request_id); - fwrite(STDOUT, sprintf("Got event: %s \n", $result)); + list($result, $response) = $client->getEvent($request_id); + fwrite(STDOUT, sprintf("\n\nGot event: %s \n", $response->getBody()->getContents())); } catch (Exception $e) { - fwrite(STDERR, sprintf("Exception when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); + fwrite(STDERR, sprintf("\n\nException when calling FingerprintApi->getVisits: %s\n", $e->getMessage())); exit(1); } // Enable the deprecated ArrayAccess return type warning again if needed error_reporting(error_reporting() | E_DEPRECATED); -fwrite(STDOUT, "Checks passed\n"); +fwrite(STDOUT, "\n\nChecks passed\n"); exit(0); diff --git a/scripts/generate.sh b/scripts/generate.sh index 2d88692a..7db1b68e 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -67,3 +67,7 @@ mv -f src/README.md ./README.md mv -f src/composer.json composer.json find ./docs -type f ! -name "DecryptionKey.md" ! -name "Sealed.md" -exec rm {} + mv -f src/docs/* ./docs + +if [ -z "$GITHUB_ACTIONS" ]; then + docker-compose run --rm lint +fi diff --git a/src/Api/FingerprintApi.php b/src/Api/FingerprintApi.php index ea36b13f..31cbbb38 100644 --- a/src/Api/FingerprintApi.php +++ b/src/Api/FingerprintApi.php @@ -1,16 +1,17 @@ client = $client ?: new Client(); $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); } /** @@ -89,274 +73,282 @@ public function getConfig() } /** - * Operation getEvent + * Operation getEvent. * * 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 \Fingerprint\ServerAPI\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fingerprint\ServerAPI\Model\EventResponse - */ - public function getEvent($request_id) - { - list($response) = $this->getEventWithHttpInfo($request_id); - return $response; - } - - /** - * Operation getEventWithHttpInfo - * - * Get event by requestId + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * @return array{ null|\Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface } * - * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response + * @throws ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fingerprint\ServerAPI\Model\EventResponse, HTTP status code, HTTP response headers (array of strings) + * @throws SerializationException + * @throws GuzzleException */ - public function getEventWithHttpInfo($request_id) + public function getEvent($request_id) { $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; $request = $this->getEventRequest($request_id); try { $options = $this->createHttpClientOption(); + try { $response = $this->client->send($request, $options); } catch (RequestException $e) { - throw new ApiException( + $apiException = new ApiException( "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + $e->getCode() ); + $apiException->setResponseObject($e->getResponse()); + + throw $apiException; } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( + $apiException = new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $request->getUri() ), - $statusCode, - $response->getHeaders(), - $response->getBody() + $statusCode ); - } + $apiException->setResponseObject($response); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } + throw $apiException; } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + throw new SerializationException($response, $e); + } + return [$serialized, $response]; } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fingerprint\ServerAPI\Model\EventResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fingerprint\ServerAPI\Model\ErrorEvent403Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fingerprint\ServerAPI\Model\ErrorEvent404Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; + try { + switch ($e->getCode()) { + case 200: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\EventResponse', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 403: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ErrorEvent403Response', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 404: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ErrorEvent404Response', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + } + + throw $e; + } catch (\Exception $_) { } - 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) + * Operation getVisits. * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getEventAsync($request_id) - { - return $this->getEventAsyncWithHttpInfo($request_id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getEventAsyncWithHttpInfo + * Get visits by visitorId * - * Get event by requestId + * @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) * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * @return array{ null|\Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface } * + * @throws ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @throws SerializationException + * @throws GuzzleException */ - public function getEventAsyncWithHttpInfo($request_id) + public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) { - $returnType = '\Fingerprint\ServerAPI\Model\EventResponse'; - $request = $this->getEventRequest($request_id); + $returnType = '\Fingerprint\ServerAPI\Model\Response'; + $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); + + try { + $options = $this->createHttpClientOption(); - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + $apiException = new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode() + ); + $apiException->setResponseObject($e->getResponse()); + + throw $apiException; + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $apiException = new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', $statusCode, - $response->getHeaders(), - $response->getBody() - ); + $request->getUri() + ), + $statusCode + ); + $apiException->setResponseObject($response); + + throw $apiException; + } + + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + throw new SerializationException($response, $e); + } + + return [$serialized, $response]; + } catch (ApiException $e) { + try { + switch ($e->getCode()) { + case 200: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\Response', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 403: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ErrorVisits403', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; + + case 429: + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '\Fingerprint\ServerAPI\Model\ManyRequestsResponse', + $response->getHeaders() + ); + $e->setResponseObject($data); + + break; } - ); + + throw $e; + } catch (\Exception $_) { + } + } } /** - * Create request for operation 'getEvent' + * Create request for operation 'getEvent'. * - * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * @param string $request_id The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. (required) + * + * @return Request * * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request */ protected function getEventRequest($request_id) { // verify the required parameter 'request_id' is set - if ($request_id === null || (is_array($request_id) && count($request_id) === 0)) { + if (null === $request_id || (is_array($request_id) && 0 === count($request_id))) { throw new \InvalidArgumentException( 'Missing the required parameter $request_id when calling getEvent' ); } $resourcePath = '/events/{request_id}'; - $formParams = []; + $headers = []; $queryParams = ['ii' => $this->integration_info]; $headerParams = []; $httpBody = ''; - $multipart = false; - // path params - if ($request_id !== null) { + if (null !== $request_id) { $resourcePath = str_replace( - '{' . 'request_id' . '}', + '{request_id}', ObjectSerializer::toPathValue($request_id), $resourcePath ); } - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = http_build_query($formParams); - } - } - // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if ($apiKey !== null) { + if (null !== $apiKey) { $headers['Auth-API-Key'] = $apiKey; } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if ($apiKey !== null) { + if (null !== $apiKey) { $queryParams['api_key'] = $apiKey; } - $defaultHeaders = []; + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } @@ -368,328 +360,89 @@ protected function getEventRequest($request_id) ); $query = http_build_query($queryParams); + return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), $headers, $httpBody ); } /** - * Operation getVisits - * - * Get visits by visitorId - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fingerprint\ServerAPI\Model\Response - */ - public function getVisits($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) - { - list($response) = $this->getVisitsWithHttpInfo($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - return $response; - } - - /** - * Operation getVisitsWithHttpInfo - * - * Get visits by visitorId - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \Fingerprint\ServerAPI\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fingerprint\ServerAPI\Model\Response, HTTP status code, HTTP response headers (array of strings) - */ - public function getVisitsWithHttpInfo($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) - { - $returnType = '\Fingerprint\ServerAPI\Model\Response'; - $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fingerprint\ServerAPI\Model\Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fingerprint\ServerAPI\Model\ErrorVisits403', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 429: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fingerprint\ServerAPI\Model\ManyRequestsResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getVisitsAsync + * Create request for operation 'getVisits'. * - * Get visits by visitorId - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getVisitsAsync($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) - { - return $this->getVisitsAsyncWithHttpInfo($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getVisitsAsyncWithHttpInfo - * - * Get visits by visitorId - * - * @param string $visitor_id Unique identifier of the visitor issued by Fingerprint Pro. (required) - * @param string $request_id Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. (optional) - * @param string $linked_id Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) - * @param int $limit Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. (optional) - * @param string $pagination_key Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional) - * @param int $before ⚠ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getVisitsAsyncWithHttpInfo($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) - { - $returnType = '\Fingerprint\ServerAPI\Model\Response'; - $request = $this->getVisitsRequest($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * 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) * - * @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 - * @return \GuzzleHttp\Psr7\Request */ protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id = null, $limit = null, $pagination_key = null, $before = null) { // verify the required parameter 'visitor_id' is set - if ($visitor_id === null || (is_array($visitor_id) && count($visitor_id) === 0)) { + if (null === $visitor_id || (is_array($visitor_id) && 0 === count($visitor_id))) { throw new \InvalidArgumentException( 'Missing the required parameter $visitor_id when calling getVisits' ); } $resourcePath = '/visitors/{visitor_id}'; - $formParams = []; + $headers = []; $queryParams = ['ii' => $this->integration_info]; $headerParams = []; $httpBody = ''; - $multipart = false; // query params - if ($request_id !== null) { + if (null !== $request_id) { $queryParams['request_id'] = ObjectSerializer::toQueryValue($request_id, null); } // query params - if ($linked_id !== null) { + if (null !== $linked_id) { $queryParams['linked_id'] = ObjectSerializer::toQueryValue($linked_id, null); } // query params - if ($limit !== null) { + if (null !== $limit) { $queryParams['limit'] = ObjectSerializer::toQueryValue($limit, 'int32'); } // query params - if ($pagination_key !== null) { + if (null !== $pagination_key) { $queryParams['paginationKey'] = ObjectSerializer::toQueryValue($pagination_key, null); } // query params - if ($before !== null) { + if (null !== $before) { $queryParams['before'] = ObjectSerializer::toQueryValue($before, 'int64'); } // path params - if ($visitor_id !== null) { + if (null !== $visitor_id) { $resourcePath = str_replace( - '{' . 'visitor_id' . '}', + '{visitor_id}', ObjectSerializer::toPathValue($visitor_id), $resourcePath ); } - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = http_build_query($formParams); - } - } - // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Auth-API-Key'); - if ($apiKey !== null) { + if (null !== $apiKey) { $headers['Auth-API-Key'] = $apiKey; } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('api_key'); - if ($apiKey !== null) { + if (null !== $apiKey) { $queryParams['api_key'] = $apiKey; } - $defaultHeaders = []; + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } @@ -701,19 +454,21 @@ protected function getVisitsRequest($visitor_id, $request_id = null, $linked_id ); $query = http_build_query($queryParams); + return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), $headers, $httpBody ); } /** - * Create http client option + * Create http client option. * - * @throws \RuntimeException on file opening failure * @return array of http client options + * + * @throws \RuntimeException on file opening failure */ protected function createHttpClientOption() { @@ -721,7 +476,7 @@ protected function createHttpClientOption() if ($this->config->getDebug()) { $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + throw new \RuntimeException('Failed to open the debug file: '.$this->config->getDebugFile()); } } diff --git a/src/ApiException.php b/src/ApiException.php index a2d352c3..846ec390 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -1,16 +1,17 @@ responseHeaders = $responseHeaders; - $this->responseBody = $responseBody; - } - - /** - * Gets the HTTP response header - * - * @return string[]|null HTTP response header - */ - public function getResponseHeaders() - { - return $this->responseHeaders; } /** - * Gets the HTTP body of the server response either as Json or string - * - * @return mixed HTTP body of the server response either as \stdClass or string - */ - public function getResponseBody() - { - return $this->responseBody; - } - - /** - * Sets the deseralized response object (during deserialization) + * Sets the deseralized response object (during deserialization). * * @param mixed $obj Deserialized response object - * - * @return void */ public function setResponseObject($obj) { @@ -109,7 +66,7 @@ public function setResponseObject($obj) } /** - * Gets the deseralized response object (during deserialization) + * Gets the deseralized response object (during deserialization). * * @return mixed the deserialized response object */ diff --git a/src/Configuration.php b/src/Configuration.php index 65a67717..c605ebd1 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -1,16 +1,17 @@ apiKeys[$apiKeyIdentifier] = $key; + return $this; } /** - * Gets API key + * Gets API key. * * @param string $apiKeyIdentifier API key identifier (authentication scheme) * @@ -148,21 +151,22 @@ public function getApiKey($apiKeyIdentifier) } /** - * Sets the prefix for API key (e.g. Bearer) + * Sets the prefix for API key (e.g. Bearer). * * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $prefix API key prefix, e.g. Bearer + * @param string $prefix API key prefix, e.g. Bearer * * @return $this */ public function setApiKeyPrefix($apiKeyIdentifier, $prefix) { $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + return $this; } /** - * Gets API key prefix + * Gets API key prefix. * * @param string $apiKeyIdentifier API key identifier (authentication scheme) * @@ -174,7 +178,7 @@ public function getApiKeyPrefix($apiKeyIdentifier) } /** - * Sets the access token for OAuth + * Sets the access token for OAuth. * * @param string $accessToken Token for OAuth * @@ -183,11 +187,12 @@ public function getApiKeyPrefix($apiKeyIdentifier) public function setAccessToken($accessToken) { $this->accessToken = $accessToken; + return $this; } /** - * Gets the access token for OAuth + * Gets the access token for OAuth. * * @return string Access token for OAuth */ @@ -197,7 +202,7 @@ public function getAccessToken() } /** - * Sets the username for HTTP basic authentication + * Sets the username for HTTP basic authentication. * * @param string $username Username for HTTP basic authentication * @@ -206,11 +211,12 @@ public function getAccessToken() public function setUsername($username) { $this->username = $username; + return $this; } /** - * Gets the username for HTTP basic authentication + * Gets the username for HTTP basic authentication. * * @return string Username for HTTP basic authentication */ @@ -220,7 +226,7 @@ public function getUsername() } /** - * Sets the password for HTTP basic authentication + * Sets the password for HTTP basic authentication. * * @param string $password Password for HTTP basic authentication * @@ -229,11 +235,12 @@ public function getUsername() public function setPassword($password) { $this->password = $password; + return $this; } /** - * Gets the password for HTTP basic authentication + * Gets the password for HTTP basic authentication. * * @return string Password for HTTP basic authentication */ @@ -243,7 +250,7 @@ public function getPassword() } /** - * Sets the host + * Sets the host. * * @param string $host Host * @@ -252,11 +259,12 @@ public function getPassword() public function setHost($host) { $this->host = $host; + return $this; } /** - * Gets the host + * Gets the host. * * @return string Host */ @@ -266,26 +274,30 @@ public function getHost() } /** - * @param $region * @return $this */ public function setRegion($region = self::REGION_GLOBAL) { switch (trim(strtolower($region))) { case self::REGION_ASIA: - case "as": - case "asia": + case 'as': + case 'asia': $this->setHost(self::REGION_ASIA); + break; + case self::REGION_EUROPE: - case "eu": - case "europe": + case 'eu': + case 'europe': $this->setHost(self::REGION_EUROPE); + break; + default: case self::REGION_GLOBAL: - case "global": + case 'global': $this->setHost(self::REGION_GLOBAL); + break; } @@ -293,11 +305,12 @@ public function setRegion($region = self::REGION_GLOBAL) } /** - * Sets the user agent of the api client + * Sets the user agent of the api client. * * @param string $userAgent the user agent of the api client * * @return $this + * * @throws \InvalidArgumentException */ public function setUserAgent($userAgent) @@ -307,11 +320,12 @@ public function setUserAgent($userAgent) } $this->userAgent = $userAgent; + return $this; } /** - * Gets the user agent of the api client + * Gets the user agent of the api client. * * @return string user agent */ @@ -321,7 +335,7 @@ public function getUserAgent() } /** - * Sets debug flag + * Sets debug flag. * * @param bool $debug Debug flag * @@ -330,11 +344,12 @@ public function getUserAgent() public function setDebug($debug) { $this->debug = $debug; + return $this; } /** - * Gets the debug flag + * Gets the debug flag. * * @return bool */ @@ -344,7 +359,7 @@ public function getDebug() } /** - * Sets the debug file + * Sets the debug file. * * @param string $debugFile Debug file * @@ -353,11 +368,12 @@ public function getDebug() public function setDebugFile($debugFile) { $this->debugFile = $debugFile; + return $this; } /** - * Gets the debug file + * Gets the debug file. * * @return string */ @@ -367,7 +383,7 @@ public function getDebugFile() } /** - * Sets the temp folder path + * Sets the temp folder path. * * @param string $tempFolderPath Temp folder path * @@ -376,11 +392,12 @@ public function getDebugFile() public function setTempFolderPath($tempFolderPath) { $this->tempFolderPath = $tempFolderPath; + return $this; } /** - * Gets the temp folder path + * Gets the temp folder path. * * @return string Temp folder path */ @@ -390,15 +407,13 @@ public function getTempFolderPath() } /** - * Gets the default configuration instance, with apiKey and host params + * Gets the default configuration instance, with apiKey and host params. * - * @param $api_key - * @param $region * @return Configuration */ public static function getDefaultConfiguration($api_key = null, $region = self::REGION_GLOBAL) { - if (self::$defaultConfiguration === null) { + if (null === self::$defaultConfiguration) { self::$defaultConfiguration = new Configuration(); } @@ -409,11 +424,9 @@ public static function getDefaultConfiguration($api_key = null, $region = self:: } /** - * Sets the detault configuration instance + * Sets the detault configuration instance. * * @param Configuration $config An instance of the Configuration Object - * - * @return void */ public static function setDefaultConfiguration(Configuration $config) { @@ -421,24 +434,24 @@ public static function setDefaultConfiguration(Configuration $config) } /** - * Gets the essential information for debugging + * Gets the essential information for debugging. * * @return string The report for debugging */ public static function toDebugReport() { - $report = 'PHP SDK (Fingerprint\ServerAPI) Debug Report:' . PHP_EOL; - $report .= ' OS: ' . php_uname() . PHP_EOL; - $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' OpenAPI Spec Version: 3' . PHP_EOL; - $report .= ' SDK Package Version: 4.1.0' . PHP_EOL; - $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; + $report = 'PHP SDK (Fingerprint\ServerAPI) Debug Report:'.PHP_EOL; + $report .= ' OS: '.php_uname().PHP_EOL; + $report .= ' PHP Version: '.PHP_VERSION.PHP_EOL; + $report .= ' OpenAPI Spec Version: 3'.PHP_EOL; + $report .= ' SDK Package Version: 4.1.0'.PHP_EOL; + $report .= ' Temp Folder Path: '.self::getDefaultConfiguration()->getTempFolderPath().PHP_EOL; return $report; } /** - * Get API key (with prefix if set) + * Get API key (with prefix if set). * * @param string $apiKeyIdentifier name of apikey * @@ -449,16 +462,16 @@ public function getApiKeyWithPrefix($apiKeyIdentifier) $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); $apiKey = $this->getApiKey($apiKeyIdentifier); - if ($apiKey === null) { + if (null === $apiKey) { return null; } - if ($prefix === null) { + if (null === $prefix) { $keyWithPrefix = $apiKey; } else { - $keyWithPrefix = $prefix . ' ' . $apiKey; + $keyWithPrefix = $prefix.' '.$apiKey; } return $keyWithPrefix; } -} \ No newline at end of file +} diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php deleted file mode 100644 index 04b45bc7..00000000 --- a/src/HeaderSelector.php +++ /dev/null @@ -1,109 +0,0 @@ -selectAcceptHeader($accept); - if ($accept !== null) { - $headers['Accept'] = $accept; - } - - $headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes); - return $headers; - } - - /** - * @param string[] $accept - * @return array - */ - public function selectHeadersForMultipart($accept) - { - $headers = $this->selectHeaders($accept, []); - - unset($headers['Content-Type']); - return $headers; - } - - /** - * Return the header 'Accept' based on an array of Accept provided - * - * @param string[] $accept Array of header - * - * @return string Accept (e.g. application/json) - */ - private function selectAcceptHeader($accept) - { - if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) { - return null; - } elseif (preg_grep("/application\/json/i", $accept)) { - return 'application/json'; - } else { - return implode(',', $accept); - } - } - - /** - * Return the content type based on an array of content-type provided - * - * @param string[] $contentType Array fo content-type - * - * @return string Content-Type (e.g. application/json) - */ - private function selectContentTypeHeader($contentType) - { - if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) { - return 'application/json'; - } elseif (preg_grep("/application\/json/i", $contentType)) { - return 'application/json'; - } else { - return implode(',', $contentType); - } - } -} - diff --git a/src/Model/ASN.php b/src/Model/ASN.php index c455a809..850ad69d 100644 --- a/src/Model/ASN.php +++ b/src/Model/ASN.php @@ -1,17 +1,16 @@ 'string', -'network' => 'string', -'name' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'asn' => null, -'network' => null, -'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'asn' => 'string', + 'network' => 'string', + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'asn' => null, + 'network' => null, + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'asn' => 'asn', -'network' => 'network', -'name' => 'name' ]; + 'network' => 'network', + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'asn' => 'setAsn', -'network' => 'setNetwork', -'name' => 'setName' ]; + 'network' => 'setNetwork', + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'asn' => 'getAsn', -'network' => 'getNetwork', -'name' => 'getName' ]; + 'network' => 'getNetwork', + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['network'] = isset($data['network']) ? $data['network'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -133,7 +167,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -143,7 +177,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -162,28 +196,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; - $this->container['network'] = isset($data['network']) ? $data['network'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -193,29 +205,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['asn'] === null) { + if (null === $this->container['asn']) { $invalidProperties[] = "'asn' can't be null"; } - if ($this->container['network'] === null) { + if (null === $this->container['network']) { $invalidProperties[] = "'network' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets asn + * Gets asn. * * @return string */ @@ -225,7 +237,7 @@ public function getAsn() } /** - * Sets asn + * Sets asn. * * @param string $asn asn * @@ -239,7 +251,7 @@ public function setAsn($asn) } /** - * Gets network + * Gets network. * * @return string */ @@ -249,7 +261,7 @@ public function getNetwork() } /** - * Sets network + * Sets network. * * @param string $network network * @@ -263,7 +275,7 @@ public function setNetwork($network) } /** - * Gets name + * Gets name. * * @return string */ @@ -273,7 +285,7 @@ public function getName() } /** - * Sets name + * Sets name. * * @param string $name name * @@ -285,12 +297,13 @@ public function setName($name) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -301,7 +314,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -314,10 +327,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -332,30 +343,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/BotdDetectionResult.php b/src/Model/BotdDetectionResult.php index 01f6e0d4..1e02803a 100644 --- a/src/Model/BotdDetectionResult.php +++ b/src/Model/BotdDetectionResult.php @@ -1,17 +1,16 @@ 'string', -'type' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'result' => null, -'type' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'result' => 'string', + 'type' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'result' => null, + 'type' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'result' => 'result', -'type' => 'type' ]; + 'type' => 'type']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'result' => 'setResult', -'type' => 'setType' ]; + 'type' => 'setType']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'result' => 'getResult', -'type' => 'getType' ]; + 'type' => 'getType']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -129,7 +167,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -139,7 +177,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -158,12 +196,8 @@ public function getModelName() return self::$swaggerModelName; } - const RESULT_NOT_DETECTED = 'notDetected'; -const RESULT_GOOD = 'good'; -const RESULT_BAD = 'bad'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -171,27 +205,8 @@ public function getResultAllowableValues() { return [ self::RESULT_NOT_DETECTED, -self::RESULT_GOOD, -self::RESULT_BAD, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['type'] = isset($data['type']) ? $data['type'] : null; + self::RESULT_GOOD, + self::RESULT_BAD, ]; } /** @@ -203,7 +218,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } $allowedValues = $this->getResultAllowableValues(); @@ -219,18 +234,17 @@ public function listInvalidProperties() /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return string */ @@ -240,7 +254,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param string $result Bot detection result: * `notDetected` - the visitor is not a bot * `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on * `bad` - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on * @@ -263,7 +277,7 @@ public function setResult($result) } /** - * Gets type + * Gets type. * * @return string */ @@ -273,7 +287,7 @@ public function getType() } /** - * Sets type + * Sets type. * * @param string $type type * @@ -285,12 +299,13 @@ public function setType($type) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -301,7 +316,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -314,10 +329,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -332,30 +345,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/BotdResult.php b/src/Model/BotdResult.php index 5d2c2b94..24083d55 100644 --- a/src/Model/BotdResult.php +++ b/src/Model/BotdResult.php @@ -1,17 +1,16 @@ 'string', -'time' => '\DateTime', -'url' => 'string', -'user_agent' => 'string', -'request_id' => 'string', -'linked_id' => 'string', -'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'ip' => 'ipv4', -'time' => 'date-time', -'url' => null, -'user_agent' => null, -'request_id' => null, -'linked_id' => null, -'bot' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'ip' => 'string', + 'time' => '\DateTime', + 'url' => 'string', + 'user_agent' => 'string', + 'request_id' => 'string', + 'linked_id' => 'string', + 'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'ip' => 'ipv4', + 'time' => 'date-time', + 'url' => null, + 'user_agent' => null, + 'request_id' => null, + 'linked_id' => null, + 'bot' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'ip' => 'ip', -'time' => 'time', -'url' => 'url', -'user_agent' => 'userAgent', -'request_id' => 'requestId', -'linked_id' => 'linkedId', -'bot' => 'bot' ]; + 'time' => 'time', + 'url' => 'url', + 'user_agent' => 'userAgent', + 'request_id' => 'requestId', + 'linked_id' => 'linkedId', + 'bot' => 'bot']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'ip' => 'setIp', -'time' => 'setTime', -'url' => 'setUrl', -'user_agent' => 'setUserAgent', -'request_id' => 'setRequestId', -'linked_id' => 'setLinkedId', -'bot' => 'setBot' ]; + 'time' => 'setTime', + 'url' => 'setUrl', + 'user_agent' => 'setUserAgent', + 'request_id' => 'setRequestId', + 'linked_id' => 'setLinkedId', + 'bot' => 'setBot']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'ip' => 'getIp', -'time' => 'getTime', -'url' => 'getUrl', -'user_agent' => 'getUserAgent', -'request_id' => 'getRequestId', -'linked_id' => 'getLinkedId', -'bot' => 'getBot' ]; + 'time' => 'getTime', + 'url' => 'getUrl', + 'user_agent' => 'getUserAgent', + 'request_id' => 'getRequestId', + 'linked_id' => 'getLinkedId', + 'bot' => 'getBot']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['bot'] = isset($data['bot']) ? $data['bot'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -154,7 +193,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -164,7 +203,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -183,32 +222,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['bot'] = isset($data['bot']) ? $data['bot'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -218,41 +231,41 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['user_agent'] === null) { + if (null === $this->container['user_agent']) { $invalidProperties[] = "'user_agent' can't be null"; } - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['bot'] === null) { + if (null === $this->container['bot']) { $invalidProperties[] = "'bot' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets ip + * Gets ip. * * @return string */ @@ -262,9 +275,9 @@ public function getIp() } /** - * Sets ip + * Sets ip. * - * @param string $ip IP address of the requesting browser or bot. + * @param string $ip IP address of the requesting browser or bot * * @return $this */ @@ -276,7 +289,7 @@ public function setIp($ip) } /** - * Gets time + * Gets time. * * @return \DateTime */ @@ -286,7 +299,7 @@ public function getTime() } /** - * Sets time + * Sets time. * * @param \DateTime $time Time in UTC when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible * @@ -300,7 +313,7 @@ public function setTime($time) } /** - * Gets url + * Gets url. * * @return string */ @@ -310,9 +323,9 @@ public function getUrl() } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which identification request was sent. + * @param string $url page URL from which identification request was sent * * @return $this */ @@ -324,7 +337,7 @@ public function setUrl($url) } /** - * Gets user_agent + * Gets user_agent. * * @return string */ @@ -334,7 +347,7 @@ public function getUserAgent() } /** - * Sets user_agent + * Sets user_agent. * * @param string $user_agent user_agent * @@ -348,7 +361,7 @@ public function setUserAgent($user_agent) } /** - * Gets request_id + * Gets request_id. * * @return string */ @@ -358,7 +371,7 @@ public function getRequestId() } /** - * Sets request_id + * Sets request_id. * * @param string $request_id request_id * @@ -372,7 +385,7 @@ public function setRequestId($request_id) } /** - * Gets linked_id + * Gets linked_id. * * @return string */ @@ -382,7 +395,7 @@ public function getLinkedId() } /** - * Sets linked_id + * Sets linked_id. * * @param string $linked_id linked_id * @@ -396,9 +409,9 @@ public function setLinkedId($linked_id) } /** - * Gets bot + * Gets bot. * - * @return \Fingerprint\ServerAPI\Model\BotdDetectionResult + * @return BotdDetectionResult */ public function getBot() { @@ -406,9 +419,9 @@ public function getBot() } /** - * Sets bot + * Sets bot. * - * @param \Fingerprint\ServerAPI\Model\BotdDetectionResult $bot bot + * @param BotdDetectionResult $bot bot * * @return $this */ @@ -418,12 +431,13 @@ public function setBot($bot) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -434,7 +448,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -447,10 +461,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -465,30 +477,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/BrowserDetails.php b/src/Model/BrowserDetails.php index f92c3853..2c49a252 100644 --- a/src/Model/BrowserDetails.php +++ b/src/Model/BrowserDetails.php @@ -1,17 +1,16 @@ 'string', -'browser_major_version' => 'string', -'browser_full_version' => 'string', -'os' => 'string', -'os_version' => 'string', -'device' => 'string', -'user_agent' => 'string', -'bot_probability' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'browser_name' => null, -'browser_major_version' => null, -'browser_full_version' => null, -'os' => null, -'os_version' => null, -'device' => null, -'user_agent' => null, -'bot_probability' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'browser_name' => 'string', + 'browser_major_version' => 'string', + 'browser_full_version' => 'string', + 'os' => 'string', + 'os_version' => 'string', + 'device' => 'string', + 'user_agent' => 'string', + 'bot_probability' => 'int']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'browser_name' => null, + 'browser_major_version' => null, + 'browser_full_version' => null, + 'os' => null, + 'os_version' => null, + 'device' => null, + 'user_agent' => null, + 'bot_probability' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'browser_name' => 'browserName', -'browser_major_version' => 'browserMajorVersion', -'browser_full_version' => 'browserFullVersion', -'os' => 'os', -'os_version' => 'osVersion', -'device' => 'device', -'user_agent' => 'userAgent', -'bot_probability' => 'botProbability' ]; + 'browser_major_version' => 'browserMajorVersion', + 'browser_full_version' => 'browserFullVersion', + 'os' => 'os', + 'os_version' => 'osVersion', + 'device' => 'device', + 'user_agent' => 'userAgent', + 'bot_probability' => 'botProbability']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'browser_name' => 'setBrowserName', -'browser_major_version' => 'setBrowserMajorVersion', -'browser_full_version' => 'setBrowserFullVersion', -'os' => 'setOs', -'os_version' => 'setOsVersion', -'device' => 'setDevice', -'user_agent' => 'setUserAgent', -'bot_probability' => 'setBotProbability' ]; + 'browser_major_version' => 'setBrowserMajorVersion', + 'browser_full_version' => 'setBrowserFullVersion', + 'os' => 'setOs', + 'os_version' => 'setOsVersion', + 'device' => 'setDevice', + 'user_agent' => 'setUserAgent', + 'bot_probability' => 'setBotProbability']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'browser_name' => 'getBrowserName', -'browser_major_version' => 'getBrowserMajorVersion', -'browser_full_version' => 'getBrowserFullVersion', -'os' => 'getOs', -'os_version' => 'getOsVersion', -'device' => 'getDevice', -'user_agent' => 'getUserAgent', -'bot_probability' => 'getBotProbability' ]; + 'browser_major_version' => 'getBrowserMajorVersion', + 'browser_full_version' => 'getBrowserFullVersion', + 'os' => 'getOs', + 'os_version' => 'getOsVersion', + 'device' => 'getDevice', + 'user_agent' => 'getUserAgent', + 'bot_probability' => 'getBotProbability']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['browser_name'] = isset($data['browser_name']) ? $data['browser_name'] : null; + $this->container['browser_major_version'] = isset($data['browser_major_version']) ? $data['browser_major_version'] : null; + $this->container['browser_full_version'] = isset($data['browser_full_version']) ? $data['browser_full_version'] : null; + $this->container['os'] = isset($data['os']) ? $data['os'] : null; + $this->container['os_version'] = isset($data['os_version']) ? $data['os_version'] : null; + $this->container['device'] = isset($data['device']) ? $data['device'] : null; + $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; + $this->container['bot_probability'] = isset($data['bot_probability']) ? $data['bot_probability'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -158,7 +197,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -168,7 +207,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -187,33 +226,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['browser_name'] = isset($data['browser_name']) ? $data['browser_name'] : null; - $this->container['browser_major_version'] = isset($data['browser_major_version']) ? $data['browser_major_version'] : null; - $this->container['browser_full_version'] = isset($data['browser_full_version']) ? $data['browser_full_version'] : null; - $this->container['os'] = isset($data['os']) ? $data['os'] : null; - $this->container['os_version'] = isset($data['os_version']) ? $data['os_version'] : null; - $this->container['device'] = isset($data['device']) ? $data['device'] : null; - $this->container['user_agent'] = isset($data['user_agent']) ? $data['user_agent'] : null; - $this->container['bot_probability'] = isset($data['bot_probability']) ? $data['bot_probability'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -223,44 +235,44 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['browser_name'] === null) { + if (null === $this->container['browser_name']) { $invalidProperties[] = "'browser_name' can't be null"; } - if ($this->container['browser_major_version'] === null) { + if (null === $this->container['browser_major_version']) { $invalidProperties[] = "'browser_major_version' can't be null"; } - if ($this->container['browser_full_version'] === null) { + if (null === $this->container['browser_full_version']) { $invalidProperties[] = "'browser_full_version' can't be null"; } - if ($this->container['os'] === null) { + if (null === $this->container['os']) { $invalidProperties[] = "'os' can't be null"; } - if ($this->container['os_version'] === null) { + if (null === $this->container['os_version']) { $invalidProperties[] = "'os_version' can't be null"; } - if ($this->container['device'] === null) { + if (null === $this->container['device']) { $invalidProperties[] = "'device' can't be null"; } - if ($this->container['user_agent'] === null) { + if (null === $this->container['user_agent']) { $invalidProperties[] = "'user_agent' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets browser_name + * Gets browser_name. * * @return string */ @@ -270,7 +282,7 @@ public function getBrowserName() } /** - * Sets browser_name + * Sets browser_name. * * @param string $browser_name browser_name * @@ -284,7 +296,7 @@ public function setBrowserName($browser_name) } /** - * Gets browser_major_version + * Gets browser_major_version. * * @return string */ @@ -294,7 +306,7 @@ public function getBrowserMajorVersion() } /** - * Sets browser_major_version + * Sets browser_major_version. * * @param string $browser_major_version browser_major_version * @@ -308,7 +320,7 @@ public function setBrowserMajorVersion($browser_major_version) } /** - * Gets browser_full_version + * Gets browser_full_version. * * @return string */ @@ -318,7 +330,7 @@ public function getBrowserFullVersion() } /** - * Sets browser_full_version + * Sets browser_full_version. * * @param string $browser_full_version browser_full_version * @@ -332,7 +344,7 @@ public function setBrowserFullVersion($browser_full_version) } /** - * Gets os + * Gets os. * * @return string */ @@ -342,7 +354,7 @@ public function getOs() } /** - * Sets os + * Sets os. * * @param string $os os * @@ -356,7 +368,7 @@ public function setOs($os) } /** - * Gets os_version + * Gets os_version. * * @return string */ @@ -366,7 +378,7 @@ public function getOsVersion() } /** - * Sets os_version + * Sets os_version. * * @param string $os_version os_version * @@ -380,7 +392,7 @@ public function setOsVersion($os_version) } /** - * Gets device + * Gets device. * * @return string */ @@ -390,7 +402,7 @@ public function getDevice() } /** - * Sets device + * Sets device. * * @param string $device device * @@ -404,7 +416,7 @@ public function setDevice($device) } /** - * Gets user_agent + * Gets user_agent. * * @return string */ @@ -414,7 +426,7 @@ public function getUserAgent() } /** - * Sets user_agent + * Sets user_agent. * * @param string $user_agent user_agent * @@ -428,7 +440,7 @@ public function setUserAgent($user_agent) } /** - * Gets bot_probability + * Gets bot_probability. * * @return int */ @@ -438,7 +450,7 @@ public function getBotProbability() } /** - * Sets bot_probability + * Sets bot_probability. * * @param int $bot_probability bot_probability * @@ -450,12 +462,13 @@ public function setBotProbability($bot_probability) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -466,7 +479,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -479,10 +492,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -497,30 +508,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ClonedAppResult.php b/src/Model/ClonedAppResult.php index 506d0e11..f0b84ebe 100644 --- a/src/Model/ClonedAppResult.php +++ b/src/Model/ClonedAppResult.php @@ -1,17 +1,16 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -210,7 +222,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result Android specific cloned application detection. There are 2 values: ‱ `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). ‱ `false` - No signs of cloned application detected or the client is not Android. * @@ -222,12 +234,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Confidence.php b/src/Model/Confidence.php index 8d429199..4156b5c9 100644 --- a/src/Model/Confidence.php +++ b/src/Model/Confidence.php @@ -1,17 +1,16 @@ 'float' ]; + 'score' => 'float']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'score' => 'float' ]; + 'score' => 'float']; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'score' => 'score']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'score' => 'setScore']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'score' => 'getScore']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['score'] = isset($data['score']) ? $data['score'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'score' => 'score' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'score' => 'setScore' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'score' => 'getScore' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['score'] = isset($data['score']) ? $data['score'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['score'] === null) { + if (null === $this->container['score']) { $invalidProperties[] = "'score' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets score + * Gets score. * * @return float */ @@ -210,9 +222,9 @@ public function getScore() } /** - * Sets score + * Sets score. * - * @param float $score The confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification. + * @param float $score the confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification * * @return $this */ @@ -222,12 +234,13 @@ public function setScore($score) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/DataCenter.php b/src/Model/DataCenter.php index 2a0fa7ac..e2f62094 100644 --- a/src/Model/DataCenter.php +++ b/src/Model/DataCenter.php @@ -1,17 +1,16 @@ 'bool', -'name' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'result' => null, -'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'result' => 'bool', + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'result' => null, + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'result' => 'result', -'name' => 'name' ]; + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'result' => 'setResult', -'name' => 'setName' ]; + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'result' => 'getResult', -'name' => 'getName' ]; + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -187,26 +199,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -216,7 +228,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result result * @@ -230,7 +242,7 @@ public function setResult($result) } /** - * Gets name + * Gets name. * * @return string */ @@ -240,7 +252,7 @@ public function getName() } /** - * Sets name + * Sets name. * * @param string $name name * @@ -252,12 +264,13 @@ public function setName($name) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -268,7 +281,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -281,10 +294,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -299,30 +310,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/DeprecatedIPLocation.php b/src/Model/DeprecatedIPLocation.php index fffaad63..3b5d8507 100644 --- a/src/Model/DeprecatedIPLocation.php +++ b/src/Model/DeprecatedIPLocation.php @@ -1,17 +1,16 @@ 'int', -'latitude' => 'double', -'longitude' => 'double', -'postal_code' => 'string', -'timezone' => 'string', -'city' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity', -'country' => '\Fingerprint\ServerAPI\Model\Location', -'continent' => '\Fingerprint\ServerAPI\Model\Location', -'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'accuracy_radius' => null, -'latitude' => 'double', -'longitude' => 'double', -'postal_code' => null, -'timezone' => 'timezone', -'city' => null, -'country' => null, -'continent' => null, -'subdivisions' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'accuracy_radius' => 'int', + 'latitude' => 'double', + 'longitude' => 'double', + 'postal_code' => 'string', + 'timezone' => 'string', + 'city' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity', + 'country' => '\Fingerprint\ServerAPI\Model\Location', + 'continent' => '\Fingerprint\ServerAPI\Model\Location', + 'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'accuracy_radius' => null, + 'latitude' => 'double', + 'longitude' => 'double', + 'postal_code' => null, + 'timezone' => 'timezone', + 'city' => null, + 'country' => null, + 'continent' => null, + 'subdivisions' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'accuracy_radius' => 'accuracyRadius', -'latitude' => 'latitude', -'longitude' => 'longitude', -'postal_code' => 'postalCode', -'timezone' => 'timezone', -'city' => 'city', -'country' => 'country', -'continent' => 'continent', -'subdivisions' => 'subdivisions' ]; + 'latitude' => 'latitude', + 'longitude' => 'longitude', + 'postal_code' => 'postalCode', + 'timezone' => 'timezone', + 'city' => 'city', + 'country' => 'country', + 'continent' => 'continent', + 'subdivisions' => 'subdivisions']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'accuracy_radius' => 'setAccuracyRadius', -'latitude' => 'setLatitude', -'longitude' => 'setLongitude', -'postal_code' => 'setPostalCode', -'timezone' => 'setTimezone', -'city' => 'setCity', -'country' => 'setCountry', -'continent' => 'setContinent', -'subdivisions' => 'setSubdivisions' ]; + 'latitude' => 'setLatitude', + 'longitude' => 'setLongitude', + 'postal_code' => 'setPostalCode', + 'timezone' => 'setTimezone', + 'city' => 'setCity', + 'country' => 'setCountry', + 'continent' => 'setContinent', + 'subdivisions' => 'setSubdivisions']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'accuracy_radius' => 'getAccuracyRadius', -'latitude' => 'getLatitude', -'longitude' => 'getLongitude', -'postal_code' => 'getPostalCode', -'timezone' => 'getTimezone', -'city' => 'getCity', -'country' => 'getCountry', -'continent' => 'getContinent', -'subdivisions' => 'getSubdivisions' ]; + 'latitude' => 'getLatitude', + 'longitude' => 'getLongitude', + 'postal_code' => 'getPostalCode', + 'timezone' => 'getTimezone', + 'city' => 'getCity', + 'country' => 'getCountry', + 'continent' => 'getContinent', + 'subdivisions' => 'getSubdivisions']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; + $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; + $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; + $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; + $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; + $this->container['city'] = isset($data['city']) ? $data['city'] : null; + $this->container['country'] = isset($data['country']) ? $data['country'] : null; + $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; + $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -164,7 +205,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -174,7 +215,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -193,34 +234,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; - $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; - $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; - $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; - $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; - $this->container['city'] = isset($data['city']) ? $data['city'] : null; - $this->container['country'] = isset($data['country']) ? $data['country'] : null; - $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; - $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -228,25 +241,22 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets accuracy_radius + * Gets accuracy_radius. * * @return int */ @@ -256,9 +266,9 @@ public function getAccuracyRadius() } /** - * Sets accuracy_radius + * 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 */ @@ -270,9 +280,9 @@ public function setAccuracyRadius($accuracy_radius) } /** - * Gets latitude + * Gets latitude. * - * @return double + * @return float */ public function getLatitude() { @@ -280,9 +290,9 @@ public function getLatitude() } /** - * Sets latitude + * Sets latitude. * - * @param double $latitude latitude + * @param float $latitude latitude * * @return $this */ @@ -294,9 +304,9 @@ public function setLatitude($latitude) } /** - * Gets longitude + * Gets longitude. * - * @return double + * @return float */ public function getLongitude() { @@ -304,9 +314,9 @@ public function getLongitude() } /** - * Sets longitude + * Sets longitude. * - * @param double $longitude longitude + * @param float $longitude longitude * * @return $this */ @@ -318,7 +328,7 @@ public function setLongitude($longitude) } /** - * Gets postal_code + * Gets postal_code. * * @return string */ @@ -328,7 +338,7 @@ public function getPostalCode() } /** - * Sets postal_code + * Sets postal_code. * * @param string $postal_code postal_code * @@ -342,7 +352,7 @@ public function setPostalCode($postal_code) } /** - * Gets timezone + * Gets timezone. * * @return string */ @@ -352,7 +362,7 @@ public function getTimezone() } /** - * Sets timezone + * Sets timezone. * * @param string $timezone timezone * @@ -366,9 +376,9 @@ public function setTimezone($timezone) } /** - * Gets city + * Gets city. * - * @return \Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity + * @return DeprecatedIPLocationCity */ public function getCity() { @@ -376,9 +386,9 @@ public function getCity() } /** - * Sets city + * Sets city. * - * @param \Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity $city city + * @param DeprecatedIPLocationCity $city city * * @return $this */ @@ -390,9 +400,9 @@ public function setCity($city) } /** - * Gets country + * Gets country. * - * @return \Fingerprint\ServerAPI\Model\Location + * @return Location */ public function getCountry() { @@ -400,9 +410,9 @@ public function getCountry() } /** - * Sets country + * Sets country. * - * @param \Fingerprint\ServerAPI\Model\Location $country country + * @param Location $country country * * @return $this */ @@ -414,9 +424,9 @@ public function setCountry($country) } /** - * Gets continent + * Gets continent. * - * @return \Fingerprint\ServerAPI\Model\Location + * @return Location */ public function getContinent() { @@ -424,9 +434,9 @@ public function getContinent() } /** - * Sets continent + * Sets continent. * - * @param \Fingerprint\ServerAPI\Model\Location $continent continent + * @param Location $continent continent * * @return $this */ @@ -438,7 +448,7 @@ public function setContinent($continent) } /** - * Gets subdivisions + * Gets subdivisions. * * @return \Fingerprint\ServerAPI\Model\Subdivision[] */ @@ -448,7 +458,7 @@ public function getSubdivisions() } /** - * Sets subdivisions + * Sets subdivisions. * * @param \Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * @@ -460,12 +470,13 @@ public function setSubdivisions($subdivisions) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -476,7 +487,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -489,10 +500,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -507,30 +516,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/DeprecatedIPLocationCity.php b/src/Model/DeprecatedIPLocationCity.php index d297b2e8..fdb8ccf1 100644 --- a/src/Model/DeprecatedIPLocationCity.php +++ b/src/Model/DeprecatedIPLocationCity.php @@ -1,17 +1,16 @@ 'string' ]; + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'name' => null ]; + 'name' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'name' => 'name']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'name' => 'setName']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'name' => 'name' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'name' => 'setName' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'name' => 'getName' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,25 +191,22 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets name + * Gets name. * * @return string */ @@ -207,7 +216,7 @@ public function getName() } /** - * Sets name + * Sets name. * * @param string $name name * @@ -219,12 +228,13 @@ public function setName($name) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -235,7 +245,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -248,10 +258,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -266,30 +274,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/EmulatorResult.php b/src/Model/EmulatorResult.php index b0a76d67..337177a2 100644 --- a/src/Model/EmulatorResult.php +++ b/src/Model/EmulatorResult.php @@ -1,17 +1,16 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -210,7 +222,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result Android specific emulator detection. There are 2 values: ‱ `true` - Emulated environment detected (e.g. launch inside of AVD) ‱ `false` - No signs of emulated environment detected or the client is not Android. * @@ -222,12 +234,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorEvent403Response.php b/src/Model/ErrorEvent403Response.php index 8f71b507..f2f059d7 100644 --- a/src/Model/ErrorEvent403Response.php +++ b/src/Model/ErrorEvent403Response.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'error' => null ]; + 'error' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'error' => 'error']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'error' => 'error' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'error' => 'setError' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'error' => 'getError' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,27 +191,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError + * @return ErrorEvent403ResponseError */ public function getError() { @@ -207,9 +216,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError $error error + * @param ErrorEvent403ResponseError $error error * * @return $this */ @@ -219,12 +228,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -235,7 +245,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -248,10 +258,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -266,30 +274,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorEvent403ResponseError.php b/src/Model/ErrorEvent403ResponseError.php index deba9368..155f99fe 100644 --- a/src/Model/ErrorEvent403ResponseError.php +++ b/src/Model/ErrorEvent403ResponseError.php @@ -1,17 +1,16 @@ 'string', -'message' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'code' => 'string', + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'code' => null, + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +166,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +176,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,13 +195,8 @@ public function getModelName() return self::$swaggerModelName; } - const CODE_TOKEN_REQUIRED = 'TokenRequired'; -const CODE_TOKEN_NOT_FOUND = 'TokenNotFound'; -const CODE_SUBSCRIPTION_NOT_ACTIVE = 'SubscriptionNotActive'; -const CODE_WRONG_REGION = 'WrongRegion'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -171,28 +204,9 @@ public function getCodeAllowableValues() { return [ self::CODE_TOKEN_REQUIRED, -self::CODE_TOKEN_NOT_FOUND, -self::CODE_SUBSCRIPTION_NOT_ACTIVE, -self::CODE_WRONG_REGION, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; + self::CODE_TOKEN_NOT_FOUND, + self::CODE_SUBSCRIPTION_NOT_ACTIVE, + self::CODE_WRONG_REGION, ]; } /** @@ -204,7 +218,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -215,26 +229,26 @@ public function listInvalidProperties() ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code + * Gets code. * * @return string */ @@ -244,7 +258,7 @@ public function getCode() } /** - * Sets code + * Sets code. * * @param string $code Error code: * `TokenRequired` - `Auth-API-Key` header is missing or empty * `TokenNotFound` - subscription not found for specified secret key * `SubscriptionNotActive` - subscription is not active * `WrongRegion` - server and subscription region differ * @@ -267,7 +281,7 @@ public function setCode($code) } /** - * Gets message + * Gets message. * * @return string */ @@ -277,7 +291,7 @@ public function getMessage() } /** - * Sets message + * Sets message. * * @param string $message message * @@ -289,12 +303,13 @@ public function setMessage($message) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -305,7 +320,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -318,10 +333,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -336,30 +349,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorEvent404Response.php b/src/Model/ErrorEvent404Response.php index c7803054..7c7da1d0 100644 --- a/src/Model/ErrorEvent404Response.php +++ b/src/Model/ErrorEvent404Response.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError' ]; + 'error' => '\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'error' => null ]; + 'error' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'error' => 'error']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'error' => 'error' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'error' => 'setError' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'error' => 'getError' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,27 +191,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError + * @return ErrorEvent404ResponseError */ public function getError() { @@ -207,9 +216,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError $error error + * @param ErrorEvent404ResponseError $error error * * @return $this */ @@ -219,12 +228,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -235,7 +245,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -248,10 +258,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -266,30 +274,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorEvent404ResponseError.php b/src/Model/ErrorEvent404ResponseError.php index b6b14968..f1f83b7f 100644 --- a/src/Model/ErrorEvent404ResponseError.php +++ b/src/Model/ErrorEvent404ResponseError.php @@ -1,17 +1,16 @@ 'string', -'message' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'code' => 'string', + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'code' => null, + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,10 +192,8 @@ public function getModelName() return self::$swaggerModelName; } - const CODE_REQUEST_NOT_FOUND = 'RequestNotFound'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -170,25 +203,6 @@ public function getCodeAllowableValues() self::CODE_REQUEST_NOT_FOUND, ]; } - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -198,7 +212,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -209,26 +223,26 @@ public function listInvalidProperties() ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code + * Gets code. * * @return string */ @@ -238,7 +252,7 @@ public function getCode() } /** - * Sets code + * Sets code. * * @param string $code Error code: * `RequestNotFound` - request not found for specified id * @@ -261,7 +275,7 @@ public function setCode($code) } /** - * Gets message + * Gets message. * * @return string */ @@ -271,7 +285,7 @@ public function getMessage() } /** - * Sets message + * Sets message. * * @param string $message message * @@ -283,12 +297,13 @@ public function setMessage($message) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -299,7 +314,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -312,10 +327,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -330,30 +343,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ErrorVisits403.php b/src/Model/ErrorVisits403.php index 46826318..f5a15bb5 100644 --- a/src/Model/ErrorVisits403.php +++ b/src/Model/ErrorVisits403.php @@ -1,17 +1,16 @@ 'string' ]; + 'error' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'error' => null ]; + 'error' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'error' => 'error']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'error' => 'error' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'error' => 'setError' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'error' => 'getError' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['error'] === null) { + if (null === $this->container['error']) { $invalidProperties[] = "'error' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. * * @return string */ @@ -210,9 +222,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param string $error Error text. + * @param string $error error text * * @return $this */ @@ -222,12 +234,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/EventResponse.php b/src/Model/EventResponse.php index eabe5e08..09c7e3c5 100644 --- a/src/Model/EventResponse.php +++ b/src/Model/EventResponse.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\ProductsResponse', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'products' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'products' => '\Fingerprint\ServerAPI\Model\ProductsResponse', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'products' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'products' => 'products', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'products' => 'setProducts', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'products' => 'getProducts', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['products'] = isset($data['products']) ? $data['products'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -129,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -139,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -158,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['products'] = isset($data['products']) ? $data['products'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -188,28 +201,28 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['products'] === null) { + if (null === $this->container['products']) { $invalidProperties[] = "'products' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets products + * Gets products. * - * @return \Fingerprint\ServerAPI\Model\ProductsResponse + * @return ProductsResponse */ public function getProducts() { @@ -217,9 +230,9 @@ public function getProducts() } /** - * Sets products + * Sets products. * - * @param \Fingerprint\ServerAPI\Model\ProductsResponse $products products + * @param ProductsResponse $products products * * @return $this */ @@ -231,9 +244,9 @@ public function setProducts($products) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -241,9 +254,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -253,12 +266,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -269,7 +283,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -282,10 +296,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -300,30 +312,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/FactoryResetResult.php b/src/Model/FactoryResetResult.php index 8faeac68..7329208d 100644 --- a/src/Model/FactoryResetResult.php +++ b/src/Model/FactoryResetResult.php @@ -1,17 +1,16 @@ '\DateTime', -'timestamp' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'time' => 'date-time', -'timestamp' => 'int64' ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'time' => '\DateTime', + 'timestamp' => 'int']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'time' => 'date-time', + 'timestamp' => 'int64']; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'time' => 'time', -'timestamp' => 'timestamp' ]; + 'timestamp' => 'timestamp']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'time' => 'setTime', -'timestamp' => 'setTimestamp' ]; + 'timestamp' => 'setTimestamp']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'time' => 'getTime', -'timestamp' => 'getTimestamp' ]; + 'timestamp' => 'getTimestamp']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -187,29 +199,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets time + * Gets time. * * @return \DateTime */ @@ -219,7 +231,7 @@ public function getTime() } /** - * Sets time + * Sets time. * * @param \DateTime $time Time in UTC when the most recent factory reset of the Android or iOS device was done. If there is no sign of factory reset or the client is not a mobile device, the field will contain the epoch time (1 January 1970) in UTC. * @@ -233,7 +245,7 @@ public function setTime($time) } /** - * Gets timestamp + * Gets timestamp. * * @return int */ @@ -243,9 +255,9 @@ public function getTimestamp() } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Same value as it's in the `time` field but represented in timestamp format. + * @param int $timestamp same value as it's in the `time` field but represented in timestamp format * * @return $this */ @@ -255,12 +267,13 @@ public function setTimestamp($timestamp) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -271,7 +284,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -284,10 +297,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -302,30 +313,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/FridaResult.php b/src/Model/FridaResult.php index 48b7de01..b879047f 100644 --- a/src/Model/FridaResult.php +++ b/src/Model/FridaResult.php @@ -1,17 +1,16 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -210,7 +222,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: ‱ `true` - Frida detected ‱ `false` - No signs of Frida or the client is not a mobile device. * @@ -222,12 +234,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/HighActivityResult.php b/src/Model/HighActivityResult.php index b7ebca8b..af56699e 100644 --- a/src/Model/HighActivityResult.php +++ b/src/Model/HighActivityResult.php @@ -1,17 +1,16 @@ 'bool', -'daily_requests' => 'float' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'result' => null, -'daily_requests' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'result' => 'bool', + 'daily_requests' => 'float']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'result' => null, + 'daily_requests' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'result' => 'result', -'daily_requests' => 'dailyRequests' ]; + 'daily_requests' => 'dailyRequests']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'result' => 'setResult', -'daily_requests' => 'setDailyRequests' ]; + 'daily_requests' => 'setDailyRequests']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'result' => 'getResult', -'daily_requests' => 'getDailyRequests' ]; + 'daily_requests' => 'getDailyRequests']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['daily_requests'] = isset($data['daily_requests']) ? $data['daily_requests'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['daily_requests'] = isset($data['daily_requests']) ? $data['daily_requests'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -187,26 +199,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -216,9 +228,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result Flag indicating whether the request came from a high activity visitor. + * @param bool $result flag indicating whether the request came from a high activity visitor * * @return $this */ @@ -230,7 +242,7 @@ public function setResult($result) } /** - * Gets daily_requests + * Gets daily_requests. * * @return float */ @@ -240,9 +252,9 @@ public function getDailyRequests() } /** - * Sets daily_requests + * 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 */ @@ -252,12 +264,13 @@ public function setDailyRequests($daily_requests) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -268,7 +281,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -281,10 +294,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -299,30 +310,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IPLocation.php b/src/Model/IPLocation.php index 3709db3f..b6586802 100644 --- a/src/Model/IPLocation.php +++ b/src/Model/IPLocation.php @@ -1,17 +1,16 @@ 'int', -'latitude' => 'double', -'longitude' => 'double', -'postal_code' => 'string', -'timezone' => 'string', -'city' => '\Fingerprint\ServerAPI\Model\IPLocationCity', -'country' => '\Fingerprint\ServerAPI\Model\Location', -'continent' => '\Fingerprint\ServerAPI\Model\Location', -'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'accuracy_radius' => null, -'latitude' => 'double', -'longitude' => 'double', -'postal_code' => null, -'timezone' => 'timezone', -'city' => null, -'country' => null, -'continent' => null, -'subdivisions' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'accuracy_radius' => 'int', + 'latitude' => 'double', + 'longitude' => 'double', + 'postal_code' => 'string', + 'timezone' => 'string', + 'city' => '\Fingerprint\ServerAPI\Model\IPLocationCity', + 'country' => '\Fingerprint\ServerAPI\Model\Location', + 'continent' => '\Fingerprint\ServerAPI\Model\Location', + 'subdivisions' => '\Fingerprint\ServerAPI\Model\Subdivision[]']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'accuracy_radius' => null, + 'latitude' => 'double', + 'longitude' => 'double', + 'postal_code' => null, + 'timezone' => 'timezone', + 'city' => null, + 'country' => null, + 'continent' => null, + 'subdivisions' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'accuracy_radius' => 'accuracyRadius', -'latitude' => 'latitude', -'longitude' => 'longitude', -'postal_code' => 'postalCode', -'timezone' => 'timezone', -'city' => 'city', -'country' => 'country', -'continent' => 'continent', -'subdivisions' => 'subdivisions' ]; + 'latitude' => 'latitude', + 'longitude' => 'longitude', + 'postal_code' => 'postalCode', + 'timezone' => 'timezone', + 'city' => 'city', + 'country' => 'country', + 'continent' => 'continent', + 'subdivisions' => 'subdivisions']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'accuracy_radius' => 'setAccuracyRadius', -'latitude' => 'setLatitude', -'longitude' => 'setLongitude', -'postal_code' => 'setPostalCode', -'timezone' => 'setTimezone', -'city' => 'setCity', -'country' => 'setCountry', -'continent' => 'setContinent', -'subdivisions' => 'setSubdivisions' ]; + 'latitude' => 'setLatitude', + 'longitude' => 'setLongitude', + 'postal_code' => 'setPostalCode', + 'timezone' => 'setTimezone', + 'city' => 'setCity', + 'country' => 'setCountry', + 'continent' => 'setContinent', + 'subdivisions' => 'setSubdivisions']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'accuracy_radius' => 'getAccuracyRadius', -'latitude' => 'getLatitude', -'longitude' => 'getLongitude', -'postal_code' => 'getPostalCode', -'timezone' => 'getTimezone', -'city' => 'getCity', -'country' => 'getCountry', -'continent' => 'getContinent', -'subdivisions' => 'getSubdivisions' ]; + 'latitude' => 'getLatitude', + 'longitude' => 'getLongitude', + 'postal_code' => 'getPostalCode', + 'timezone' => 'getTimezone', + 'city' => 'getCity', + 'country' => 'getCountry', + 'continent' => 'getContinent', + 'subdivisions' => 'getSubdivisions']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; + $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; + $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; + $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; + $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; + $this->container['city'] = isset($data['city']) ? $data['city'] : null; + $this->container['country'] = isset($data['country']) ? $data['country'] : null; + $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; + $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -163,7 +203,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -173,7 +213,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -192,34 +232,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['accuracy_radius'] = isset($data['accuracy_radius']) ? $data['accuracy_radius'] : null; - $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; - $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; - $this->container['postal_code'] = isset($data['postal_code']) ? $data['postal_code'] : null; - $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; - $this->container['city'] = isset($data['city']) ? $data['city'] : null; - $this->container['country'] = isset($data['country']) ? $data['country'] : null; - $this->container['continent'] = isset($data['continent']) ? $data['continent'] : null; - $this->container['subdivisions'] = isset($data['subdivisions']) ? $data['subdivisions'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -227,25 +239,22 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets accuracy_radius + * Gets accuracy_radius. * * @return int */ @@ -255,9 +264,9 @@ public function getAccuracyRadius() } /** - * Sets accuracy_radius + * 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 */ @@ -269,9 +278,9 @@ public function setAccuracyRadius($accuracy_radius) } /** - * Gets latitude + * Gets latitude. * - * @return double + * @return float */ public function getLatitude() { @@ -279,9 +288,9 @@ public function getLatitude() } /** - * Sets latitude + * Sets latitude. * - * @param double $latitude latitude + * @param float $latitude latitude * * @return $this */ @@ -293,9 +302,9 @@ public function setLatitude($latitude) } /** - * Gets longitude + * Gets longitude. * - * @return double + * @return float */ public function getLongitude() { @@ -303,9 +312,9 @@ public function getLongitude() } /** - * Sets longitude + * Sets longitude. * - * @param double $longitude longitude + * @param float $longitude longitude * * @return $this */ @@ -317,7 +326,7 @@ public function setLongitude($longitude) } /** - * Gets postal_code + * Gets postal_code. * * @return string */ @@ -327,7 +336,7 @@ public function getPostalCode() } /** - * Sets postal_code + * Sets postal_code. * * @param string $postal_code postal_code * @@ -341,7 +350,7 @@ public function setPostalCode($postal_code) } /** - * Gets timezone + * Gets timezone. * * @return string */ @@ -351,7 +360,7 @@ public function getTimezone() } /** - * Sets timezone + * Sets timezone. * * @param string $timezone timezone * @@ -365,9 +374,9 @@ public function setTimezone($timezone) } /** - * Gets city + * Gets city. * - * @return \Fingerprint\ServerAPI\Model\IPLocationCity + * @return IPLocationCity */ public function getCity() { @@ -375,9 +384,9 @@ public function getCity() } /** - * Sets city + * Sets city. * - * @param \Fingerprint\ServerAPI\Model\IPLocationCity $city city + * @param IPLocationCity $city city * * @return $this */ @@ -389,9 +398,9 @@ public function setCity($city) } /** - * Gets country + * Gets country. * - * @return \Fingerprint\ServerAPI\Model\Location + * @return Location */ public function getCountry() { @@ -399,9 +408,9 @@ public function getCountry() } /** - * Sets country + * Sets country. * - * @param \Fingerprint\ServerAPI\Model\Location $country country + * @param Location $country country * * @return $this */ @@ -413,9 +422,9 @@ public function setCountry($country) } /** - * Gets continent + * Gets continent. * - * @return \Fingerprint\ServerAPI\Model\Location + * @return Location */ public function getContinent() { @@ -423,9 +432,9 @@ public function getContinent() } /** - * Sets continent + * Sets continent. * - * @param \Fingerprint\ServerAPI\Model\Location $continent continent + * @param Location $continent continent * * @return $this */ @@ -437,7 +446,7 @@ public function setContinent($continent) } /** - * Gets subdivisions + * Gets subdivisions. * * @return \Fingerprint\ServerAPI\Model\Subdivision[] */ @@ -447,7 +456,7 @@ public function getSubdivisions() } /** - * Sets subdivisions + * Sets subdivisions. * * @param \Fingerprint\ServerAPI\Model\Subdivision[] $subdivisions subdivisions * @@ -459,12 +468,13 @@ public function setSubdivisions($subdivisions) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -475,7 +485,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -488,10 +498,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -506,30 +514,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IPLocationCity.php b/src/Model/IPLocationCity.php index eb1c5ae5..82c30ead 100644 --- a/src/Model/IPLocationCity.php +++ b/src/Model/IPLocationCity.php @@ -1,17 +1,16 @@ 'string' ]; + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'name' => null ]; + 'name' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'name' => 'name']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'name' => 'setName']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'name' => 'name' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'name' => 'setName' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'name' => 'getName' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -179,25 +191,22 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets name + * Gets name. * * @return string */ @@ -207,7 +216,7 @@ public function getName() } /** - * Sets name + * Sets name. * * @param string $name name * @@ -219,12 +228,13 @@ public function setName($name) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -235,7 +245,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -248,10 +258,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -266,30 +274,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IdentificationError.php b/src/Model/IdentificationError.php index 539c584f..c925b7d8 100644 --- a/src/Model/IdentificationError.php +++ b/src/Model/IdentificationError.php @@ -1,17 +1,16 @@ 'string', -'message' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'code' => 'string', + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'code' => null, + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +164,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +174,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,11 +193,8 @@ public function getModelName() return self::$swaggerModelName; } - const CODE__429_TOO_MANY_REQUESTS = '429 Too Many Requests'; -const CODE_FAILED = 'Failed'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -169,26 +202,7 @@ public function getCodeAllowableValues() { return [ self::CODE__429_TOO_MANY_REQUESTS, -self::CODE_FAILED, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; + self::CODE_FAILED, ]; } /** @@ -200,7 +214,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -211,26 +225,26 @@ public function listInvalidProperties() ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code + * Gets code. * * @return string */ @@ -240,7 +254,7 @@ public function getCode() } /** - * Sets code + * Sets code. * * @param string $code Error code: * `429 Too Many Requests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error * @@ -263,7 +277,7 @@ public function setCode($code) } /** - * Gets message + * Gets message. * * @return string */ @@ -273,7 +287,7 @@ public function getMessage() } /** - * Sets message + * Sets message. * * @param string $message message * @@ -285,12 +299,13 @@ public function setMessage($message) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -301,7 +316,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -314,10 +329,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -332,30 +345,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IncognitoResult.php b/src/Model/IncognitoResult.php index c5178f47..33286e0d 100644 --- a/src/Model/IncognitoResult.php +++ b/src/Model/IncognitoResult.php @@ -1,17 +1,16 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -210,9 +222,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result `true` if we detected incognito mode used in the browser, `false` otherwise. + * @param bool $result `true` if we detected incognito mode used in the browser, `false` otherwise * * @return $this */ @@ -222,12 +234,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpBlockListResult.php b/src/Model/IpBlockListResult.php index 82d9cf37..7674a616 100644 --- a/src/Model/IpBlockListResult.php +++ b/src/Model/IpBlockListResult.php @@ -1,17 +1,16 @@ 'bool', -'details' => '\Fingerprint\ServerAPI\Model\IpBlockListResultDetails' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'result' => null, -'details' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'result' => 'bool', + 'details' => '\Fingerprint\ServerAPI\Model\IpBlockListResultDetails']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'result' => null, + 'details' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'result' => 'result', -'details' => 'details' ]; + 'details' => 'details']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'result' => 'setResult', -'details' => 'setDetails' ]; + 'details' => 'setDetails']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'result' => 'getResult', -'details' => 'getDetails' ]; + 'details' => 'getDetails']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['details'] = isset($data['details']) ? $data['details'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['details'] = isset($data['details']) ? $data['details'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -187,29 +199,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } - if ($this->container['details'] === null) { + if (null === $this->container['details']) { $invalidProperties[] = "'details' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -219,9 +231,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. + * @param bool $result `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise * * @return $this */ @@ -233,9 +245,9 @@ public function setResult($result) } /** - * Gets details + * Gets details. * - * @return \Fingerprint\ServerAPI\Model\IpBlockListResultDetails + * @return IpBlockListResultDetails */ public function getDetails() { @@ -243,9 +255,9 @@ public function getDetails() } /** - * Sets details + * Sets details. * - * @param \Fingerprint\ServerAPI\Model\IpBlockListResultDetails $details details + * @param IpBlockListResultDetails $details details * * @return $this */ @@ -255,12 +267,13 @@ public function setDetails($details) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -271,7 +284,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -284,10 +297,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -302,30 +313,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpBlockListResultDetails.php b/src/Model/IpBlockListResultDetails.php index 3fe5d75d..4ee07f8b 100644 --- a/src/Model/IpBlockListResultDetails.php +++ b/src/Model/IpBlockListResultDetails.php @@ -1,17 +1,16 @@ 'bool', -'attack_source' => 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'email_spam' => null, -'attack_source' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'email_spam' => 'bool', + 'attack_source' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'email_spam' => null, + 'attack_source' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'email_spam' => 'emailSpam', -'attack_source' => 'attackSource' ]; + 'attack_source' => 'attackSource']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'email_spam' => 'setEmailSpam', -'attack_source' => 'setAttackSource' ]; + 'attack_source' => 'setAttackSource']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'email_spam' => 'getEmailSpam', -'attack_source' => 'getAttackSource' ]; + 'attack_source' => 'getAttackSource']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['email_spam'] = isset($data['email_spam']) ? $data['email_spam'] : null; + $this->container['attack_source'] = isset($data['attack_source']) ? $data['attack_source'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['email_spam'] = isset($data['email_spam']) ? $data['email_spam'] : null; - $this->container['attack_source'] = isset($data['attack_source']) ? $data['attack_source'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -187,29 +199,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['email_spam'] === null) { + if (null === $this->container['email_spam']) { $invalidProperties[] = "'email_spam' can't be null"; } - if ($this->container['attack_source'] === null) { + if (null === $this->container['attack_source']) { $invalidProperties[] = "'attack_source' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets email_spam + * Gets email_spam. * * @return bool */ @@ -219,9 +231,9 @@ public function getEmailSpam() } /** - * Sets email_spam + * Sets email_spam. * - * @param bool $email_spam IP address was part of a known email spam attack (SMTP). + * @param bool $email_spam IP address was part of a known email spam attack (SMTP) * * @return $this */ @@ -233,7 +245,7 @@ public function setEmailSpam($email_spam) } /** - * Gets attack_source + * Gets attack_source. * * @return bool */ @@ -243,9 +255,9 @@ public function getAttackSource() } /** - * Sets attack_source + * Sets attack_source. * - * @param bool $attack_source IP address was part of a known network attack (SSH/HTTPS). + * @param bool $attack_source IP address was part of a known network attack (SSH/HTTPS) * * @return $this */ @@ -255,12 +267,13 @@ public function setAttackSource($attack_source) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -271,7 +284,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -284,10 +297,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -302,30 +313,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpInfoResult.php b/src/Model/IpInfoResult.php index e64f7e36..56464e4d 100644 --- a/src/Model/IpInfoResult.php +++ b/src/Model/IpInfoResult.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\IpInfoResultV4', -'v6' => '\Fingerprint\ServerAPI\Model\IpInfoResultV6' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'v4' => null, -'v6' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'v4' => '\Fingerprint\ServerAPI\Model\IpInfoResultV4', + 'v6' => '\Fingerprint\ServerAPI\Model\IpInfoResultV6']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'v4' => null, + 'v6' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'v4' => 'v4', -'v6' => 'v6' ]; + 'v6' => 'v6']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'v4' => 'setV4', -'v6' => 'setV6' ]; + 'v6' => 'setV6']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'v4' => 'getV4', -'v6' => 'getV6' ]; + 'v6' => 'getV6']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['v4'] = isset($data['v4']) ? $data['v4'] : null; + $this->container['v6'] = isset($data['v6']) ? $data['v6'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -129,7 +163,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -139,7 +173,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -158,27 +192,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['v4'] = isset($data['v4']) ? $data['v4'] : null; - $this->container['v6'] = isset($data['v6']) ? $data['v6'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -186,27 +199,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets v4 + * Gets v4. * - * @return \Fingerprint\ServerAPI\Model\IpInfoResultV4 + * @return IpInfoResultV4 */ public function getV4() { @@ -214,9 +224,9 @@ public function getV4() } /** - * Sets v4 + * Sets v4. * - * @param \Fingerprint\ServerAPI\Model\IpInfoResultV4 $v4 v4 + * @param IpInfoResultV4 $v4 v4 * * @return $this */ @@ -228,9 +238,9 @@ public function setV4($v4) } /** - * Gets v6 + * Gets v6. * - * @return \Fingerprint\ServerAPI\Model\IpInfoResultV6 + * @return IpInfoResultV6 */ public function getV6() { @@ -238,9 +248,9 @@ public function getV6() } /** - * Sets v6 + * Sets v6. * - * @param \Fingerprint\ServerAPI\Model\IpInfoResultV6 $v6 v6 + * @param IpInfoResultV6 $v6 v6 * * @return $this */ @@ -250,12 +260,13 @@ public function setV6($v6) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -266,7 +277,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -279,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -297,30 +306,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpInfoResultV4.php b/src/Model/IpInfoResultV4.php index 4aee3502..1090ed91 100644 --- a/src/Model/IpInfoResultV4.php +++ b/src/Model/IpInfoResultV4.php @@ -1,17 +1,16 @@ 'string', -'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', -'asn' => '\Fingerprint\ServerAPI\Model\ASN', -'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'address' => 'ipv4', -'geolocation' => null, -'asn' => null, -'datacenter' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'address' => 'string', + 'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', + 'asn' => '\Fingerprint\ServerAPI\Model\ASN', + 'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'address' => 'ipv4', + 'geolocation' => null, + 'asn' => null, + 'datacenter' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'address' => 'address', -'geolocation' => 'geolocation', -'asn' => 'asn', -'datacenter' => 'datacenter' ]; + 'geolocation' => 'geolocation', + 'asn' => 'asn', + 'datacenter' => 'datacenter']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'address' => 'setAddress', -'geolocation' => 'setGeolocation', -'asn' => 'setAsn', -'datacenter' => 'setDatacenter' ]; + 'geolocation' => 'setGeolocation', + 'asn' => 'setAsn', + 'datacenter' => 'setDatacenter']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'address' => 'getAddress', -'geolocation' => 'getGeolocation', -'asn' => 'getAsn', -'datacenter' => 'getDatacenter' ]; + 'geolocation' => 'getGeolocation', + 'asn' => 'getAsn', + 'datacenter' => 'getDatacenter']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -138,7 +173,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -148,7 +183,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -167,29 +202,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['address'] = isset($data['address']) ? $data['address'] : null; - $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; - $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; - $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -199,29 +211,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['address'] === null) { + if (null === $this->container['address']) { $invalidProperties[] = "'address' can't be null"; } - if ($this->container['geolocation'] === null) { + if (null === $this->container['geolocation']) { $invalidProperties[] = "'geolocation' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets address + * Gets address. * * @return string */ @@ -231,7 +243,7 @@ public function getAddress() } /** - * Sets address + * Sets address. * * @param string $address address * @@ -245,9 +257,9 @@ public function setAddress($address) } /** - * Gets geolocation + * Gets geolocation. * - * @return \Fingerprint\ServerAPI\Model\IPLocation + * @return IPLocation */ public function getGeolocation() { @@ -255,9 +267,9 @@ public function getGeolocation() } /** - * Sets geolocation + * Sets geolocation. * - * @param \Fingerprint\ServerAPI\Model\IPLocation $geolocation geolocation + * @param IPLocation $geolocation geolocation * * @return $this */ @@ -269,9 +281,9 @@ public function setGeolocation($geolocation) } /** - * Gets asn + * Gets asn. * - * @return \Fingerprint\ServerAPI\Model\ASN + * @return ASN */ public function getAsn() { @@ -279,9 +291,9 @@ public function getAsn() } /** - * Sets asn + * Sets asn. * - * @param \Fingerprint\ServerAPI\Model\ASN $asn asn + * @param ASN $asn asn * * @return $this */ @@ -293,9 +305,9 @@ public function setAsn($asn) } /** - * Gets datacenter + * Gets datacenter. * - * @return \Fingerprint\ServerAPI\Model\DataCenter + * @return DataCenter */ public function getDatacenter() { @@ -303,9 +315,9 @@ public function getDatacenter() } /** - * Sets datacenter + * Sets datacenter. * - * @param \Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter + * @param DataCenter $datacenter datacenter * * @return $this */ @@ -315,12 +327,13 @@ public function setDatacenter($datacenter) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -331,7 +344,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -344,10 +357,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -362,30 +373,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/IpInfoResultV6.php b/src/Model/IpInfoResultV6.php index cd6935d0..daa674c9 100644 --- a/src/Model/IpInfoResultV6.php +++ b/src/Model/IpInfoResultV6.php @@ -1,17 +1,16 @@ 'string', -'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', -'asn' => '\Fingerprint\ServerAPI\Model\ASN', -'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'address' => 'ipv6', -'geolocation' => null, -'asn' => null, -'datacenter' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'address' => 'string', + 'geolocation' => '\Fingerprint\ServerAPI\Model\IPLocation', + 'asn' => '\Fingerprint\ServerAPI\Model\ASN', + 'datacenter' => '\Fingerprint\ServerAPI\Model\DataCenter']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'address' => 'ipv6', + 'geolocation' => null, + 'asn' => null, + 'datacenter' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'address' => 'address', -'geolocation' => 'geolocation', -'asn' => 'asn', -'datacenter' => 'datacenter' ]; + 'geolocation' => 'geolocation', + 'asn' => 'asn', + 'datacenter' => 'datacenter']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'address' => 'setAddress', -'geolocation' => 'setGeolocation', -'asn' => 'setAsn', -'datacenter' => 'setDatacenter' ]; + 'geolocation' => 'setGeolocation', + 'asn' => 'setAsn', + 'datacenter' => 'setDatacenter']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'address' => 'getAddress', -'geolocation' => 'getGeolocation', -'asn' => 'getAsn', -'datacenter' => 'getDatacenter' ]; + 'geolocation' => 'getGeolocation', + 'asn' => 'getAsn', + 'datacenter' => 'getDatacenter']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; + $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; + $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -138,7 +173,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -148,7 +183,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -167,29 +202,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['address'] = isset($data['address']) ? $data['address'] : null; - $this->container['geolocation'] = isset($data['geolocation']) ? $data['geolocation'] : null; - $this->container['asn'] = isset($data['asn']) ? $data['asn'] : null; - $this->container['datacenter'] = isset($data['datacenter']) ? $data['datacenter'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -199,29 +211,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['address'] === null) { + if (null === $this->container['address']) { $invalidProperties[] = "'address' can't be null"; } - if ($this->container['geolocation'] === null) { + if (null === $this->container['geolocation']) { $invalidProperties[] = "'geolocation' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets address + * Gets address. * * @return string */ @@ -231,7 +243,7 @@ public function getAddress() } /** - * Sets address + * Sets address. * * @param string $address address * @@ -245,9 +257,9 @@ public function setAddress($address) } /** - * Gets geolocation + * Gets geolocation. * - * @return \Fingerprint\ServerAPI\Model\IPLocation + * @return IPLocation */ public function getGeolocation() { @@ -255,9 +267,9 @@ public function getGeolocation() } /** - * Sets geolocation + * Sets geolocation. * - * @param \Fingerprint\ServerAPI\Model\IPLocation $geolocation geolocation + * @param IPLocation $geolocation geolocation * * @return $this */ @@ -269,9 +281,9 @@ public function setGeolocation($geolocation) } /** - * Gets asn + * Gets asn. * - * @return \Fingerprint\ServerAPI\Model\ASN + * @return ASN */ public function getAsn() { @@ -279,9 +291,9 @@ public function getAsn() } /** - * Sets asn + * Sets asn. * - * @param \Fingerprint\ServerAPI\Model\ASN $asn asn + * @param ASN $asn asn * * @return $this */ @@ -293,9 +305,9 @@ public function setAsn($asn) } /** - * Gets datacenter + * Gets datacenter. * - * @return \Fingerprint\ServerAPI\Model\DataCenter + * @return DataCenter */ public function getDatacenter() { @@ -303,9 +315,9 @@ public function getDatacenter() } /** - * Sets datacenter + * Sets datacenter. * - * @param \Fingerprint\ServerAPI\Model\DataCenter $datacenter datacenter + * @param DataCenter $datacenter datacenter * * @return $this */ @@ -315,12 +327,13 @@ public function setDatacenter($datacenter) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -331,7 +344,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -344,10 +357,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -362,30 +373,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/JailbrokenResult.php b/src/Model/JailbrokenResult.php index 1a19096b..6fe4347d 100644 --- a/src/Model/JailbrokenResult.php +++ b/src/Model/JailbrokenResult.php @@ -1,17 +1,16 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -210,7 +222,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result iOS specific jailbreak detection. There are 2 values: ‱ `true` - Jailbreak detected ‱ `false` - No signs of jailbreak or the client is not iOS. * @@ -222,12 +234,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Location.php b/src/Model/Location.php index b61a952d..7945b367 100644 --- a/src/Model/Location.php +++ b/src/Model/Location.php @@ -1,17 +1,16 @@ 'string', -'name' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'code' => null, -'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'code' => 'string', + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'code' => null, + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'code' => 'code', -'name' => 'name' ]; + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'code' => 'setCode', -'name' => 'setName' ]; + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'code' => 'getCode', -'name' => 'getName' ]; + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -187,29 +199,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } - if ($this->container['name'] === null) { + if (null === $this->container['name']) { $invalidProperties[] = "'name' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code + * Gets code. * * @return string */ @@ -219,7 +231,7 @@ public function getCode() } /** - * Sets code + * Sets code. * * @param string $code code * @@ -233,7 +245,7 @@ public function setCode($code) } /** - * Gets name + * Gets name. * * @return string */ @@ -243,7 +255,7 @@ public function getName() } /** - * Sets name + * Sets name. * * @param string $name name * @@ -255,12 +267,13 @@ public function setName($name) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -271,7 +284,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -284,10 +297,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -302,30 +313,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/LocationSpoofingResult.php b/src/Model/LocationSpoofingResult.php index 2f164617..f45f1cce 100644 --- a/src/Model/LocationSpoofingResult.php +++ b/src/Model/LocationSpoofingResult.php @@ -1,17 +1,16 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -210,9 +222,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result Flag indicating whether the request came from a mobile device with location spoofing enabled. + * @param bool $result flag indicating whether the request came from a mobile device with location spoofing enabled * * @return $this */ @@ -222,12 +234,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ManyRequestsResponse.php b/src/Model/ManyRequestsResponse.php index 292605f8..7ccc9158 100644 --- a/src/Model/ManyRequestsResponse.php +++ b/src/Model/ManyRequestsResponse.php @@ -1,17 +1,16 @@ 'string' ]; + 'error' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'error' => null ]; + 'error' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'error' => 'error']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'error' => 'setError']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'error' => 'error' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'error' => 'setError' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'error' => 'getError' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['error'] === null) { + if (null === $this->container['error']) { $invalidProperties[] = "'error' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets error + * Gets error. * * @return string */ @@ -210,9 +222,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param string $error Error text. + * @param string $error error text * * @return $this */ @@ -222,12 +234,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index c6adaf20..0156c76d 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -1,17 +1,18 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -210,7 +222,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result `true` if the request is from a privacy aware browser (e.g. Tor) or from a browser in which fingerprinting is blocked. Otherwise `false`. * @@ -222,12 +234,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductError.php b/src/Model/ProductError.php index 00e8625d..84c226fd 100644 --- a/src/Model/ProductError.php +++ b/src/Model/ProductError.php @@ -1,17 +1,16 @@ 'string', -'message' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'code' => null, -'message' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'code' => 'string', + 'message' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'code' => null, + 'message' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'code' => 'code', -'message' => 'message' ]; + 'message' => 'message']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'code' => 'setCode', -'message' => 'setMessage' ]; + 'message' => 'setMessage']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'code' => 'getCode', -'message' => 'getMessage' ]; + 'message' => 'getMessage']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +164,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +174,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,11 +193,8 @@ public function getModelName() return self::$swaggerModelName; } - const CODE_TOO_MANY_REQUESTS = 'TooManyRequests'; -const CODE_FAILED = 'Failed'; - /** - * Gets allowable values of the enum + * Gets allowable values of the enum. * * @return string[] */ @@ -169,26 +202,7 @@ public function getCodeAllowableValues() { return [ self::CODE_TOO_MANY_REQUESTS, -self::CODE_FAILED, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['code'] = isset($data['code']) ? $data['code'] : null; - $this->container['message'] = isset($data['message']) ? $data['message'] : null; + self::CODE_FAILED, ]; } /** @@ -200,7 +214,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['code'] === null) { + if (null === $this->container['code']) { $invalidProperties[] = "'code' can't be null"; } $allowedValues = $this->getCodeAllowableValues(); @@ -211,26 +225,26 @@ public function listInvalidProperties() ); } - if ($this->container['message'] === null) { + if (null === $this->container['message']) { $invalidProperties[] = "'message' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets code + * Gets code. * * @return string */ @@ -240,7 +254,7 @@ public function getCode() } /** - * Sets code + * Sets code. * * @param string $code Error code: * `TooManyRequests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error * @@ -263,7 +277,7 @@ public function setCode($code) } /** - * Gets message + * Gets message. * * @return string */ @@ -273,7 +287,7 @@ public function getMessage() } /** - * Sets message + * Sets message. * * @param string $message message * @@ -285,12 +299,13 @@ public function setMessage($message) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -301,7 +316,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -314,10 +329,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -332,30 +345,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductsResponse.php b/src/Model/ProductsResponse.php index fbdf4497..eaecc677 100644 --- a/src/Model/ProductsResponse.php +++ b/src/Model/ProductsResponse.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\ProductsResponseIdentification', -'botd' => '\Fingerprint\ServerAPI\Model\ProductsResponseBotd', -'ip_info' => '\Fingerprint\ServerAPI\Model\SignalResponseIpInfo', -'incognito' => '\Fingerprint\ServerAPI\Model\SignalResponseIncognito', -'root_apps' => '\Fingerprint\ServerAPI\Model\SignalResponseRootApps', -'emulator' => '\Fingerprint\ServerAPI\Model\SignalResponseEmulator', -'cloned_app' => '\Fingerprint\ServerAPI\Model\SignalResponseClonedApp', -'factory_reset' => '\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset', -'jailbroken' => '\Fingerprint\ServerAPI\Model\SignalResponseJailbroken', -'frida' => '\Fingerprint\ServerAPI\Model\SignalResponseFrida', -'ip_blocklist' => '\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist', -'tor' => '\Fingerprint\ServerAPI\Model\SignalResponseTor', -'privacy_settings' => '\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings', -'virtual_machine' => '\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine', -'vpn' => '\Fingerprint\ServerAPI\Model\SignalResponseVpn', -'proxy' => '\Fingerprint\ServerAPI\Model\SignalResponseProxy', -'tampering' => '\Fingerprint\ServerAPI\Model\SignalResponseTampering', -'high_activity' => '\Fingerprint\ServerAPI\Model\SignalResponseHighActivity', -'location_spoofing' => '\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing', -'suspect_score' => '\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore', -'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'identification' => null, -'botd' => null, -'ip_info' => null, -'incognito' => null, -'root_apps' => null, -'emulator' => null, -'cloned_app' => null, -'factory_reset' => null, -'jailbroken' => null, -'frida' => null, -'ip_blocklist' => null, -'tor' => null, -'privacy_settings' => null, -'virtual_machine' => null, -'vpn' => null, -'proxy' => null, -'tampering' => null, -'high_activity' => null, -'location_spoofing' => null, -'suspect_score' => null, -'raw_device_attributes' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization + protected static $swaggerTypes = [ + 'identification' => '\Fingerprint\ServerAPI\Model\ProductsResponseIdentification', + 'botd' => '\Fingerprint\ServerAPI\Model\ProductsResponseBotd', + 'ip_info' => '\Fingerprint\ServerAPI\Model\SignalResponseIpInfo', + 'incognito' => '\Fingerprint\ServerAPI\Model\SignalResponseIncognito', + 'root_apps' => '\Fingerprint\ServerAPI\Model\SignalResponseRootApps', + 'emulator' => '\Fingerprint\ServerAPI\Model\SignalResponseEmulator', + 'cloned_app' => '\Fingerprint\ServerAPI\Model\SignalResponseClonedApp', + 'factory_reset' => '\Fingerprint\ServerAPI\Model\SignalResponseFactoryReset', + 'jailbroken' => '\Fingerprint\ServerAPI\Model\SignalResponseJailbroken', + 'frida' => '\Fingerprint\ServerAPI\Model\SignalResponseFrida', + 'ip_blocklist' => '\Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist', + 'tor' => '\Fingerprint\ServerAPI\Model\SignalResponseTor', + 'privacy_settings' => '\Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings', + 'virtual_machine' => '\Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine', + 'vpn' => '\Fingerprint\ServerAPI\Model\SignalResponseVpn', + 'proxy' => '\Fingerprint\ServerAPI\Model\SignalResponseProxy', + 'tampering' => '\Fingerprint\ServerAPI\Model\SignalResponseTampering', + 'high_activity' => '\Fingerprint\ServerAPI\Model\SignalResponseHighActivity', + 'location_spoofing' => '\Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing', + 'suspect_score' => '\Fingerprint\ServerAPI\Model\SignalResponseSuspectScore', + 'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes']; + + /** + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'identification' => null, + 'botd' => null, + 'ip_info' => null, + 'incognito' => null, + 'root_apps' => null, + 'emulator' => null, + 'cloned_app' => null, + 'factory_reset' => null, + 'jailbroken' => null, + 'frida' => null, + 'ip_blocklist' => null, + 'tor' => null, + 'privacy_settings' => null, + 'virtual_machine' => null, + 'vpn' => null, + 'proxy' => null, + 'tampering' => null, + 'high_activity' => null, + 'location_spoofing' => null, + 'suspect_score' => null, + 'raw_device_attributes' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'identification' => 'identification', -'botd' => 'botd', -'ip_info' => 'ipInfo', -'incognito' => 'incognito', -'root_apps' => 'rootApps', -'emulator' => 'emulator', -'cloned_app' => 'clonedApp', -'factory_reset' => 'factoryReset', -'jailbroken' => 'jailbroken', -'frida' => 'frida', -'ip_blocklist' => 'ipBlocklist', -'tor' => 'tor', -'privacy_settings' => 'privacySettings', -'virtual_machine' => 'virtualMachine', -'vpn' => 'vpn', -'proxy' => 'proxy', -'tampering' => 'tampering', -'high_activity' => 'highActivity', -'location_spoofing' => 'locationSpoofing', -'suspect_score' => 'suspectScore', -'raw_device_attributes' => 'rawDeviceAttributes' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'botd' => 'botd', + 'ip_info' => 'ipInfo', + 'incognito' => 'incognito', + 'root_apps' => 'rootApps', + 'emulator' => 'emulator', + 'cloned_app' => 'clonedApp', + 'factory_reset' => 'factoryReset', + 'jailbroken' => 'jailbroken', + 'frida' => 'frida', + 'ip_blocklist' => 'ipBlocklist', + 'tor' => 'tor', + 'privacy_settings' => 'privacySettings', + 'virtual_machine' => 'virtualMachine', + 'vpn' => 'vpn', + 'proxy' => 'proxy', + 'tampering' => 'tampering', + 'high_activity' => 'highActivity', + 'location_spoofing' => 'locationSpoofing', + 'suspect_score' => 'suspectScore', + 'raw_device_attributes' => 'rawDeviceAttributes']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'identification' => 'setIdentification', -'botd' => 'setBotd', -'ip_info' => 'setIpInfo', -'incognito' => 'setIncognito', -'root_apps' => 'setRootApps', -'emulator' => 'setEmulator', -'cloned_app' => 'setClonedApp', -'factory_reset' => 'setFactoryReset', -'jailbroken' => 'setJailbroken', -'frida' => 'setFrida', -'ip_blocklist' => 'setIpBlocklist', -'tor' => 'setTor', -'privacy_settings' => 'setPrivacySettings', -'virtual_machine' => 'setVirtualMachine', -'vpn' => 'setVpn', -'proxy' => 'setProxy', -'tampering' => 'setTampering', -'high_activity' => 'setHighActivity', -'location_spoofing' => 'setLocationSpoofing', -'suspect_score' => 'setSuspectScore', -'raw_device_attributes' => 'setRawDeviceAttributes' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'botd' => 'setBotd', + 'ip_info' => 'setIpInfo', + 'incognito' => 'setIncognito', + 'root_apps' => 'setRootApps', + 'emulator' => 'setEmulator', + 'cloned_app' => 'setClonedApp', + 'factory_reset' => 'setFactoryReset', + 'jailbroken' => 'setJailbroken', + 'frida' => 'setFrida', + 'ip_blocklist' => 'setIpBlocklist', + 'tor' => 'setTor', + 'privacy_settings' => 'setPrivacySettings', + 'virtual_machine' => 'setVirtualMachine', + 'vpn' => 'setVpn', + 'proxy' => 'setProxy', + 'tampering' => 'setTampering', + 'high_activity' => 'setHighActivity', + 'location_spoofing' => 'setLocationSpoofing', + 'suspect_score' => 'setSuspectScore', + 'raw_device_attributes' => 'setRawDeviceAttributes']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'identification' => 'getIdentification', -'botd' => 'getBotd', -'ip_info' => 'getIpInfo', -'incognito' => 'getIncognito', -'root_apps' => 'getRootApps', -'emulator' => 'getEmulator', -'cloned_app' => 'getClonedApp', -'factory_reset' => 'getFactoryReset', -'jailbroken' => 'getJailbroken', -'frida' => 'getFrida', -'ip_blocklist' => 'getIpBlocklist', -'tor' => 'getTor', -'privacy_settings' => 'getPrivacySettings', -'virtual_machine' => 'getVirtualMachine', -'vpn' => 'getVpn', -'proxy' => 'getProxy', -'tampering' => 'getTampering', -'high_activity' => 'getHighActivity', -'location_spoofing' => 'getLocationSpoofing', -'suspect_score' => 'getSuspectScore', -'raw_device_attributes' => 'getRawDeviceAttributes' ]; + 'botd' => 'getBotd', + 'ip_info' => 'getIpInfo', + 'incognito' => 'getIncognito', + 'root_apps' => 'getRootApps', + 'emulator' => 'getEmulator', + 'cloned_app' => 'getClonedApp', + 'factory_reset' => 'getFactoryReset', + 'jailbroken' => 'getJailbroken', + 'frida' => 'getFrida', + 'ip_blocklist' => 'getIpBlocklist', + 'tor' => 'getTor', + 'privacy_settings' => 'getPrivacySettings', + 'virtual_machine' => 'getVirtualMachine', + 'vpn' => 'getVpn', + 'proxy' => 'getProxy', + 'tampering' => 'getTampering', + 'high_activity' => 'getHighActivity', + 'location_spoofing' => 'getLocationSpoofing', + 'suspect_score' => 'getSuspectScore', + 'raw_device_attributes' => 'getRawDeviceAttributes']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['identification'] = isset($data['identification']) ? $data['identification'] : null; + $this->container['botd'] = isset($data['botd']) ? $data['botd'] : null; + $this->container['ip_info'] = isset($data['ip_info']) ? $data['ip_info'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['root_apps'] = isset($data['root_apps']) ? $data['root_apps'] : null; + $this->container['emulator'] = isset($data['emulator']) ? $data['emulator'] : null; + $this->container['cloned_app'] = isset($data['cloned_app']) ? $data['cloned_app'] : null; + $this->container['factory_reset'] = isset($data['factory_reset']) ? $data['factory_reset'] : null; + $this->container['jailbroken'] = isset($data['jailbroken']) ? $data['jailbroken'] : null; + $this->container['frida'] = isset($data['frida']) ? $data['frida'] : null; + $this->container['ip_blocklist'] = isset($data['ip_blocklist']) ? $data['ip_blocklist'] : null; + $this->container['tor'] = isset($data['tor']) ? $data['tor'] : null; + $this->container['privacy_settings'] = isset($data['privacy_settings']) ? $data['privacy_settings'] : null; + $this->container['virtual_machine'] = isset($data['virtual_machine']) ? $data['virtual_machine'] : null; + $this->container['vpn'] = isset($data['vpn']) ? $data['vpn'] : null; + $this->container['proxy'] = isset($data['proxy']) ? $data['proxy'] : null; + $this->container['tampering'] = isset($data['tampering']) ? $data['tampering'] : null; + $this->container['high_activity'] = isset($data['high_activity']) ? $data['high_activity'] : null; + $this->container['location_spoofing'] = isset($data['location_spoofing']) ? $data['location_spoofing'] : null; + $this->container['suspect_score'] = isset($data['suspect_score']) ? $data['suspect_score'] : null; + $this->container['raw_device_attributes'] = isset($data['raw_device_attributes']) ? $data['raw_device_attributes'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -224,7 +277,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -234,7 +287,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -253,46 +306,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['identification'] = isset($data['identification']) ? $data['identification'] : null; - $this->container['botd'] = isset($data['botd']) ? $data['botd'] : null; - $this->container['ip_info'] = isset($data['ip_info']) ? $data['ip_info'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['root_apps'] = isset($data['root_apps']) ? $data['root_apps'] : null; - $this->container['emulator'] = isset($data['emulator']) ? $data['emulator'] : null; - $this->container['cloned_app'] = isset($data['cloned_app']) ? $data['cloned_app'] : null; - $this->container['factory_reset'] = isset($data['factory_reset']) ? $data['factory_reset'] : null; - $this->container['jailbroken'] = isset($data['jailbroken']) ? $data['jailbroken'] : null; - $this->container['frida'] = isset($data['frida']) ? $data['frida'] : null; - $this->container['ip_blocklist'] = isset($data['ip_blocklist']) ? $data['ip_blocklist'] : null; - $this->container['tor'] = isset($data['tor']) ? $data['tor'] : null; - $this->container['privacy_settings'] = isset($data['privacy_settings']) ? $data['privacy_settings'] : null; - $this->container['virtual_machine'] = isset($data['virtual_machine']) ? $data['virtual_machine'] : null; - $this->container['vpn'] = isset($data['vpn']) ? $data['vpn'] : null; - $this->container['proxy'] = isset($data['proxy']) ? $data['proxy'] : null; - $this->container['tampering'] = isset($data['tampering']) ? $data['tampering'] : null; - $this->container['high_activity'] = isset($data['high_activity']) ? $data['high_activity'] : null; - $this->container['location_spoofing'] = isset($data['location_spoofing']) ? $data['location_spoofing'] : null; - $this->container['suspect_score'] = isset($data['suspect_score']) ? $data['suspect_score'] : null; - $this->container['raw_device_attributes'] = isset($data['raw_device_attributes']) ? $data['raw_device_attributes'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -300,27 +313,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets identification + * Gets identification. * - * @return \Fingerprint\ServerAPI\Model\ProductsResponseIdentification + * @return ProductsResponseIdentification */ public function getIdentification() { @@ -328,9 +338,9 @@ public function getIdentification() } /** - * Sets identification + * Sets identification. * - * @param \Fingerprint\ServerAPI\Model\ProductsResponseIdentification $identification identification + * @param ProductsResponseIdentification $identification identification * * @return $this */ @@ -342,9 +352,9 @@ public function setIdentification($identification) } /** - * Gets botd + * Gets botd. * - * @return \Fingerprint\ServerAPI\Model\ProductsResponseBotd + * @return ProductsResponseBotd */ public function getBotd() { @@ -352,9 +362,9 @@ public function getBotd() } /** - * Sets botd + * Sets botd. * - * @param \Fingerprint\ServerAPI\Model\ProductsResponseBotd $botd botd + * @param ProductsResponseBotd $botd botd * * @return $this */ @@ -366,9 +376,9 @@ public function setBotd($botd) } /** - * Gets ip_info + * Gets ip_info. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseIpInfo + * @return SignalResponseIpInfo */ public function getIpInfo() { @@ -376,9 +386,9 @@ public function getIpInfo() } /** - * Sets ip_info + * Sets ip_info. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseIpInfo $ip_info ip_info + * @param SignalResponseIpInfo $ip_info ip_info * * @return $this */ @@ -390,9 +400,9 @@ public function setIpInfo($ip_info) } /** - * Gets incognito + * Gets incognito. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseIncognito + * @return SignalResponseIncognito */ public function getIncognito() { @@ -400,9 +410,9 @@ public function getIncognito() } /** - * Sets incognito + * Sets incognito. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseIncognito $incognito incognito + * @param SignalResponseIncognito $incognito incognito * * @return $this */ @@ -414,9 +424,9 @@ public function setIncognito($incognito) } /** - * Gets root_apps + * Gets root_apps. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseRootApps + * @return SignalResponseRootApps */ public function getRootApps() { @@ -424,9 +434,9 @@ public function getRootApps() } /** - * Sets root_apps + * Sets root_apps. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseRootApps $root_apps root_apps + * @param SignalResponseRootApps $root_apps root_apps * * @return $this */ @@ -438,9 +448,9 @@ public function setRootApps($root_apps) } /** - * Gets emulator + * Gets emulator. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseEmulator + * @return SignalResponseEmulator */ public function getEmulator() { @@ -448,9 +458,9 @@ public function getEmulator() } /** - * Sets emulator + * Sets emulator. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseEmulator $emulator emulator + * @param SignalResponseEmulator $emulator emulator * * @return $this */ @@ -462,9 +472,9 @@ public function setEmulator($emulator) } /** - * Gets cloned_app + * Gets cloned_app. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseClonedApp + * @return SignalResponseClonedApp */ public function getClonedApp() { @@ -472,9 +482,9 @@ public function getClonedApp() } /** - * Sets cloned_app + * Sets cloned_app. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseClonedApp $cloned_app cloned_app + * @param SignalResponseClonedApp $cloned_app cloned_app * * @return $this */ @@ -486,9 +496,9 @@ public function setClonedApp($cloned_app) } /** - * Gets factory_reset + * Gets factory_reset. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseFactoryReset + * @return SignalResponseFactoryReset */ public function getFactoryReset() { @@ -496,9 +506,9 @@ public function getFactoryReset() } /** - * Sets factory_reset + * Sets factory_reset. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseFactoryReset $factory_reset factory_reset + * @param SignalResponseFactoryReset $factory_reset factory_reset * * @return $this */ @@ -510,9 +520,9 @@ public function setFactoryReset($factory_reset) } /** - * Gets jailbroken + * Gets jailbroken. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseJailbroken + * @return SignalResponseJailbroken */ public function getJailbroken() { @@ -520,9 +530,9 @@ public function getJailbroken() } /** - * Sets jailbroken + * Sets jailbroken. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseJailbroken $jailbroken jailbroken + * @param SignalResponseJailbroken $jailbroken jailbroken * * @return $this */ @@ -534,9 +544,9 @@ public function setJailbroken($jailbroken) } /** - * Gets frida + * Gets frida. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseFrida + * @return SignalResponseFrida */ public function getFrida() { @@ -544,9 +554,9 @@ public function getFrida() } /** - * Sets frida + * Sets frida. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseFrida $frida frida + * @param SignalResponseFrida $frida frida * * @return $this */ @@ -558,9 +568,9 @@ public function setFrida($frida) } /** - * Gets ip_blocklist + * Gets ip_blocklist. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist + * @return SignalResponseIpBlocklist */ public function getIpBlocklist() { @@ -568,9 +578,9 @@ public function getIpBlocklist() } /** - * Sets ip_blocklist + * Sets ip_blocklist. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseIpBlocklist $ip_blocklist ip_blocklist + * @param SignalResponseIpBlocklist $ip_blocklist ip_blocklist * * @return $this */ @@ -582,9 +592,9 @@ public function setIpBlocklist($ip_blocklist) } /** - * Gets tor + * Gets tor. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseTor + * @return SignalResponseTor */ public function getTor() { @@ -592,9 +602,9 @@ public function getTor() } /** - * Sets tor + * Sets tor. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseTor $tor tor + * @param SignalResponseTor $tor tor * * @return $this */ @@ -606,9 +616,9 @@ public function setTor($tor) } /** - * Gets privacy_settings + * Gets privacy_settings. * - * @return \Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings + * @return SignalResponsePrivacySettings */ public function getPrivacySettings() { @@ -616,9 +626,9 @@ public function getPrivacySettings() } /** - * Sets privacy_settings + * Sets privacy_settings. * - * @param \Fingerprint\ServerAPI\Model\SignalResponsePrivacySettings $privacy_settings privacy_settings + * @param SignalResponsePrivacySettings $privacy_settings privacy_settings * * @return $this */ @@ -630,9 +640,9 @@ public function setPrivacySettings($privacy_settings) } /** - * Gets virtual_machine + * Gets virtual_machine. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine + * @return SignalResponseVirtualMachine */ public function getVirtualMachine() { @@ -640,9 +650,9 @@ public function getVirtualMachine() } /** - * Sets virtual_machine + * Sets virtual_machine. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseVirtualMachine $virtual_machine virtual_machine + * @param SignalResponseVirtualMachine $virtual_machine virtual_machine * * @return $this */ @@ -654,9 +664,9 @@ public function setVirtualMachine($virtual_machine) } /** - * Gets vpn + * Gets vpn. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseVpn + * @return SignalResponseVpn */ public function getVpn() { @@ -664,9 +674,9 @@ public function getVpn() } /** - * Sets vpn + * Sets vpn. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseVpn $vpn vpn + * @param SignalResponseVpn $vpn vpn * * @return $this */ @@ -678,9 +688,9 @@ public function setVpn($vpn) } /** - * Gets proxy + * Gets proxy. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseProxy + * @return SignalResponseProxy */ public function getProxy() { @@ -688,9 +698,9 @@ public function getProxy() } /** - * Sets proxy + * Sets proxy. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseProxy $proxy proxy + * @param SignalResponseProxy $proxy proxy * * @return $this */ @@ -702,9 +712,9 @@ public function setProxy($proxy) } /** - * Gets tampering + * Gets tampering. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseTampering + * @return SignalResponseTampering */ public function getTampering() { @@ -712,9 +722,9 @@ public function getTampering() } /** - * Sets tampering + * Sets tampering. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseTampering $tampering tampering + * @param SignalResponseTampering $tampering tampering * * @return $this */ @@ -726,9 +736,9 @@ public function setTampering($tampering) } /** - * Gets high_activity + * Gets high_activity. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseHighActivity + * @return SignalResponseHighActivity */ public function getHighActivity() { @@ -736,9 +746,9 @@ public function getHighActivity() } /** - * Sets high_activity + * Sets high_activity. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseHighActivity $high_activity high_activity + * @param SignalResponseHighActivity $high_activity high_activity * * @return $this */ @@ -750,9 +760,9 @@ public function setHighActivity($high_activity) } /** - * Gets location_spoofing + * Gets location_spoofing. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing + * @return SignalResponseLocationSpoofing */ public function getLocationSpoofing() { @@ -760,9 +770,9 @@ public function getLocationSpoofing() } /** - * Sets location_spoofing + * Sets location_spoofing. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseLocationSpoofing $location_spoofing location_spoofing + * @param SignalResponseLocationSpoofing $location_spoofing location_spoofing * * @return $this */ @@ -774,9 +784,9 @@ public function setLocationSpoofing($location_spoofing) } /** - * Gets suspect_score + * Gets suspect_score. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseSuspectScore + * @return SignalResponseSuspectScore */ public function getSuspectScore() { @@ -784,9 +794,9 @@ public function getSuspectScore() } /** - * Sets suspect_score + * Sets suspect_score. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseSuspectScore $suspect_score suspect_score + * @param SignalResponseSuspectScore $suspect_score suspect_score * * @return $this */ @@ -798,9 +808,9 @@ public function setSuspectScore($suspect_score) } /** - * Gets raw_device_attributes + * Gets raw_device_attributes. * - * @return \Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes + * @return SignalResponseRawDeviceAttributes */ public function getRawDeviceAttributes() { @@ -808,9 +818,9 @@ public function getRawDeviceAttributes() } /** - * Sets raw_device_attributes + * Sets raw_device_attributes. * - * @param \Fingerprint\ServerAPI\Model\SignalResponseRawDeviceAttributes $raw_device_attributes raw_device_attributes + * @param SignalResponseRawDeviceAttributes $raw_device_attributes raw_device_attributes * * @return $this */ @@ -820,12 +830,13 @@ public function setRawDeviceAttributes($raw_device_attributes) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -836,7 +847,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -849,10 +860,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -867,30 +876,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductsResponseBotd.php b/src/Model/ProductsResponseBotd.php index 352245dc..3897e44a 100644 --- a/src/Model/ProductsResponseBotd.php +++ b/src/Model/ProductsResponseBotd.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\BotdResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\BotdResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\BotdResult + * @return BotdResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\BotdResult $data data + * @param BotdResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductsResponseIdentification.php b/src/Model/ProductsResponseIdentification.php index a6034934..11480f1c 100644 --- a/src/Model/ProductsResponseIdentification.php +++ b/src/Model/ProductsResponseIdentification.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData', -'error' => '\Fingerprint\ServerAPI\Model\IdentificationError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData', + 'error' => '\Fingerprint\ServerAPI\Model\IdentificationError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData + * @return ProductsResponseIdentificationData */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\ProductsResponseIdentificationData $data data + * @param ProductsResponseIdentificationData $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\IdentificationError + * @return IdentificationError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\IdentificationError $error error + * @param IdentificationError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProductsResponseIdentificationData.php b/src/Model/ProductsResponseIdentificationData.php index 0e77cc98..179e9557 100644 --- a/src/Model/ProductsResponseIdentificationData.php +++ b/src/Model/ProductsResponseIdentificationData.php @@ -1,17 +1,16 @@ 'string', -'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', -'incognito' => 'bool', -'ip' => 'string', -'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', -'timestamp' => 'int', -'time' => '\DateTime', -'url' => 'string', -'tag' => 'map[string,object]', -'linked_id' => 'string', -'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', -'visitor_found' => 'bool', -'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'visitor_id' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'request_id' => null, -'browser_details' => null, -'incognito' => null, -'ip' => 'ipv4', -'ip_location' => null, -'timestamp' => 'int64', -'time' => 'date-time', -'url' => null, -'tag' => null, -'linked_id' => null, -'confidence' => null, -'visitor_found' => null, -'first_seen_at' => null, -'last_seen_at' => null, -'visitor_id' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization + protected static $swaggerTypes = [ + 'request_id' => 'string', + 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', + 'incognito' => 'bool', + 'ip' => 'string', + 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', + 'timestamp' => 'int', + 'time' => '\DateTime', + 'url' => 'string', + 'tag' => 'map[string,object]', + 'linked_id' => 'string', + 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', + 'visitor_found' => 'bool', + 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'visitor_id' => 'string']; + + /** + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'request_id' => null, + 'browser_details' => null, + 'incognito' => null, + 'ip' => 'ipv4', + 'ip_location' => null, + 'timestamp' => 'int64', + 'time' => 'date-time', + 'url' => null, + 'tag' => null, + 'linked_id' => null, + 'confidence' => null, + 'visitor_found' => null, + 'first_seen_at' => null, + 'last_seen_at' => null, + 'visitor_id' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'request_id' => 'requestId', -'browser_details' => 'browserDetails', -'incognito' => 'incognito', -'ip' => 'ip', -'ip_location' => 'ipLocation', -'timestamp' => 'timestamp', -'time' => 'time', -'url' => 'url', -'tag' => 'tag', -'linked_id' => 'linkedId', -'confidence' => 'confidence', -'visitor_found' => 'visitorFound', -'first_seen_at' => 'firstSeenAt', -'last_seen_at' => 'lastSeenAt', -'visitor_id' => 'visitorId' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'browser_details' => 'browserDetails', + 'incognito' => 'incognito', + 'ip' => 'ip', + 'ip_location' => 'ipLocation', + 'timestamp' => 'timestamp', + 'time' => 'time', + 'url' => 'url', + 'tag' => 'tag', + 'linked_id' => 'linkedId', + 'confidence' => 'confidence', + 'visitor_found' => 'visitorFound', + 'first_seen_at' => 'firstSeenAt', + 'last_seen_at' => 'lastSeenAt', + 'visitor_id' => 'visitorId']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'request_id' => 'setRequestId', -'browser_details' => 'setBrowserDetails', -'incognito' => 'setIncognito', -'ip' => 'setIp', -'ip_location' => 'setIpLocation', -'timestamp' => 'setTimestamp', -'time' => 'setTime', -'url' => 'setUrl', -'tag' => 'setTag', -'linked_id' => 'setLinkedId', -'confidence' => 'setConfidence', -'visitor_found' => 'setVisitorFound', -'first_seen_at' => 'setFirstSeenAt', -'last_seen_at' => 'setLastSeenAt', -'visitor_id' => 'setVisitorId' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'browser_details' => 'setBrowserDetails', + 'incognito' => 'setIncognito', + 'ip' => 'setIp', + 'ip_location' => 'setIpLocation', + 'timestamp' => 'setTimestamp', + 'time' => 'setTime', + 'url' => 'setUrl', + 'tag' => 'setTag', + 'linked_id' => 'setLinkedId', + 'confidence' => 'setConfidence', + 'visitor_found' => 'setVisitorFound', + 'first_seen_at' => 'setFirstSeenAt', + 'last_seen_at' => 'setLastSeenAt', + 'visitor_id' => 'setVisitorId']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'request_id' => 'getRequestId', -'browser_details' => 'getBrowserDetails', -'incognito' => 'getIncognito', -'ip' => 'getIp', -'ip_location' => 'getIpLocation', -'timestamp' => 'getTimestamp', -'time' => 'getTime', -'url' => 'getUrl', -'tag' => 'getTag', -'linked_id' => 'getLinkedId', -'confidence' => 'getConfidence', -'visitor_found' => 'getVisitorFound', -'first_seen_at' => 'getFirstSeenAt', -'last_seen_at' => 'getLastSeenAt', -'visitor_id' => 'getVisitorId' ]; + 'browser_details' => 'getBrowserDetails', + 'incognito' => 'getIncognito', + 'ip' => 'getIp', + 'ip_location' => 'getIpLocation', + 'timestamp' => 'getTimestamp', + 'time' => 'getTime', + 'url' => 'getUrl', + 'tag' => 'getTag', + 'linked_id' => 'getLinkedId', + 'confidence' => 'getConfidence', + 'visitor_found' => 'getVisitorFound', + 'first_seen_at' => 'getFirstSeenAt', + 'last_seen_at' => 'getLastSeenAt', + 'visitor_id' => 'getVisitorId']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; + $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; + $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; + $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; + $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -193,7 +239,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -203,7 +249,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -222,40 +268,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; - $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; - $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; - $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; - $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -265,59 +277,59 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['browser_details'] === null) { + if (null === $this->container['browser_details']) { $invalidProperties[] = "'browser_details' can't be null"; } - if ($this->container['incognito'] === null) { + if (null === $this->container['incognito']) { $invalidProperties[] = "'incognito' can't be null"; } - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['tag'] === null) { + if (null === $this->container['tag']) { $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['visitor_found'] === null) { + if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } - if ($this->container['first_seen_at'] === null) { + if (null === $this->container['first_seen_at']) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if ($this->container['last_seen_at'] === null) { + if (null === $this->container['last_seen_at']) { $invalidProperties[] = "'last_seen_at' can't be null"; } - if ($this->container['visitor_id'] === null) { + if (null === $this->container['visitor_id']) { $invalidProperties[] = "'visitor_id' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets request_id + * Gets request_id. * * @return string */ @@ -327,9 +339,9 @@ public function getRequestId() } /** - * Sets request_id + * Sets request_id. * - * @param string $request_id Unique identifier of the user's identification request. + * @param string $request_id unique identifier of the user's identification request * * @return $this */ @@ -341,9 +353,9 @@ public function setRequestId($request_id) } /** - * Gets browser_details + * Gets browser_details. * - * @return \Fingerprint\ServerAPI\Model\BrowserDetails + * @return BrowserDetails */ public function getBrowserDetails() { @@ -351,9 +363,9 @@ public function getBrowserDetails() } /** - * Sets browser_details + * Sets browser_details. * - * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details + * @param BrowserDetails $browser_details browser_details * * @return $this */ @@ -365,7 +377,7 @@ public function setBrowserDetails($browser_details) } /** - * Gets incognito + * Gets incognito. * * @return bool */ @@ -375,9 +387,9 @@ public function getIncognito() } /** - * Sets incognito + * Sets incognito. * - * @param bool $incognito Flag if user used incognito session. + * @param bool $incognito flag if user used incognito session * * @return $this */ @@ -389,7 +401,7 @@ public function setIncognito($incognito) } /** - * Gets ip + * Gets ip. * * @return string */ @@ -399,7 +411,7 @@ public function getIp() } /** - * Sets ip + * Sets ip. * * @param string $ip ip * @@ -413,9 +425,9 @@ public function setIp($ip) } /** - * Gets ip_location + * Gets ip_location. * - * @return \Fingerprint\ServerAPI\Model\DeprecatedIPLocation + * @return DeprecatedIPLocation */ public function getIpLocation() { @@ -423,9 +435,9 @@ public function getIpLocation() } /** - * Sets ip_location + * Sets ip_location. * - * @param \Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location + * @param DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -437,7 +449,7 @@ public function setIpLocation($ip_location) } /** - * Gets timestamp + * Gets timestamp. * * @return int */ @@ -447,9 +459,9 @@ public function getTimestamp() } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. + * @param int $timestamp timestamp of the event with millisecond precision in Unix time * * @return $this */ @@ -461,7 +473,7 @@ public function setTimestamp($timestamp) } /** - * Gets time + * Gets time. * * @return \DateTime */ @@ -471,9 +483,9 @@ public function getTime() } /** - * Sets time + * Sets time. * - * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. + * @param \DateTime $time time expressed according to ISO 8601 in UTC format * * @return $this */ @@ -485,7 +497,7 @@ public function setTime($time) } /** - * Gets url + * Gets url. * * @return string */ @@ -495,9 +507,9 @@ public function getUrl() } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which the identification request was sent. + * @param string $url page URL from which the identification request was sent * * @return $this */ @@ -509,7 +521,7 @@ public function setUrl($url) } /** - * Gets tag + * Gets tag. * * @return map[string,object] */ @@ -519,9 +531,9 @@ public function getTag() } /** - * Sets tag + * Sets tag. * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request. + * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ @@ -533,7 +545,7 @@ public function setTag($tag) } /** - * Gets linked_id + * Gets linked_id. * * @return string */ @@ -543,9 +555,9 @@ public function getLinkedId() } /** - * Sets linked_id + * 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 */ @@ -557,9 +569,9 @@ public function setLinkedId($linked_id) } /** - * Gets confidence + * Gets confidence. * - * @return \Fingerprint\ServerAPI\Model\Confidence + * @return Confidence */ public function getConfidence() { @@ -567,9 +579,9 @@ public function getConfidence() } /** - * Sets confidence + * Sets confidence. * - * @param \Fingerprint\ServerAPI\Model\Confidence $confidence confidence + * @param Confidence $confidence confidence * * @return $this */ @@ -581,7 +593,7 @@ public function setConfidence($confidence) } /** - * Gets visitor_found + * Gets visitor_found. * * @return bool */ @@ -591,9 +603,9 @@ public function getVisitorFound() } /** - * Sets visitor_found + * Sets visitor_found. * - * @param bool $visitor_found Attribute represents if a visitor had been identified before. + * @param bool $visitor_found attribute represents if a visitor had been identified before * * @return $this */ @@ -605,9 +617,9 @@ public function setVisitorFound($visitor_found) } /** - * Gets first_seen_at + * Gets first_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getFirstSeenAt() { @@ -615,9 +627,9 @@ public function getFirstSeenAt() } /** - * Sets first_seen_at + * Sets first_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at + * @param SeenAt $first_seen_at first_seen_at * * @return $this */ @@ -629,9 +641,9 @@ public function setFirstSeenAt($first_seen_at) } /** - * Gets last_seen_at + * Gets last_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getLastSeenAt() { @@ -639,9 +651,9 @@ public function getLastSeenAt() } /** - * Sets last_seen_at + * Sets last_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at + * @param SeenAt $last_seen_at last_seen_at * * @return $this */ @@ -653,7 +665,7 @@ public function setLastSeenAt($last_seen_at) } /** - * Gets visitor_id + * Gets visitor_id. * * @return string */ @@ -663,9 +675,9 @@ public function getVisitorId() } /** - * Sets visitor_id + * Sets visitor_id. * - * @param string $visitor_id String of 20 characters that uniquely identifies the visitor's browser. + * @param string $visitor_id string of 20 characters that uniquely identifies the visitor's browser * * @return $this */ @@ -675,12 +687,13 @@ public function setVisitorId($visitor_id) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -691,7 +704,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -704,10 +717,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -722,30 +733,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ProxyResult.php b/src/Model/ProxyResult.php index 51f5b296..68db9d14 100644 --- a/src/Model/ProxyResult.php +++ b/src/Model/ProxyResult.php @@ -1,17 +1,16 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -210,9 +222,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result `true` if the request IP address is used by a public proxy provider, `false` otherwise. + * @param bool $result `true` if the request IP address is used by a public proxy provider, `false` otherwise * * @return $this */ @@ -222,12 +234,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index cd96408f..18c9ecd7 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -1,17 +1,16 @@ listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -211,7 +220,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -224,10 +233,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -242,30 +249,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Response.php b/src/Model/Response.php index 540abf2a..1bb0e2e8 100644 --- a/src/Model/Response.php +++ b/src/Model/Response.php @@ -1,17 +1,16 @@ 'string', -'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', -'last_timestamp' => 'int', -'pagination_key' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'visitor_id' => null, -'visits' => null, -'last_timestamp' => 'int64', -'pagination_key' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'visitor_id' => 'string', + 'visits' => '\Fingerprint\ServerAPI\Model\ResponseVisits[]', + 'last_timestamp' => 'int', + 'pagination_key' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'visitor_id' => null, + 'visits' => null, + 'last_timestamp' => 'int64', + 'pagination_key' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'visitor_id' => 'visitorId', -'visits' => 'visits', -'last_timestamp' => 'lastTimestamp', -'pagination_key' => 'paginationKey' ]; + 'visits' => 'visits', + 'last_timestamp' => 'lastTimestamp', + 'pagination_key' => 'paginationKey']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'visitor_id' => 'setVisitorId', -'visits' => 'setVisits', -'last_timestamp' => 'setLastTimestamp', -'pagination_key' => 'setPaginationKey' ]; + 'visits' => 'setVisits', + 'last_timestamp' => 'setLastTimestamp', + 'pagination_key' => 'setPaginationKey']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'visitor_id' => 'getVisitorId', -'visits' => 'getVisits', -'last_timestamp' => 'getLastTimestamp', -'pagination_key' => 'getPaginationKey' ]; + 'visits' => 'getVisits', + 'last_timestamp' => 'getLastTimestamp', + 'pagination_key' => 'getPaginationKey']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; + $this->container['visits'] = isset($data['visits']) ? $data['visits'] : null; + $this->container['last_timestamp'] = isset($data['last_timestamp']) ? $data['last_timestamp'] : null; + $this->container['pagination_key'] = isset($data['pagination_key']) ? $data['pagination_key'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -139,7 +175,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -149,7 +185,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -168,29 +204,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; - $this->container['visits'] = isset($data['visits']) ? $data['visits'] : null; - $this->container['last_timestamp'] = isset($data['last_timestamp']) ? $data['last_timestamp'] : null; - $this->container['pagination_key'] = isset($data['pagination_key']) ? $data['pagination_key'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -200,29 +213,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['visitor_id'] === null) { + if (null === $this->container['visitor_id']) { $invalidProperties[] = "'visitor_id' can't be null"; } - if ($this->container['visits'] === null) { + if (null === $this->container['visits']) { $invalidProperties[] = "'visits' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets visitor_id + * Gets visitor_id. * * @return string */ @@ -232,7 +245,7 @@ public function getVisitorId() } /** - * Sets visitor_id + * Sets visitor_id. * * @param string $visitor_id visitor_id * @@ -246,7 +259,7 @@ public function setVisitorId($visitor_id) } /** - * Gets visits + * Gets visits. * * @return \Fingerprint\ServerAPI\Model\ResponseVisits[] */ @@ -256,7 +269,7 @@ public function getVisits() } /** - * Sets visits + * Sets visits. * * @param \Fingerprint\ServerAPI\Model\ResponseVisits[] $visits visits * @@ -270,7 +283,7 @@ public function setVisits($visits) } /** - * Gets last_timestamp + * Gets last_timestamp. * * @return int */ @@ -280,7 +293,7 @@ public function getLastTimestamp() } /** - * Sets last_timestamp + * 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. * @@ -294,7 +307,7 @@ public function setLastTimestamp($last_timestamp) } /** - * Gets pagination_key + * Gets pagination_key. * * @return string */ @@ -304,7 +317,7 @@ public function getPaginationKey() } /** - * Sets pagination_key + * 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. * @@ -316,12 +329,13 @@ public function setPaginationKey($pagination_key) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -332,7 +346,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -345,10 +359,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -363,30 +375,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/ResponseVisits.php b/src/Model/ResponseVisits.php index 9f72d757..36789502 100644 --- a/src/Model/ResponseVisits.php +++ b/src/Model/ResponseVisits.php @@ -1,17 +1,16 @@ 'string', -'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', -'incognito' => 'bool', -'ip' => 'string', -'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', -'timestamp' => 'int', -'time' => '\DateTime', -'url' => 'string', -'tag' => 'map[string,object]', -'linked_id' => 'string', -'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', -'visitor_found' => 'bool', -'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'request_id' => null, -'browser_details' => null, -'incognito' => null, -'ip' => 'ipv4', -'ip_location' => null, -'timestamp' => 'int64', -'time' => 'date-time', -'url' => null, -'tag' => null, -'linked_id' => null, -'confidence' => null, -'visitor_found' => null, -'first_seen_at' => null, -'last_seen_at' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization + protected static $swaggerTypes = [ + 'request_id' => 'string', + 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', + 'incognito' => 'bool', + 'ip' => 'string', + 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', + 'timestamp' => 'int', + 'time' => '\DateTime', + 'url' => 'string', + 'tag' => 'map[string,object]', + 'linked_id' => 'string', + 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', + 'visitor_found' => 'bool', + 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt']; + + /** + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'request_id' => null, + 'browser_details' => null, + 'incognito' => null, + 'ip' => 'ipv4', + 'ip_location' => null, + 'timestamp' => 'int64', + 'time' => 'date-time', + 'url' => null, + 'tag' => null, + 'linked_id' => null, + 'confidence' => null, + 'visitor_found' => null, + 'first_seen_at' => null, + 'last_seen_at' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'request_id' => 'requestId', -'browser_details' => 'browserDetails', -'incognito' => 'incognito', -'ip' => 'ip', -'ip_location' => 'ipLocation', -'timestamp' => 'timestamp', -'time' => 'time', -'url' => 'url', -'tag' => 'tag', -'linked_id' => 'linkedId', -'confidence' => 'confidence', -'visitor_found' => 'visitorFound', -'first_seen_at' => 'firstSeenAt', -'last_seen_at' => 'lastSeenAt' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'browser_details' => 'browserDetails', + 'incognito' => 'incognito', + 'ip' => 'ip', + 'ip_location' => 'ipLocation', + 'timestamp' => 'timestamp', + 'time' => 'time', + 'url' => 'url', + 'tag' => 'tag', + 'linked_id' => 'linkedId', + 'confidence' => 'confidence', + 'visitor_found' => 'visitorFound', + 'first_seen_at' => 'firstSeenAt', + 'last_seen_at' => 'lastSeenAt']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'request_id' => 'setRequestId', -'browser_details' => 'setBrowserDetails', -'incognito' => 'setIncognito', -'ip' => 'setIp', -'ip_location' => 'setIpLocation', -'timestamp' => 'setTimestamp', -'time' => 'setTime', -'url' => 'setUrl', -'tag' => 'setTag', -'linked_id' => 'setLinkedId', -'confidence' => 'setConfidence', -'visitor_found' => 'setVisitorFound', -'first_seen_at' => 'setFirstSeenAt', -'last_seen_at' => 'setLastSeenAt' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'browser_details' => 'setBrowserDetails', + 'incognito' => 'setIncognito', + 'ip' => 'setIp', + 'ip_location' => 'setIpLocation', + 'timestamp' => 'setTimestamp', + 'time' => 'setTime', + 'url' => 'setUrl', + 'tag' => 'setTag', + 'linked_id' => 'setLinkedId', + 'confidence' => 'setConfidence', + 'visitor_found' => 'setVisitorFound', + 'first_seen_at' => 'setFirstSeenAt', + 'last_seen_at' => 'setLastSeenAt']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'request_id' => 'getRequestId', -'browser_details' => 'getBrowserDetails', -'incognito' => 'getIncognito', -'ip' => 'getIp', -'ip_location' => 'getIpLocation', -'timestamp' => 'getTimestamp', -'time' => 'getTime', -'url' => 'getUrl', -'tag' => 'getTag', -'linked_id' => 'getLinkedId', -'confidence' => 'getConfidence', -'visitor_found' => 'getVisitorFound', -'first_seen_at' => 'getFirstSeenAt', -'last_seen_at' => 'getLastSeenAt' ]; + 'browser_details' => 'getBrowserDetails', + 'incognito' => 'getIncognito', + 'ip' => 'getIp', + 'ip_location' => 'getIpLocation', + 'timestamp' => 'getTimestamp', + 'time' => 'getTime', + 'url' => 'getUrl', + 'tag' => 'getTag', + 'linked_id' => 'getLinkedId', + 'confidence' => 'getConfidence', + 'visitor_found' => 'getVisitorFound', + 'first_seen_at' => 'getFirstSeenAt', + 'last_seen_at' => 'getLastSeenAt']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; + $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; + $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; + $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -188,7 +233,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -198,7 +243,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -217,39 +262,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; - $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; - $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; - $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -259,56 +271,56 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['browser_details'] === null) { + if (null === $this->container['browser_details']) { $invalidProperties[] = "'browser_details' can't be null"; } - if ($this->container['incognito'] === null) { + if (null === $this->container['incognito']) { $invalidProperties[] = "'incognito' can't be null"; } - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['tag'] === null) { + if (null === $this->container['tag']) { $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['visitor_found'] === null) { + if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } - if ($this->container['first_seen_at'] === null) { + if (null === $this->container['first_seen_at']) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if ($this->container['last_seen_at'] === null) { + if (null === $this->container['last_seen_at']) { $invalidProperties[] = "'last_seen_at' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets request_id + * Gets request_id. * * @return string */ @@ -318,9 +330,9 @@ public function getRequestId() } /** - * Sets request_id + * Sets request_id. * - * @param string $request_id Unique identifier of the user's identification request. + * @param string $request_id unique identifier of the user's identification request * * @return $this */ @@ -332,9 +344,9 @@ public function setRequestId($request_id) } /** - * Gets browser_details + * Gets browser_details. * - * @return \Fingerprint\ServerAPI\Model\BrowserDetails + * @return BrowserDetails */ public function getBrowserDetails() { @@ -342,9 +354,9 @@ public function getBrowserDetails() } /** - * Sets browser_details + * Sets browser_details. * - * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details + * @param BrowserDetails $browser_details browser_details * * @return $this */ @@ -356,7 +368,7 @@ public function setBrowserDetails($browser_details) } /** - * Gets incognito + * Gets incognito. * * @return bool */ @@ -366,9 +378,9 @@ public function getIncognito() } /** - * Sets incognito + * Sets incognito. * - * @param bool $incognito Flag if user used incognito session. + * @param bool $incognito flag if user used incognito session * * @return $this */ @@ -380,7 +392,7 @@ public function setIncognito($incognito) } /** - * Gets ip + * Gets ip. * * @return string */ @@ -390,7 +402,7 @@ public function getIp() } /** - * Sets ip + * Sets ip. * * @param string $ip ip * @@ -404,9 +416,9 @@ public function setIp($ip) } /** - * Gets ip_location + * Gets ip_location. * - * @return \Fingerprint\ServerAPI\Model\DeprecatedIPLocation + * @return DeprecatedIPLocation */ public function getIpLocation() { @@ -414,9 +426,9 @@ public function getIpLocation() } /** - * Sets ip_location + * Sets ip_location. * - * @param \Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location + * @param DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -428,7 +440,7 @@ public function setIpLocation($ip_location) } /** - * Gets timestamp + * Gets timestamp. * * @return int */ @@ -438,9 +450,9 @@ public function getTimestamp() } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. + * @param int $timestamp timestamp of the event with millisecond precision in Unix time * * @return $this */ @@ -452,7 +464,7 @@ public function setTimestamp($timestamp) } /** - * Gets time + * Gets time. * * @return \DateTime */ @@ -462,9 +474,9 @@ public function getTime() } /** - * Sets time + * Sets time. * - * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. + * @param \DateTime $time time expressed according to ISO 8601 in UTC format * * @return $this */ @@ -476,7 +488,7 @@ public function setTime($time) } /** - * Gets url + * Gets url. * * @return string */ @@ -486,9 +498,9 @@ public function getUrl() } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which the identification request was sent. + * @param string $url page URL from which the identification request was sent * * @return $this */ @@ -500,7 +512,7 @@ public function setUrl($url) } /** - * Gets tag + * Gets tag. * * @return map[string,object] */ @@ -510,9 +522,9 @@ public function getTag() } /** - * Sets tag + * Sets tag. * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request. + * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ @@ -524,7 +536,7 @@ public function setTag($tag) } /** - * Gets linked_id + * Gets linked_id. * * @return string */ @@ -534,9 +546,9 @@ public function getLinkedId() } /** - * Sets linked_id + * 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 */ @@ -548,9 +560,9 @@ public function setLinkedId($linked_id) } /** - * Gets confidence + * Gets confidence. * - * @return \Fingerprint\ServerAPI\Model\Confidence + * @return Confidence */ public function getConfidence() { @@ -558,9 +570,9 @@ public function getConfidence() } /** - * Sets confidence + * Sets confidence. * - * @param \Fingerprint\ServerAPI\Model\Confidence $confidence confidence + * @param Confidence $confidence confidence * * @return $this */ @@ -572,7 +584,7 @@ public function setConfidence($confidence) } /** - * Gets visitor_found + * Gets visitor_found. * * @return bool */ @@ -582,9 +594,9 @@ public function getVisitorFound() } /** - * Sets visitor_found + * Sets visitor_found. * - * @param bool $visitor_found Attribute represents if a visitor had been identified before. + * @param bool $visitor_found attribute represents if a visitor had been identified before * * @return $this */ @@ -596,9 +608,9 @@ public function setVisitorFound($visitor_found) } /** - * Gets first_seen_at + * Gets first_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getFirstSeenAt() { @@ -606,9 +618,9 @@ public function getFirstSeenAt() } /** - * Sets first_seen_at + * Sets first_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at + * @param SeenAt $first_seen_at first_seen_at * * @return $this */ @@ -620,9 +632,9 @@ public function setFirstSeenAt($first_seen_at) } /** - * Gets last_seen_at + * Gets last_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getLastSeenAt() { @@ -630,9 +642,9 @@ public function getLastSeenAt() } /** - * Sets last_seen_at + * Sets last_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at + * @param SeenAt $last_seen_at last_seen_at * * @return $this */ @@ -642,12 +654,13 @@ public function setLastSeenAt($last_seen_at) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -658,7 +671,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -671,10 +684,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -689,30 +700,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/RootAppsResult.php b/src/Model/RootAppsResult.php index c1e6eae6..b886abf7 100644 --- a/src/Model/RootAppsResult.php +++ b/src/Model/RootAppsResult.php @@ -1,17 +1,16 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -210,7 +222,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result Android specific root management apps detection. There are 2 values: ‱ `true` - Root Management Apps detected (e.g. Magisk) ‱ `false` - No Root Management Apps detected or the client isn't Android. * @@ -222,12 +234,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SeenAt.php b/src/Model/SeenAt.php index 17c647fc..0e26bd5a 100644 --- a/src/Model/SeenAt.php +++ b/src/Model/SeenAt.php @@ -1,17 +1,16 @@ '\DateTime', -'subscription' => '\DateTime' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'global' => 'date-time', -'subscription' => 'date-time' ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'global' => '\DateTime', + 'subscription' => '\DateTime']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'global' => 'date-time', + 'subscription' => 'date-time']; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'global' => 'global', -'subscription' => 'subscription' ]; + 'subscription' => 'subscription']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'global' => 'setGlobal', -'subscription' => 'setSubscription' ]; + 'subscription' => 'setSubscription']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'global' => 'getGlobal', -'subscription' => 'getSubscription' ]; + 'subscription' => 'getSubscription']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['global'] = isset($data['global']) ? $data['global'] : null; + $this->container['subscription'] = isset($data['subscription']) ? $data['subscription'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['global'] = isset($data['global']) ? $data['global'] : null; - $this->container['subscription'] = isset($data['subscription']) ? $data['subscription'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -187,29 +199,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['global'] === null) { + if (null === $this->container['global']) { $invalidProperties[] = "'global' can't be null"; } - if ($this->container['subscription'] === null) { + if (null === $this->container['subscription']) { $invalidProperties[] = "'subscription' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets global + * Gets global. * * @return \DateTime */ @@ -219,7 +231,7 @@ public function getGlobal() } /** - * Sets global + * Sets global. * * @param \DateTime $global global * @@ -233,7 +245,7 @@ public function setGlobal($global) } /** - * Gets subscription + * Gets subscription. * * @return \DateTime */ @@ -243,7 +255,7 @@ public function getSubscription() } /** - * Sets subscription + * Sets subscription. * * @param \DateTime $subscription subscription * @@ -255,12 +267,13 @@ public function setSubscription($subscription) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -271,7 +284,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -284,10 +297,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -302,30 +313,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseClonedApp.php b/src/Model/SignalResponseClonedApp.php index 6f1e3658..bab0095a 100644 --- a/src/Model/SignalResponseClonedApp.php +++ b/src/Model/SignalResponseClonedApp.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\ClonedAppResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\ClonedAppResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\ClonedAppResult + * @return ClonedAppResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\ClonedAppResult $data data + * @param ClonedAppResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseEmulator.php b/src/Model/SignalResponseEmulator.php index 24e25401..3a985b4b 100644 --- a/src/Model/SignalResponseEmulator.php +++ b/src/Model/SignalResponseEmulator.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\EmulatorResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\EmulatorResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\EmulatorResult + * @return EmulatorResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\EmulatorResult $data data + * @param EmulatorResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseFactoryReset.php b/src/Model/SignalResponseFactoryReset.php index b0dca3c5..773d3c59 100644 --- a/src/Model/SignalResponseFactoryReset.php +++ b/src/Model/SignalResponseFactoryReset.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\FactoryResetResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\FactoryResetResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\FactoryResetResult + * @return FactoryResetResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\FactoryResetResult $data data + * @param FactoryResetResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseFrida.php b/src/Model/SignalResponseFrida.php index 2f4ada91..944505f5 100644 --- a/src/Model/SignalResponseFrida.php +++ b/src/Model/SignalResponseFrida.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\FridaResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\FridaResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\FridaResult + * @return FridaResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\FridaResult $data data + * @param FridaResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseHighActivity.php b/src/Model/SignalResponseHighActivity.php index 95653e16..8f59aac2 100644 --- a/src/Model/SignalResponseHighActivity.php +++ b/src/Model/SignalResponseHighActivity.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\HighActivityResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\HighActivityResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\HighActivityResult + * @return HighActivityResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\HighActivityResult $data data + * @param HighActivityResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseIncognito.php b/src/Model/SignalResponseIncognito.php index 4d260b01..402abf6d 100644 --- a/src/Model/SignalResponseIncognito.php +++ b/src/Model/SignalResponseIncognito.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\IncognitoResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\IncognitoResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\IncognitoResult + * @return IncognitoResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\IncognitoResult $data data + * @param IncognitoResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseIpBlocklist.php b/src/Model/SignalResponseIpBlocklist.php index ef458033..0106c05a 100644 --- a/src/Model/SignalResponseIpBlocklist.php +++ b/src/Model/SignalResponseIpBlocklist.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\IpBlockListResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\IpBlockListResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\IpBlockListResult + * @return IpBlockListResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\IpBlockListResult $data data + * @param IpBlockListResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseIpInfo.php b/src/Model/SignalResponseIpInfo.php index ce532800..360fa531 100644 --- a/src/Model/SignalResponseIpInfo.php +++ b/src/Model/SignalResponseIpInfo.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\IpInfoResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\IpInfoResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\IpInfoResult + * @return IpInfoResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\IpInfoResult $data data + * @param IpInfoResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseJailbroken.php b/src/Model/SignalResponseJailbroken.php index ea00612a..287bd034 100644 --- a/src/Model/SignalResponseJailbroken.php +++ b/src/Model/SignalResponseJailbroken.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\JailbrokenResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\JailbrokenResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\JailbrokenResult + * @return JailbrokenResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\JailbrokenResult $data data + * @param JailbrokenResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseLocationSpoofing.php b/src/Model/SignalResponseLocationSpoofing.php index 49e498c4..8e84399e 100644 --- a/src/Model/SignalResponseLocationSpoofing.php +++ b/src/Model/SignalResponseLocationSpoofing.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\LocationSpoofingResult + * @return LocationSpoofingResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\LocationSpoofingResult $data data + * @param LocationSpoofingResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponsePrivacySettings.php b/src/Model/SignalResponsePrivacySettings.php index fb7c9beb..eaa80457 100644 --- a/src/Model/SignalResponsePrivacySettings.php +++ b/src/Model/SignalResponsePrivacySettings.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\PrivacySettingsResult + * @return PrivacySettingsResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\PrivacySettingsResult $data data + * @param PrivacySettingsResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseProxy.php b/src/Model/SignalResponseProxy.php index bcb74a95..2a86019e 100644 --- a/src/Model/SignalResponseProxy.php +++ b/src/Model/SignalResponseProxy.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\ProxyResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\ProxyResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\ProxyResult + * @return ProxyResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\ProxyResult $data data + * @param ProxyResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseRawDeviceAttributes.php b/src/Model/SignalResponseRawDeviceAttributes.php index 44be597f..18a15574 100644 --- a/src/Model/SignalResponseRawDeviceAttributes.php +++ b/src/Model/SignalResponseRawDeviceAttributes.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\RawDeviceAttributesResult + * @return RawDeviceAttributesResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $data data + * @param RawDeviceAttributesResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseRootApps.php b/src/Model/SignalResponseRootApps.php index 7c602ae9..bfaacc84 100644 --- a/src/Model/SignalResponseRootApps.php +++ b/src/Model/SignalResponseRootApps.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\RootAppsResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\RootAppsResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\RootAppsResult + * @return RootAppsResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\RootAppsResult $data data + * @param RootAppsResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseSuspectScore.php b/src/Model/SignalResponseSuspectScore.php index ff99ef3a..470c7989 100644 --- a/src/Model/SignalResponseSuspectScore.php +++ b/src/Model/SignalResponseSuspectScore.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\SuspectScoreResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\SuspectScoreResult + * @return SuspectScoreResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\SuspectScoreResult $data data + * @param SuspectScoreResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseTampering.php b/src/Model/SignalResponseTampering.php index 55f261f6..4c529e74 100644 --- a/src/Model/SignalResponseTampering.php +++ b/src/Model/SignalResponseTampering.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\TamperingResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\TamperingResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\TamperingResult + * @return TamperingResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\TamperingResult $data data + * @param TamperingResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseTor.php b/src/Model/SignalResponseTor.php index 4a580853..70b27080 100644 --- a/src/Model/SignalResponseTor.php +++ b/src/Model/SignalResponseTor.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\TorResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\TorResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\TorResult + * @return TorResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\TorResult $data data + * @param TorResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseVirtualMachine.php b/src/Model/SignalResponseVirtualMachine.php index 8a0f878e..ca6c2e45 100644 --- a/src/Model/SignalResponseVirtualMachine.php +++ b/src/Model/SignalResponseVirtualMachine.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\VirtualMachineResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\VirtualMachineResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\VirtualMachineResult + * @return VirtualMachineResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\VirtualMachineResult $data data + * @param VirtualMachineResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SignalResponseVpn.php b/src/Model/SignalResponseVpn.php index 2a64e9c6..cb22f0e4 100644 --- a/src/Model/SignalResponseVpn.php +++ b/src/Model/SignalResponseVpn.php @@ -1,17 +1,16 @@ '\Fingerprint\ServerAPI\Model\VpnResult', -'error' => '\Fingerprint\ServerAPI\Model\ProductError' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'data' => null, -'error' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'data' => '\Fingerprint\ServerAPI\Model\VpnResult', + 'error' => '\Fingerprint\ServerAPI\Model\ProductError']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'data' => null, + 'error' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'data' => 'data', -'error' => 'error' ]; + 'error' => 'error']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'data' => 'setData', -'error' => 'setError' ]; + 'error' => 'setError']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'data' => 'getData', -'error' => 'getError' ]; + 'error' => 'getError']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + $this->container['error'] = isset($data['error']) ? $data['error'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = isset($data['data']) ? $data['data'] : null; - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,27 +197,24 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets data + * Gets data. * - * @return \Fingerprint\ServerAPI\Model\VpnResult + * @return VpnResult */ public function getData() { @@ -213,9 +222,9 @@ public function getData() } /** - * Sets data + * Sets data. * - * @param \Fingerprint\ServerAPI\Model\VpnResult $data data + * @param VpnResult $data data * * @return $this */ @@ -227,9 +236,9 @@ public function setData($data) } /** - * Gets error + * Gets error. * - * @return \Fingerprint\ServerAPI\Model\ProductError + * @return ProductError */ public function getError() { @@ -237,9 +246,9 @@ public function getError() } /** - * Sets error + * Sets error. * - * @param \Fingerprint\ServerAPI\Model\ProductError $error error + * @param ProductError $error error * * @return $this */ @@ -249,12 +258,13 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Subdivision.php b/src/Model/Subdivision.php index 160c9ce1..616a1e6d 100644 --- a/src/Model/Subdivision.php +++ b/src/Model/Subdivision.php @@ -1,17 +1,16 @@ 'string', -'name' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'iso_code' => null, -'name' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'iso_code' => 'string', + 'name' => 'string']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'iso_code' => null, + 'name' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'iso_code' => 'isoCode', -'name' => 'name' ]; + 'name' => 'name']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'iso_code' => 'setIsoCode', -'name' => 'setName' ]; + 'name' => 'setName']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'iso_code' => 'getIsoCode', -'name' => 'getName' ]; + 'name' => 'getName']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['iso_code'] = isset($data['iso_code']) ? $data['iso_code'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['iso_code'] = isset($data['iso_code']) ? $data['iso_code'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -185,25 +197,22 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; - - return $invalidProperties; + return []; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets iso_code + * Gets iso_code. * * @return string */ @@ -213,7 +222,7 @@ public function getIsoCode() } /** - * Sets iso_code + * Sets iso_code. * * @param string $iso_code iso_code * @@ -227,7 +236,7 @@ public function setIsoCode($iso_code) } /** - * Gets name + * Gets name. * * @return string */ @@ -237,7 +246,7 @@ public function getName() } /** - * Sets name + * Sets name. * * @param string $name name * @@ -249,12 +258,13 @@ public function setName($name) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -265,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -278,10 +288,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -296,30 +304,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/SuspectScoreResult.php b/src/Model/SuspectScoreResult.php index f4847f1a..1b55d36c 100644 --- a/src/Model/SuspectScoreResult.php +++ b/src/Model/SuspectScoreResult.php @@ -1,17 +1,16 @@ 'int' ]; + 'result' => 'int']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return int */ @@ -210,7 +222,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param int $result Suspect Score is an easy way to integrate Smart Signals into your fraud protection work flow. It is a weighted representation of all Smart Signals present in the payload that helps identify suspicious activity. The value range is [0; S] where S is sum of all Smart Signals weights. See more details here: https://dev.fingerprint.com/docs/suspect-score * @@ -222,12 +234,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/TamperingResult.php b/src/Model/TamperingResult.php index 34800593..c48b0f18 100644 --- a/src/Model/TamperingResult.php +++ b/src/Model/TamperingResult.php @@ -1,17 +1,16 @@ 'bool', -'anomaly_score' => 'float' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'result' => null, -'anomaly_score' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'result' => 'bool', + 'anomaly_score' => 'float']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'result' => null, + 'anomaly_score' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'result' => 'result', -'anomaly_score' => 'anomalyScore' ]; + 'anomaly_score' => 'anomalyScore']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'result' => 'setResult', -'anomaly_score' => 'setAnomalyScore' ]; + 'anomaly_score' => 'setAnomalyScore']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'result' => 'getResult', -'anomaly_score' => 'getAnomalyScore' ]; + 'anomaly_score' => 'getAnomalyScore']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['anomaly_score'] = isset($data['anomaly_score']) ? $data['anomaly_score'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -128,7 +161,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -138,7 +171,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -157,27 +190,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['anomaly_score'] = isset($data['anomaly_score']) ? $data['anomaly_score'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -187,29 +199,29 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } - if ($this->container['anomaly_score'] === null) { + if (null === $this->container['anomaly_score']) { $invalidProperties[] = "'anomaly_score' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -219,9 +231,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result Flag indicating whether browser tampering was detected according to our internal thresholds. + * @param bool $result flag indicating whether browser tampering was detected according to our internal thresholds * * @return $this */ @@ -233,7 +245,7 @@ public function setResult($result) } /** - * Gets anomaly_score + * Gets anomaly_score. * * @return float */ @@ -243,7 +255,7 @@ public function getAnomalyScore() } /** - * Sets anomaly_score + * Sets anomaly_score. * * @param float $anomaly_score Confidence score (`0.0 - 1.0`) for the tampering detection. Values above `0.5` suggest that we're reasonably sure there was a tampering attempt. Values below `0.5` are genuine browsers. * @@ -255,12 +267,13 @@ public function setAnomalyScore($anomaly_score) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -271,7 +284,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -284,10 +297,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -302,30 +313,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/TorResult.php b/src/Model/TorResult.php index 12dc0bf8..4a5cd84f 100644 --- a/src/Model/TorResult.php +++ b/src/Model/TorResult.php @@ -1,17 +1,16 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -210,9 +222,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result `true` if the request IP address is a known tor exit node, `false` otherwise. + * @param bool $result `true` if the request IP address is a known tor exit node, `false` otherwise * * @return $this */ @@ -222,12 +234,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/VirtualMachineResult.php b/src/Model/VirtualMachineResult.php index 4cef9e80..fda99fb1 100644 --- a/src/Model/VirtualMachineResult.php +++ b/src/Model/VirtualMachineResult.php @@ -1,17 +1,16 @@ 'bool' ]; + 'result' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + */ protected static $swaggerFormats = [ - 'result' => null ]; + 'result' => null]; /** - * Array of property to type mappings. Used for (de)serialization + * Array of attributes where the key is the local name, + * and the value is the original name. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $attributeMap = [ + 'result' => 'result']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of attributes to setter functions (for deserialization of responses). * - * @return array + * @var string[] */ - public static function swaggerFormats() + protected static $setters = [ + 'result' => 'setResult']; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'result' => 'getResult']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) { - return self::$swaggerFormats; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; } /** - * Array of attributes where the key is the local name, - * and the value is the original name + * Gets the string presentation of the object. * - * @var string[] + * @return string */ - protected static $attributeMap = [ - 'result' => 'result' ]; + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of property to type mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $setters = [ - 'result' => 'setResult' ]; + public static function swaggerTypes() + { + return self::$swaggerTypes; + } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of property to format mappings. Used for (de)serialization. * - * @var string[] + * @return array */ - protected static $getters = [ - 'result' => 'getResult' ]; + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -123,7 +155,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -133,7 +165,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -152,26 +184,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -181,26 +193,26 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -210,7 +222,7 @@ public function getResult() } /** - * Sets result + * Sets result. * * @param bool $result `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise. * @@ -222,12 +234,13 @@ public function setResult($result) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -238,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -251,10 +264,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -269,30 +280,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/Visit.php b/src/Model/Visit.php index 6ac84e9e..f308038d 100644 --- a/src/Model/Visit.php +++ b/src/Model/Visit.php @@ -1,17 +1,16 @@ 'string', -'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', -'incognito' => 'bool', -'ip' => 'string', -'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', -'timestamp' => 'int', -'time' => '\DateTime', -'url' => 'string', -'tag' => 'map[string,object]', -'linked_id' => 'string', -'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', -'visitor_found' => 'bool', -'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'request_id' => null, -'browser_details' => null, -'incognito' => null, -'ip' => 'ipv4', -'ip_location' => null, -'timestamp' => 'int64', -'time' => 'date-time', -'url' => null, -'tag' => null, -'linked_id' => null, -'confidence' => null, -'visitor_found' => null, -'first_seen_at' => null, -'last_seen_at' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization + protected static $swaggerTypes = [ + 'request_id' => 'string', + 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', + 'incognito' => 'bool', + 'ip' => 'string', + 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', + 'timestamp' => 'int', + 'time' => '\DateTime', + 'url' => 'string', + 'tag' => 'map[string,object]', + 'linked_id' => 'string', + 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', + 'visitor_found' => 'bool', + 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt']; + + /** + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'request_id' => null, + 'browser_details' => null, + 'incognito' => null, + 'ip' => 'ipv4', + 'ip_location' => null, + 'timestamp' => 'int64', + 'time' => 'date-time', + 'url' => null, + 'tag' => null, + 'linked_id' => null, + 'confidence' => null, + 'visitor_found' => null, + 'first_seen_at' => null, + 'last_seen_at' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'request_id' => 'requestId', -'browser_details' => 'browserDetails', -'incognito' => 'incognito', -'ip' => 'ip', -'ip_location' => 'ipLocation', -'timestamp' => 'timestamp', -'time' => 'time', -'url' => 'url', -'tag' => 'tag', -'linked_id' => 'linkedId', -'confidence' => 'confidence', -'visitor_found' => 'visitorFound', -'first_seen_at' => 'firstSeenAt', -'last_seen_at' => 'lastSeenAt' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'browser_details' => 'browserDetails', + 'incognito' => 'incognito', + 'ip' => 'ip', + 'ip_location' => 'ipLocation', + 'timestamp' => 'timestamp', + 'time' => 'time', + 'url' => 'url', + 'tag' => 'tag', + 'linked_id' => 'linkedId', + 'confidence' => 'confidence', + 'visitor_found' => 'visitorFound', + 'first_seen_at' => 'firstSeenAt', + 'last_seen_at' => 'lastSeenAt']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'request_id' => 'setRequestId', -'browser_details' => 'setBrowserDetails', -'incognito' => 'setIncognito', -'ip' => 'setIp', -'ip_location' => 'setIpLocation', -'timestamp' => 'setTimestamp', -'time' => 'setTime', -'url' => 'setUrl', -'tag' => 'setTag', -'linked_id' => 'setLinkedId', -'confidence' => 'setConfidence', -'visitor_found' => 'setVisitorFound', -'first_seen_at' => 'setFirstSeenAt', -'last_seen_at' => 'setLastSeenAt' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'browser_details' => 'setBrowserDetails', + 'incognito' => 'setIncognito', + 'ip' => 'setIp', + 'ip_location' => 'setIpLocation', + 'timestamp' => 'setTimestamp', + 'time' => 'setTime', + 'url' => 'setUrl', + 'tag' => 'setTag', + 'linked_id' => 'setLinkedId', + 'confidence' => 'setConfidence', + 'visitor_found' => 'setVisitorFound', + 'first_seen_at' => 'setFirstSeenAt', + 'last_seen_at' => 'setLastSeenAt']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'request_id' => 'getRequestId', -'browser_details' => 'getBrowserDetails', -'incognito' => 'getIncognito', -'ip' => 'getIp', -'ip_location' => 'getIpLocation', -'timestamp' => 'getTimestamp', -'time' => 'getTime', -'url' => 'getUrl', -'tag' => 'getTag', -'linked_id' => 'getLinkedId', -'confidence' => 'getConfidence', -'visitor_found' => 'getVisitorFound', -'first_seen_at' => 'getFirstSeenAt', -'last_seen_at' => 'getLastSeenAt' ]; + 'browser_details' => 'getBrowserDetails', + 'incognito' => 'getIncognito', + 'ip' => 'getIp', + 'ip_location' => 'getIpLocation', + 'timestamp' => 'getTimestamp', + 'time' => 'getTime', + 'url' => 'getUrl', + 'tag' => 'getTag', + 'linked_id' => 'getLinkedId', + 'confidence' => 'getConfidence', + 'visitor_found' => 'getVisitorFound', + 'first_seen_at' => 'getFirstSeenAt', + 'last_seen_at' => 'getLastSeenAt']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; + $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; + $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; + $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; + $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; + $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; + $this->container['time'] = isset($data['time']) ? $data['time'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; + $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; + $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; + $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; + $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; + $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -188,7 +233,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -198,7 +243,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -217,39 +262,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['request_id'] = isset($data['request_id']) ? $data['request_id'] : null; - $this->container['browser_details'] = isset($data['browser_details']) ? $data['browser_details'] : null; - $this->container['incognito'] = isset($data['incognito']) ? $data['incognito'] : null; - $this->container['ip'] = isset($data['ip']) ? $data['ip'] : null; - $this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - $this->container['time'] = isset($data['time']) ? $data['time'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - $this->container['tag'] = isset($data['tag']) ? $data['tag'] : null; - $this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null; - $this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null; - $this->container['visitor_found'] = isset($data['visitor_found']) ? $data['visitor_found'] : null; - $this->container['first_seen_at'] = isset($data['first_seen_at']) ? $data['first_seen_at'] : null; - $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -259,56 +271,56 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['browser_details'] === null) { + if (null === $this->container['browser_details']) { $invalidProperties[] = "'browser_details' can't be null"; } - if ($this->container['incognito'] === null) { + if (null === $this->container['incognito']) { $invalidProperties[] = "'incognito' can't be null"; } - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['tag'] === null) { + if (null === $this->container['tag']) { $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['visitor_found'] === null) { + if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } - if ($this->container['first_seen_at'] === null) { + if (null === $this->container['first_seen_at']) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if ($this->container['last_seen_at'] === null) { + if (null === $this->container['last_seen_at']) { $invalidProperties[] = "'last_seen_at' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets request_id + * Gets request_id. * * @return string */ @@ -318,9 +330,9 @@ public function getRequestId() } /** - * Sets request_id + * Sets request_id. * - * @param string $request_id Unique identifier of the user's identification request. + * @param string $request_id unique identifier of the user's identification request * * @return $this */ @@ -332,9 +344,9 @@ public function setRequestId($request_id) } /** - * Gets browser_details + * Gets browser_details. * - * @return \Fingerprint\ServerAPI\Model\BrowserDetails + * @return BrowserDetails */ public function getBrowserDetails() { @@ -342,9 +354,9 @@ public function getBrowserDetails() } /** - * Sets browser_details + * Sets browser_details. * - * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details + * @param BrowserDetails $browser_details browser_details * * @return $this */ @@ -356,7 +368,7 @@ public function setBrowserDetails($browser_details) } /** - * Gets incognito + * Gets incognito. * * @return bool */ @@ -366,9 +378,9 @@ public function getIncognito() } /** - * Sets incognito + * Sets incognito. * - * @param bool $incognito Flag if user used incognito session. + * @param bool $incognito flag if user used incognito session * * @return $this */ @@ -380,7 +392,7 @@ public function setIncognito($incognito) } /** - * Gets ip + * Gets ip. * * @return string */ @@ -390,7 +402,7 @@ public function getIp() } /** - * Sets ip + * Sets ip. * * @param string $ip ip * @@ -404,9 +416,9 @@ public function setIp($ip) } /** - * Gets ip_location + * Gets ip_location. * - * @return \Fingerprint\ServerAPI\Model\DeprecatedIPLocation + * @return DeprecatedIPLocation */ public function getIpLocation() { @@ -414,9 +426,9 @@ public function getIpLocation() } /** - * Sets ip_location + * Sets ip_location. * - * @param \Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location + * @param DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -428,7 +440,7 @@ public function setIpLocation($ip_location) } /** - * Gets timestamp + * Gets timestamp. * * @return int */ @@ -438,9 +450,9 @@ public function getTimestamp() } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. + * @param int $timestamp timestamp of the event with millisecond precision in Unix time * * @return $this */ @@ -452,7 +464,7 @@ public function setTimestamp($timestamp) } /** - * Gets time + * Gets time. * * @return \DateTime */ @@ -462,9 +474,9 @@ public function getTime() } /** - * Sets time + * Sets time. * - * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. + * @param \DateTime $time time expressed according to ISO 8601 in UTC format * * @return $this */ @@ -476,7 +488,7 @@ public function setTime($time) } /** - * Gets url + * Gets url. * * @return string */ @@ -486,9 +498,9 @@ public function getUrl() } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which the identification request was sent. + * @param string $url page URL from which the identification request was sent * * @return $this */ @@ -500,7 +512,7 @@ public function setUrl($url) } /** - * Gets tag + * Gets tag. * * @return map[string,object] */ @@ -510,9 +522,9 @@ public function getTag() } /** - * Sets tag + * Sets tag. * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request. + * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ @@ -524,7 +536,7 @@ public function setTag($tag) } /** - * Gets linked_id + * Gets linked_id. * * @return string */ @@ -534,9 +546,9 @@ public function getLinkedId() } /** - * Sets linked_id + * 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 */ @@ -548,9 +560,9 @@ public function setLinkedId($linked_id) } /** - * Gets confidence + * Gets confidence. * - * @return \Fingerprint\ServerAPI\Model\Confidence + * @return Confidence */ public function getConfidence() { @@ -558,9 +570,9 @@ public function getConfidence() } /** - * Sets confidence + * Sets confidence. * - * @param \Fingerprint\ServerAPI\Model\Confidence $confidence confidence + * @param Confidence $confidence confidence * * @return $this */ @@ -572,7 +584,7 @@ public function setConfidence($confidence) } /** - * Gets visitor_found + * Gets visitor_found. * * @return bool */ @@ -582,9 +594,9 @@ public function getVisitorFound() } /** - * Sets visitor_found + * Sets visitor_found. * - * @param bool $visitor_found Attribute represents if a visitor had been identified before. + * @param bool $visitor_found attribute represents if a visitor had been identified before * * @return $this */ @@ -596,9 +608,9 @@ public function setVisitorFound($visitor_found) } /** - * Gets first_seen_at + * Gets first_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getFirstSeenAt() { @@ -606,9 +618,9 @@ public function getFirstSeenAt() } /** - * Sets first_seen_at + * Sets first_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at + * @param SeenAt $first_seen_at first_seen_at * * @return $this */ @@ -620,9 +632,9 @@ public function setFirstSeenAt($first_seen_at) } /** - * Gets last_seen_at + * Gets last_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getLastSeenAt() { @@ -630,9 +642,9 @@ public function getLastSeenAt() } /** - * Sets last_seen_at + * Sets last_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at + * @param SeenAt $last_seen_at last_seen_at * * @return $this */ @@ -642,12 +654,13 @@ public function setLastSeenAt($last_seen_at) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -658,7 +671,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -671,10 +684,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -689,30 +700,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index df82623b..b318d1e7 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -1,17 +1,16 @@ 'bool', -'origin_timezone' => 'string', -'origin_country' => 'string', -'methods' => '\Fingerprint\ServerAPI\Model\VpnResultMethods' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'result' => null, -'origin_timezone' => null, -'origin_country' => null, -'methods' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'result' => 'bool', + 'origin_timezone' => 'string', + 'origin_country' => 'string', + 'methods' => '\Fingerprint\ServerAPI\Model\VpnResultMethods']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'result' => null, + 'origin_timezone' => null, + 'origin_country' => null, + 'methods' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'result' => 'result', -'origin_timezone' => 'originTimezone', -'origin_country' => 'originCountry', -'methods' => 'methods' ]; + 'origin_timezone' => 'originTimezone', + 'origin_country' => 'originCountry', + 'methods' => 'methods']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'result' => 'setResult', -'origin_timezone' => 'setOriginTimezone', -'origin_country' => 'setOriginCountry', -'methods' => 'setMethods' ]; + 'origin_timezone' => 'setOriginTimezone', + 'origin_country' => 'setOriginCountry', + 'methods' => 'setMethods']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'result' => 'getResult', -'origin_timezone' => 'getOriginTimezone', -'origin_country' => 'getOriginCountry', -'methods' => 'getMethods' ]; + 'origin_timezone' => 'getOriginTimezone', + 'origin_country' => 'getOriginCountry', + 'methods' => 'getMethods']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['origin_timezone'] = isset($data['origin_timezone']) ? $data['origin_timezone'] : null; + $this->container['origin_country'] = isset($data['origin_country']) ? $data['origin_country'] : null; + $this->container['methods'] = isset($data['methods']) ? $data['methods'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -138,7 +173,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -148,7 +183,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -167,29 +202,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['origin_timezone'] = isset($data['origin_timezone']) ? $data['origin_timezone'] : null; - $this->container['origin_country'] = isset($data['origin_country']) ? $data['origin_country'] : null; - $this->container['methods'] = isset($data['methods']) ? $data['methods'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -199,32 +211,32 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['result'] === null) { + if (null === $this->container['result']) { $invalidProperties[] = "'result' can't be null"; } - if ($this->container['origin_timezone'] === null) { + if (null === $this->container['origin_timezone']) { $invalidProperties[] = "'origin_timezone' can't be null"; } - if ($this->container['methods'] === null) { + if (null === $this->container['methods']) { $invalidProperties[] = "'methods' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets result + * Gets result. * * @return bool */ @@ -234,9 +246,9 @@ public function getResult() } /** - * Sets result + * Sets result. * - * @param bool $result VPN or other anonymizing service has been used when sending the request. + * @param bool $result VPN or other anonymizing service has been used when sending the request * * @return $this */ @@ -248,7 +260,7 @@ public function setResult($result) } /** - * Gets origin_timezone + * Gets origin_timezone. * * @return string */ @@ -258,9 +270,9 @@ public function getOriginTimezone() } /** - * Sets origin_timezone + * Sets origin_timezone. * - * @param string $origin_timezone Local timezone which is used in timezoneMismatch method. + * @param string $origin_timezone local timezone which is used in timezoneMismatch method * * @return $this */ @@ -272,7 +284,7 @@ public function setOriginTimezone($origin_timezone) } /** - * Gets origin_country + * Gets origin_country. * * @return string */ @@ -282,7 +294,7 @@ public function getOriginCountry() } /** - * Sets origin_country + * Sets origin_country. * * @param string $origin_country Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). * @@ -296,9 +308,9 @@ public function setOriginCountry($origin_country) } /** - * Gets methods + * Gets methods. * - * @return \Fingerprint\ServerAPI\Model\VpnResultMethods + * @return VpnResultMethods */ public function getMethods() { @@ -306,9 +318,9 @@ public function getMethods() } /** - * Sets methods + * Sets methods. * - * @param \Fingerprint\ServerAPI\Model\VpnResultMethods $methods methods + * @param VpnResultMethods $methods methods * * @return $this */ @@ -318,12 +330,13 @@ public function setMethods($methods) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -334,7 +347,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -347,10 +360,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -365,30 +376,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 7db1af75..50cb6c9a 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -1,17 +1,16 @@ 'bool', -'public_vpn' => 'bool', -'auxiliary_mobile' => 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'timezone_mismatch' => null, -'public_vpn' => null, -'auxiliary_mobile' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } + protected static $swaggerTypes = [ + 'timezone_mismatch' => 'bool', + 'public_vpn' => 'bool', + 'auxiliary_mobile' => 'bool']; /** - * Array of property to format mappings. Used for (de)serialization + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'timezone_mismatch' => null, + 'public_vpn' => null, + 'auxiliary_mobile' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'timezone_mismatch' => 'timezoneMismatch', -'public_vpn' => 'publicVPN', -'auxiliary_mobile' => 'auxiliaryMobile' ]; + 'public_vpn' => 'publicVPN', + 'auxiliary_mobile' => 'auxiliaryMobile']; /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'timezone_mismatch' => 'setTimezoneMismatch', -'public_vpn' => 'setPublicVpn', -'auxiliary_mobile' => 'setAuxiliaryMobile' ]; + 'public_vpn' => 'setPublicVpn', + 'auxiliary_mobile' => 'setAuxiliaryMobile']; /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'timezone_mismatch' => 'getTimezoneMismatch', -'public_vpn' => 'getPublicVpn', -'auxiliary_mobile' => 'getAuxiliaryMobile' ]; + 'public_vpn' => 'getPublicVpn', + 'auxiliary_mobile' => 'getAuxiliaryMobile']; + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->container['timezone_mismatch'] = isset($data['timezone_mismatch']) ? $data['timezone_mismatch'] : null; + $this->container['public_vpn'] = isset($data['public_vpn']) ? $data['public_vpn'] : null; + $this->container['auxiliary_mobile'] = isset($data['auxiliary_mobile']) ? $data['auxiliary_mobile'] : null; + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @return array */ @@ -133,7 +167,7 @@ public static function attributeMap() } /** - * Array of attributes to setter functions (for deserialization of responses) + * Array of attributes to setter functions (for deserialization of responses). * * @return array */ @@ -143,7 +177,7 @@ public static function setters() } /** - * Array of attributes to getter functions (for serialization of requests) + * Array of attributes to getter functions (for serialization of requests). * * @return array */ @@ -162,28 +196,6 @@ public function getModelName() return self::$swaggerModelName; } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['timezone_mismatch'] = isset($data['timezone_mismatch']) ? $data['timezone_mismatch'] : null; - $this->container['public_vpn'] = isset($data['public_vpn']) ? $data['public_vpn'] : null; - $this->container['auxiliary_mobile'] = isset($data['auxiliary_mobile']) ? $data['auxiliary_mobile'] : null; - } - /** * Show all the invalid properties with reasons. * @@ -193,32 +205,32 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['timezone_mismatch'] === null) { + if (null === $this->container['timezone_mismatch']) { $invalidProperties[] = "'timezone_mismatch' can't be null"; } - if ($this->container['public_vpn'] === null) { + if (null === $this->container['public_vpn']) { $invalidProperties[] = "'public_vpn' can't be null"; } - if ($this->container['auxiliary_mobile'] === null) { + if (null === $this->container['auxiliary_mobile']) { $invalidProperties[] = "'auxiliary_mobile' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets timezone_mismatch + * Gets timezone_mismatch. * * @return bool */ @@ -228,9 +240,9 @@ public function getTimezoneMismatch() } /** - * Sets timezone_mismatch + * Sets timezone_mismatch. * - * @param bool $timezone_mismatch User's browser timezone doesn't match the timezone from which the request was originally made. + * @param bool $timezone_mismatch user's browser timezone doesn't match the timezone from which the request was originally made * * @return $this */ @@ -242,7 +254,7 @@ public function setTimezoneMismatch($timezone_mismatch) } /** - * Gets public_vpn + * Gets public_vpn. * * @return bool */ @@ -252,9 +264,9 @@ public function getPublicVpn() } /** - * Sets public_vpn + * Sets public_vpn. * - * @param bool $public_vpn Request IP address is owned and used by a public VPN service provider. + * @param bool $public_vpn request IP address is owned and used by a public VPN service provider * * @return $this */ @@ -266,7 +278,7 @@ public function setPublicVpn($public_vpn) } /** - * Gets auxiliary_mobile + * Gets auxiliary_mobile. * * @return bool */ @@ -276,7 +288,7 @@ public function getAuxiliaryMobile() } /** - * Sets auxiliary_mobile + * Sets auxiliary_mobile. * * @param bool $auxiliary_mobile This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. * @@ -288,12 +300,13 @@ public function setAuxiliaryMobile($auxiliary_mobile) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -304,7 +317,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -317,10 +330,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -335,30 +346,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/Model/WebhookVisit.php b/src/Model/WebhookVisit.php index d073953a..843ba581 100644 --- a/src/Model/WebhookVisit.php +++ b/src/Model/WebhookVisit.php @@ -1,17 +1,16 @@ 'string', -'client_referrer' => 'string', -'user_agent' => 'string', -'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult', -'ip_info' => '\Fingerprint\ServerAPI\Model\IpInfoResult', -'incognito' => 'bool', -'root_apps' => '\Fingerprint\ServerAPI\Model\RootAppsResult', -'emulator' => '\Fingerprint\ServerAPI\Model\EmulatorResult', -'cloned_app' => '\Fingerprint\ServerAPI\Model\ClonedAppResult', -'factory_reset' => '\Fingerprint\ServerAPI\Model\FactoryResetResult', -'jailbroken' => '\Fingerprint\ServerAPI\Model\JailbrokenResult', -'frida' => '\Fingerprint\ServerAPI\Model\FridaResult', -'ip_blocklist' => '\Fingerprint\ServerAPI\Model\IpBlockListResult', -'tor' => '\Fingerprint\ServerAPI\Model\TorResult', -'privacy_settings' => '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', -'virtual_machine' => '\Fingerprint\ServerAPI\Model\VirtualMachineResult', -'vpn' => '\Fingerprint\ServerAPI\Model\VpnResult', -'proxy' => '\Fingerprint\ServerAPI\Model\ProxyResult', -'tampering' => '\Fingerprint\ServerAPI\Model\TamperingResult', -'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', -'high_activity' => '\Fingerprint\ServerAPI\Model\HighActivityResult', -'location_spoofing' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', -'suspect_score' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', -'request_id' => 'string', -'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', -'ip' => 'string', -'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', -'timestamp' => 'int', -'time' => '\DateTime', -'url' => 'string', -'tag' => 'map[string,object]', -'linked_id' => 'string', -'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', -'visitor_found' => 'bool', -'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', -'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'visitor_id' => null, -'client_referrer' => null, -'user_agent' => null, -'bot' => null, -'ip_info' => null, -'incognito' => null, -'root_apps' => null, -'emulator' => null, -'cloned_app' => null, -'factory_reset' => null, -'jailbroken' => null, -'frida' => null, -'ip_blocklist' => null, -'tor' => null, -'privacy_settings' => null, -'virtual_machine' => null, -'vpn' => null, -'proxy' => null, -'tampering' => null, -'raw_device_attributes' => null, -'high_activity' => null, -'location_spoofing' => null, -'suspect_score' => null, -'request_id' => null, -'browser_details' => null, -'ip' => 'ipv4', -'ip_location' => null, -'timestamp' => 'int64', -'time' => 'date-time', -'url' => null, -'tag' => null, -'linked_id' => null, -'confidence' => null, -'visitor_found' => null, -'first_seen_at' => null, -'last_seen_at' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization + * Array of property to type mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization + protected static $swaggerTypes = [ + 'visitor_id' => 'string', + 'client_referrer' => 'string', + 'user_agent' => 'string', + 'bot' => '\Fingerprint\ServerAPI\Model\BotdDetectionResult', + 'ip_info' => '\Fingerprint\ServerAPI\Model\IpInfoResult', + 'incognito' => 'bool', + 'root_apps' => '\Fingerprint\ServerAPI\Model\RootAppsResult', + 'emulator' => '\Fingerprint\ServerAPI\Model\EmulatorResult', + 'cloned_app' => '\Fingerprint\ServerAPI\Model\ClonedAppResult', + 'factory_reset' => '\Fingerprint\ServerAPI\Model\FactoryResetResult', + 'jailbroken' => '\Fingerprint\ServerAPI\Model\JailbrokenResult', + 'frida' => '\Fingerprint\ServerAPI\Model\FridaResult', + 'ip_blocklist' => '\Fingerprint\ServerAPI\Model\IpBlockListResult', + 'tor' => '\Fingerprint\ServerAPI\Model\TorResult', + 'privacy_settings' => '\Fingerprint\ServerAPI\Model\PrivacySettingsResult', + 'virtual_machine' => '\Fingerprint\ServerAPI\Model\VirtualMachineResult', + 'vpn' => '\Fingerprint\ServerAPI\Model\VpnResult', + 'proxy' => '\Fingerprint\ServerAPI\Model\ProxyResult', + 'tampering' => '\Fingerprint\ServerAPI\Model\TamperingResult', + 'raw_device_attributes' => '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult', + 'high_activity' => '\Fingerprint\ServerAPI\Model\HighActivityResult', + 'location_spoofing' => '\Fingerprint\ServerAPI\Model\LocationSpoofingResult', + 'suspect_score' => '\Fingerprint\ServerAPI\Model\SuspectScoreResult', + 'request_id' => 'string', + 'browser_details' => '\Fingerprint\ServerAPI\Model\BrowserDetails', + 'ip' => 'string', + 'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedIPLocation', + 'timestamp' => 'int', + 'time' => '\DateTime', + 'url' => 'string', + 'tag' => 'map[string,object]', + 'linked_id' => 'string', + 'confidence' => '\Fingerprint\ServerAPI\Model\Confidence', + 'visitor_found' => 'bool', + 'first_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt', + 'last_seen_at' => '\Fingerprint\ServerAPI\Model\SeenAt']; + + /** + * Array of property to format mappings. Used for (de)serialization. * - * @return array + * @var string[] */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } + protected static $swaggerFormats = [ + 'visitor_id' => null, + 'client_referrer' => null, + 'user_agent' => null, + 'bot' => null, + 'ip_info' => null, + 'incognito' => null, + 'root_apps' => null, + 'emulator' => null, + 'cloned_app' => null, + 'factory_reset' => null, + 'jailbroken' => null, + 'frida' => null, + 'ip_blocklist' => null, + 'tor' => null, + 'privacy_settings' => null, + 'virtual_machine' => null, + 'vpn' => null, + 'proxy' => null, + 'tampering' => null, + 'raw_device_attributes' => null, + 'high_activity' => null, + 'location_spoofing' => null, + 'suspect_score' => null, + 'request_id' => null, + 'browser_details' => null, + 'ip' => 'ipv4', + 'ip_location' => null, + 'timestamp' => 'int64', + 'time' => 'date-time', + 'url' => null, + 'tag' => null, + 'linked_id' => null, + 'confidence' => null, + 'visitor_found' => null, + 'first_seen_at' => null, + 'last_seen_at' => null]; /** * Array of attributes where the key is the local name, - * and the value is the original name + * and the value is the original name. * * @var string[] */ protected static $attributeMap = [ 'visitor_id' => 'visitorId', -'client_referrer' => 'clientReferrer', -'user_agent' => 'userAgent', -'bot' => 'bot', -'ip_info' => 'ipInfo', -'incognito' => 'incognito', -'root_apps' => 'rootApps', -'emulator' => 'emulator', -'cloned_app' => 'clonedApp', -'factory_reset' => 'factoryReset', -'jailbroken' => 'jailbroken', -'frida' => 'frida', -'ip_blocklist' => 'ipBlocklist', -'tor' => 'tor', -'privacy_settings' => 'privacySettings', -'virtual_machine' => 'virtualMachine', -'vpn' => 'vpn', -'proxy' => 'proxy', -'tampering' => 'tampering', -'raw_device_attributes' => 'rawDeviceAttributes', -'high_activity' => 'highActivity', -'location_spoofing' => 'locationSpoofing', -'suspect_score' => 'suspectScore', -'request_id' => 'requestId', -'browser_details' => 'browserDetails', -'ip' => 'ip', -'ip_location' => 'ipLocation', -'timestamp' => 'timestamp', -'time' => 'time', -'url' => 'url', -'tag' => 'tag', -'linked_id' => 'linkedId', -'confidence' => 'confidence', -'visitor_found' => 'visitorFound', -'first_seen_at' => 'firstSeenAt', -'last_seen_at' => 'lastSeenAt' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) + 'client_referrer' => 'clientReferrer', + 'user_agent' => 'userAgent', + 'bot' => 'bot', + 'ip_info' => 'ipInfo', + 'incognito' => 'incognito', + 'root_apps' => 'rootApps', + 'emulator' => 'emulator', + 'cloned_app' => 'clonedApp', + 'factory_reset' => 'factoryReset', + 'jailbroken' => 'jailbroken', + 'frida' => 'frida', + 'ip_blocklist' => 'ipBlocklist', + 'tor' => 'tor', + 'privacy_settings' => 'privacySettings', + 'virtual_machine' => 'virtualMachine', + 'vpn' => 'vpn', + 'proxy' => 'proxy', + 'tampering' => 'tampering', + 'raw_device_attributes' => 'rawDeviceAttributes', + 'high_activity' => 'highActivity', + 'location_spoofing' => 'locationSpoofing', + 'suspect_score' => 'suspectScore', + 'request_id' => 'requestId', + 'browser_details' => 'browserDetails', + 'ip' => 'ip', + 'ip_location' => 'ipLocation', + 'timestamp' => 'timestamp', + 'time' => 'time', + 'url' => 'url', + 'tag' => 'tag', + 'linked_id' => 'linkedId', + 'confidence' => 'confidence', + 'visitor_found' => 'visitorFound', + 'first_seen_at' => 'firstSeenAt', + 'last_seen_at' => 'lastSeenAt']; + + /** + * Array of attributes to setter functions (for deserialization of responses). * * @var string[] */ protected static $setters = [ 'visitor_id' => 'setVisitorId', -'client_referrer' => 'setClientReferrer', -'user_agent' => 'setUserAgent', -'bot' => 'setBot', -'ip_info' => 'setIpInfo', -'incognito' => 'setIncognito', -'root_apps' => 'setRootApps', -'emulator' => 'setEmulator', -'cloned_app' => 'setClonedApp', -'factory_reset' => 'setFactoryReset', -'jailbroken' => 'setJailbroken', -'frida' => 'setFrida', -'ip_blocklist' => 'setIpBlocklist', -'tor' => 'setTor', -'privacy_settings' => 'setPrivacySettings', -'virtual_machine' => 'setVirtualMachine', -'vpn' => 'setVpn', -'proxy' => 'setProxy', -'tampering' => 'setTampering', -'raw_device_attributes' => 'setRawDeviceAttributes', -'high_activity' => 'setHighActivity', -'location_spoofing' => 'setLocationSpoofing', -'suspect_score' => 'setSuspectScore', -'request_id' => 'setRequestId', -'browser_details' => 'setBrowserDetails', -'ip' => 'setIp', -'ip_location' => 'setIpLocation', -'timestamp' => 'setTimestamp', -'time' => 'setTime', -'url' => 'setUrl', -'tag' => 'setTag', -'linked_id' => 'setLinkedId', -'confidence' => 'setConfidence', -'visitor_found' => 'setVisitorFound', -'first_seen_at' => 'setFirstSeenAt', -'last_seen_at' => 'setLastSeenAt' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) + 'client_referrer' => 'setClientReferrer', + 'user_agent' => 'setUserAgent', + 'bot' => 'setBot', + 'ip_info' => 'setIpInfo', + 'incognito' => 'setIncognito', + 'root_apps' => 'setRootApps', + 'emulator' => 'setEmulator', + 'cloned_app' => 'setClonedApp', + 'factory_reset' => 'setFactoryReset', + 'jailbroken' => 'setJailbroken', + 'frida' => 'setFrida', + 'ip_blocklist' => 'setIpBlocklist', + 'tor' => 'setTor', + 'privacy_settings' => 'setPrivacySettings', + 'virtual_machine' => 'setVirtualMachine', + 'vpn' => 'setVpn', + 'proxy' => 'setProxy', + 'tampering' => 'setTampering', + 'raw_device_attributes' => 'setRawDeviceAttributes', + 'high_activity' => 'setHighActivity', + 'location_spoofing' => 'setLocationSpoofing', + 'suspect_score' => 'setSuspectScore', + 'request_id' => 'setRequestId', + 'browser_details' => 'setBrowserDetails', + 'ip' => 'setIp', + 'ip_location' => 'setIpLocation', + 'timestamp' => 'setTimestamp', + 'time' => 'setTime', + 'url' => 'setUrl', + 'tag' => 'setTag', + 'linked_id' => 'setLinkedId', + 'confidence' => 'setConfidence', + 'visitor_found' => 'setVisitorFound', + 'first_seen_at' => 'setFirstSeenAt', + 'last_seen_at' => 'setLastSeenAt']; + + /** + * Array of attributes to getter functions (for serialization of requests). * * @var string[] */ protected static $getters = [ 'visitor_id' => 'getVisitorId', -'client_referrer' => 'getClientReferrer', -'user_agent' => 'getUserAgent', -'bot' => 'getBot', -'ip_info' => 'getIpInfo', -'incognito' => 'getIncognito', -'root_apps' => 'getRootApps', -'emulator' => 'getEmulator', -'cloned_app' => 'getClonedApp', -'factory_reset' => 'getFactoryReset', -'jailbroken' => 'getJailbroken', -'frida' => 'getFrida', -'ip_blocklist' => 'getIpBlocklist', -'tor' => 'getTor', -'privacy_settings' => 'getPrivacySettings', -'virtual_machine' => 'getVirtualMachine', -'vpn' => 'getVpn', -'proxy' => 'getProxy', -'tampering' => 'getTampering', -'raw_device_attributes' => 'getRawDeviceAttributes', -'high_activity' => 'getHighActivity', -'location_spoofing' => 'getLocationSpoofing', -'suspect_score' => 'getSuspectScore', -'request_id' => 'getRequestId', -'browser_details' => 'getBrowserDetails', -'ip' => 'getIp', -'ip_location' => 'getIpLocation', -'timestamp' => 'getTimestamp', -'time' => 'getTime', -'url' => 'getUrl', -'tag' => 'getTag', -'linked_id' => 'getLinkedId', -'confidence' => 'getConfidence', -'visitor_found' => 'getVisitorFound', -'first_seen_at' => 'getFirstSeenAt', -'last_seen_at' => 'getLastSeenAt' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values + 'client_referrer' => 'getClientReferrer', + 'user_agent' => 'getUserAgent', + 'bot' => 'getBot', + 'ip_info' => 'getIpInfo', + 'incognito' => 'getIncognito', + 'root_apps' => 'getRootApps', + 'emulator' => 'getEmulator', + 'cloned_app' => 'getClonedApp', + 'factory_reset' => 'getFactoryReset', + 'jailbroken' => 'getJailbroken', + 'frida' => 'getFrida', + 'ip_blocklist' => 'getIpBlocklist', + 'tor' => 'getTor', + 'privacy_settings' => 'getPrivacySettings', + 'virtual_machine' => 'getVirtualMachine', + 'vpn' => 'getVpn', + 'proxy' => 'getProxy', + 'tampering' => 'getTampering', + 'raw_device_attributes' => 'getRawDeviceAttributes', + 'high_activity' => 'getHighActivity', + 'location_spoofing' => 'getLocationSpoofing', + 'suspect_score' => 'getSuspectScore', + 'request_id' => 'getRequestId', + 'browser_details' => 'getBrowserDetails', + 'ip' => 'getIp', + 'ip_location' => 'getIpLocation', + 'timestamp' => 'getTimestamp', + 'time' => 'getTime', + 'url' => 'getUrl', + 'tag' => 'getTag', + 'linked_id' => 'getLinkedId', + 'confidence' => 'getConfidence', + 'visitor_found' => 'getVisitorFound', + 'first_seen_at' => 'getFirstSeenAt', + 'last_seen_at' => 'getLastSeenAt']; + + /** + * Associative array for storing property values. * * @var mixed[] */ protected $container = []; /** - * Constructor + * Constructor. * * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->container['visitor_id'] = isset($data['visitor_id']) ? $data['visitor_id'] : null; $this->container['client_referrer'] = isset($data['client_referrer']) ? $data['client_referrer'] : null; @@ -382,6 +316,84 @@ public function __construct(array $data = null) $this->container['last_seen_at'] = isset($data['last_seen_at']) ? $data['last_seen_at'] : null; } + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + /** * Show all the invalid properties with reasons. * @@ -391,59 +403,59 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['visitor_id'] === null) { + if (null === $this->container['visitor_id']) { $invalidProperties[] = "'visitor_id' can't be null"; } - if ($this->container['incognito'] === null) { + if (null === $this->container['incognito']) { $invalidProperties[] = "'incognito' can't be null"; } - if ($this->container['request_id'] === null) { + if (null === $this->container['request_id']) { $invalidProperties[] = "'request_id' can't be null"; } - if ($this->container['browser_details'] === null) { + if (null === $this->container['browser_details']) { $invalidProperties[] = "'browser_details' can't be null"; } - if ($this->container['ip'] === null) { + if (null === $this->container['ip']) { $invalidProperties[] = "'ip' can't be null"; } - if ($this->container['timestamp'] === null) { + if (null === $this->container['timestamp']) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['time'] === null) { + if (null === $this->container['time']) { $invalidProperties[] = "'time' can't be null"; } - if ($this->container['url'] === null) { + if (null === $this->container['url']) { $invalidProperties[] = "'url' can't be null"; } - if ($this->container['tag'] === null) { + if (null === $this->container['tag']) { $invalidProperties[] = "'tag' can't be null"; } - if ($this->container['visitor_found'] === null) { + if (null === $this->container['visitor_found']) { $invalidProperties[] = "'visitor_found' can't be null"; } - if ($this->container['first_seen_at'] === null) { + if (null === $this->container['first_seen_at']) { $invalidProperties[] = "'first_seen_at' can't be null"; } - if ($this->container['last_seen_at'] === null) { + if (null === $this->container['last_seen_at']) { $invalidProperties[] = "'last_seen_at' can't be null"; } + return $invalidProperties; } /** * Validate all the properties in the model - * return true if all passed + * return true if all passed. * * @return bool True if all properties are valid */ public function valid() { - return count($this->listInvalidProperties()) === 0; + return 0 === count($this->listInvalidProperties()); } - /** - * Gets visitor_id + * Gets visitor_id. * * @return string */ @@ -453,7 +465,7 @@ public function getVisitorId() } /** - * Sets visitor_id + * Sets visitor_id. * * @param string $visitor_id visitor_id * @@ -467,7 +479,7 @@ public function setVisitorId($visitor_id) } /** - * Gets client_referrer + * Gets client_referrer. * * @return string */ @@ -477,7 +489,7 @@ public function getClientReferrer() } /** - * Sets client_referrer + * Sets client_referrer. * * @param string $client_referrer client_referrer * @@ -491,7 +503,7 @@ public function setClientReferrer($client_referrer) } /** - * Gets user_agent + * Gets user_agent. * * @return string */ @@ -501,7 +513,7 @@ public function getUserAgent() } /** - * Sets user_agent + * Sets user_agent. * * @param string $user_agent user_agent * @@ -515,9 +527,9 @@ public function setUserAgent($user_agent) } /** - * Gets bot + * Gets bot. * - * @return \Fingerprint\ServerAPI\Model\BotdDetectionResult + * @return BotdDetectionResult */ public function getBot() { @@ -525,9 +537,9 @@ public function getBot() } /** - * Sets bot + * Sets bot. * - * @param \Fingerprint\ServerAPI\Model\BotdDetectionResult $bot bot + * @param BotdDetectionResult $bot bot * * @return $this */ @@ -539,9 +551,9 @@ public function setBot($bot) } /** - * Gets ip_info + * Gets ip_info. * - * @return \Fingerprint\ServerAPI\Model\IpInfoResult + * @return IpInfoResult */ public function getIpInfo() { @@ -549,9 +561,9 @@ public function getIpInfo() } /** - * Sets ip_info + * Sets ip_info. * - * @param \Fingerprint\ServerAPI\Model\IpInfoResult $ip_info ip_info + * @param IpInfoResult $ip_info ip_info * * @return $this */ @@ -563,7 +575,7 @@ public function setIpInfo($ip_info) } /** - * Gets incognito + * Gets incognito. * * @return bool */ @@ -573,9 +585,9 @@ public function getIncognito() } /** - * Sets incognito + * Sets incognito. * - * @param bool $incognito Flag if user used incognito session. + * @param bool $incognito flag if user used incognito session * * @return $this */ @@ -587,9 +599,9 @@ public function setIncognito($incognito) } /** - * Gets root_apps + * Gets root_apps. * - * @return \Fingerprint\ServerAPI\Model\RootAppsResult + * @return RootAppsResult */ public function getRootApps() { @@ -597,9 +609,9 @@ public function getRootApps() } /** - * Sets root_apps + * Sets root_apps. * - * @param \Fingerprint\ServerAPI\Model\RootAppsResult $root_apps root_apps + * @param RootAppsResult $root_apps root_apps * * @return $this */ @@ -611,9 +623,9 @@ public function setRootApps($root_apps) } /** - * Gets emulator + * Gets emulator. * - * @return \Fingerprint\ServerAPI\Model\EmulatorResult + * @return EmulatorResult */ public function getEmulator() { @@ -621,9 +633,9 @@ public function getEmulator() } /** - * Sets emulator + * Sets emulator. * - * @param \Fingerprint\ServerAPI\Model\EmulatorResult $emulator emulator + * @param EmulatorResult $emulator emulator * * @return $this */ @@ -635,9 +647,9 @@ public function setEmulator($emulator) } /** - * Gets cloned_app + * Gets cloned_app. * - * @return \Fingerprint\ServerAPI\Model\ClonedAppResult + * @return ClonedAppResult */ public function getClonedApp() { @@ -645,9 +657,9 @@ public function getClonedApp() } /** - * Sets cloned_app + * Sets cloned_app. * - * @param \Fingerprint\ServerAPI\Model\ClonedAppResult $cloned_app cloned_app + * @param ClonedAppResult $cloned_app cloned_app * * @return $this */ @@ -659,9 +671,9 @@ public function setClonedApp($cloned_app) } /** - * Gets factory_reset + * Gets factory_reset. * - * @return \Fingerprint\ServerAPI\Model\FactoryResetResult + * @return FactoryResetResult */ public function getFactoryReset() { @@ -669,9 +681,9 @@ public function getFactoryReset() } /** - * Sets factory_reset + * Sets factory_reset. * - * @param \Fingerprint\ServerAPI\Model\FactoryResetResult $factory_reset factory_reset + * @param FactoryResetResult $factory_reset factory_reset * * @return $this */ @@ -683,9 +695,9 @@ public function setFactoryReset($factory_reset) } /** - * Gets jailbroken + * Gets jailbroken. * - * @return \Fingerprint\ServerAPI\Model\JailbrokenResult + * @return JailbrokenResult */ public function getJailbroken() { @@ -693,9 +705,9 @@ public function getJailbroken() } /** - * Sets jailbroken + * Sets jailbroken. * - * @param \Fingerprint\ServerAPI\Model\JailbrokenResult $jailbroken jailbroken + * @param JailbrokenResult $jailbroken jailbroken * * @return $this */ @@ -707,9 +719,9 @@ public function setJailbroken($jailbroken) } /** - * Gets frida + * Gets frida. * - * @return \Fingerprint\ServerAPI\Model\FridaResult + * @return FridaResult */ public function getFrida() { @@ -717,9 +729,9 @@ public function getFrida() } /** - * Sets frida + * Sets frida. * - * @param \Fingerprint\ServerAPI\Model\FridaResult $frida frida + * @param FridaResult $frida frida * * @return $this */ @@ -731,9 +743,9 @@ public function setFrida($frida) } /** - * Gets ip_blocklist + * Gets ip_blocklist. * - * @return \Fingerprint\ServerAPI\Model\IpBlockListResult + * @return IpBlockListResult */ public function getIpBlocklist() { @@ -741,9 +753,9 @@ public function getIpBlocklist() } /** - * Sets ip_blocklist + * Sets ip_blocklist. * - * @param \Fingerprint\ServerAPI\Model\IpBlockListResult $ip_blocklist ip_blocklist + * @param IpBlockListResult $ip_blocklist ip_blocklist * * @return $this */ @@ -755,9 +767,9 @@ public function setIpBlocklist($ip_blocklist) } /** - * Gets tor + * Gets tor. * - * @return \Fingerprint\ServerAPI\Model\TorResult + * @return TorResult */ public function getTor() { @@ -765,9 +777,9 @@ public function getTor() } /** - * Sets tor + * Sets tor. * - * @param \Fingerprint\ServerAPI\Model\TorResult $tor tor + * @param TorResult $tor tor * * @return $this */ @@ -779,9 +791,9 @@ public function setTor($tor) } /** - * Gets privacy_settings + * Gets privacy_settings. * - * @return \Fingerprint\ServerAPI\Model\PrivacySettingsResult + * @return PrivacySettingsResult */ public function getPrivacySettings() { @@ -789,9 +801,9 @@ public function getPrivacySettings() } /** - * Sets privacy_settings + * Sets privacy_settings. * - * @param \Fingerprint\ServerAPI\Model\PrivacySettingsResult $privacy_settings privacy_settings + * @param PrivacySettingsResult $privacy_settings privacy_settings * * @return $this */ @@ -803,9 +815,9 @@ public function setPrivacySettings($privacy_settings) } /** - * Gets virtual_machine + * Gets virtual_machine. * - * @return \Fingerprint\ServerAPI\Model\VirtualMachineResult + * @return VirtualMachineResult */ public function getVirtualMachine() { @@ -813,9 +825,9 @@ public function getVirtualMachine() } /** - * Sets virtual_machine + * Sets virtual_machine. * - * @param \Fingerprint\ServerAPI\Model\VirtualMachineResult $virtual_machine virtual_machine + * @param VirtualMachineResult $virtual_machine virtual_machine * * @return $this */ @@ -827,9 +839,9 @@ public function setVirtualMachine($virtual_machine) } /** - * Gets vpn + * Gets vpn. * - * @return \Fingerprint\ServerAPI\Model\VpnResult + * @return VpnResult */ public function getVpn() { @@ -837,9 +849,9 @@ public function getVpn() } /** - * Sets vpn + * Sets vpn. * - * @param \Fingerprint\ServerAPI\Model\VpnResult $vpn vpn + * @param VpnResult $vpn vpn * * @return $this */ @@ -851,9 +863,9 @@ public function setVpn($vpn) } /** - * Gets proxy + * Gets proxy. * - * @return \Fingerprint\ServerAPI\Model\ProxyResult + * @return ProxyResult */ public function getProxy() { @@ -861,9 +873,9 @@ public function getProxy() } /** - * Sets proxy + * Sets proxy. * - * @param \Fingerprint\ServerAPI\Model\ProxyResult $proxy proxy + * @param ProxyResult $proxy proxy * * @return $this */ @@ -875,9 +887,9 @@ public function setProxy($proxy) } /** - * Gets tampering + * Gets tampering. * - * @return \Fingerprint\ServerAPI\Model\TamperingResult + * @return TamperingResult */ public function getTampering() { @@ -885,9 +897,9 @@ public function getTampering() } /** - * Sets tampering + * Sets tampering. * - * @param \Fingerprint\ServerAPI\Model\TamperingResult $tampering tampering + * @param TamperingResult $tampering tampering * * @return $this */ @@ -899,9 +911,9 @@ public function setTampering($tampering) } /** - * Gets raw_device_attributes + * Gets raw_device_attributes. * - * @return \Fingerprint\ServerAPI\Model\RawDeviceAttributesResult + * @return RawDeviceAttributesResult */ public function getRawDeviceAttributes() { @@ -909,9 +921,9 @@ public function getRawDeviceAttributes() } /** - * Sets raw_device_attributes + * Sets raw_device_attributes. * - * @param \Fingerprint\ServerAPI\Model\RawDeviceAttributesResult $raw_device_attributes raw_device_attributes + * @param RawDeviceAttributesResult $raw_device_attributes raw_device_attributes * * @return $this */ @@ -923,9 +935,9 @@ public function setRawDeviceAttributes($raw_device_attributes) } /** - * Gets high_activity + * Gets high_activity. * - * @return \Fingerprint\ServerAPI\Model\HighActivityResult + * @return HighActivityResult */ public function getHighActivity() { @@ -933,9 +945,9 @@ public function getHighActivity() } /** - * Sets high_activity + * Sets high_activity. * - * @param \Fingerprint\ServerAPI\Model\HighActivityResult $high_activity high_activity + * @param HighActivityResult $high_activity high_activity * * @return $this */ @@ -947,9 +959,9 @@ public function setHighActivity($high_activity) } /** - * Gets location_spoofing + * Gets location_spoofing. * - * @return \Fingerprint\ServerAPI\Model\LocationSpoofingResult + * @return LocationSpoofingResult */ public function getLocationSpoofing() { @@ -957,9 +969,9 @@ public function getLocationSpoofing() } /** - * Sets location_spoofing + * Sets location_spoofing. * - * @param \Fingerprint\ServerAPI\Model\LocationSpoofingResult $location_spoofing location_spoofing + * @param LocationSpoofingResult $location_spoofing location_spoofing * * @return $this */ @@ -971,9 +983,9 @@ public function setLocationSpoofing($location_spoofing) } /** - * Gets suspect_score + * Gets suspect_score. * - * @return \Fingerprint\ServerAPI\Model\SuspectScoreResult + * @return SuspectScoreResult */ public function getSuspectScore() { @@ -981,9 +993,9 @@ public function getSuspectScore() } /** - * Sets suspect_score + * Sets suspect_score. * - * @param \Fingerprint\ServerAPI\Model\SuspectScoreResult $suspect_score suspect_score + * @param SuspectScoreResult $suspect_score suspect_score * * @return $this */ @@ -995,7 +1007,7 @@ public function setSuspectScore($suspect_score) } /** - * Gets request_id + * Gets request_id. * * @return string */ @@ -1005,9 +1017,9 @@ public function getRequestId() } /** - * Sets request_id + * Sets request_id. * - * @param string $request_id Unique identifier of the user's identification request. + * @param string $request_id unique identifier of the user's identification request * * @return $this */ @@ -1019,9 +1031,9 @@ public function setRequestId($request_id) } /** - * Gets browser_details + * Gets browser_details. * - * @return \Fingerprint\ServerAPI\Model\BrowserDetails + * @return BrowserDetails */ public function getBrowserDetails() { @@ -1029,9 +1041,9 @@ public function getBrowserDetails() } /** - * Sets browser_details + * Sets browser_details. * - * @param \Fingerprint\ServerAPI\Model\BrowserDetails $browser_details browser_details + * @param BrowserDetails $browser_details browser_details * * @return $this */ @@ -1043,7 +1055,7 @@ public function setBrowserDetails($browser_details) } /** - * Gets ip + * Gets ip. * * @return string */ @@ -1053,7 +1065,7 @@ public function getIp() } /** - * Sets ip + * Sets ip. * * @param string $ip ip * @@ -1067,9 +1079,9 @@ public function setIp($ip) } /** - * Gets ip_location + * Gets ip_location. * - * @return \Fingerprint\ServerAPI\Model\DeprecatedIPLocation + * @return DeprecatedIPLocation */ public function getIpLocation() { @@ -1077,9 +1089,9 @@ public function getIpLocation() } /** - * Sets ip_location + * Sets ip_location. * - * @param \Fingerprint\ServerAPI\Model\DeprecatedIPLocation $ip_location ip_location + * @param DeprecatedIPLocation $ip_location ip_location * * @return $this */ @@ -1091,7 +1103,7 @@ public function setIpLocation($ip_location) } /** - * Gets timestamp + * Gets timestamp. * * @return int */ @@ -1101,9 +1113,9 @@ public function getTimestamp() } /** - * Sets timestamp + * Sets timestamp. * - * @param int $timestamp Timestamp of the event with millisecond precision in Unix time. + * @param int $timestamp timestamp of the event with millisecond precision in Unix time * * @return $this */ @@ -1115,7 +1127,7 @@ public function setTimestamp($timestamp) } /** - * Gets time + * Gets time. * * @return \DateTime */ @@ -1125,9 +1137,9 @@ public function getTime() } /** - * Sets time + * Sets time. * - * @param \DateTime $time Time expressed according to ISO 8601 in UTC format. + * @param \DateTime $time time expressed according to ISO 8601 in UTC format * * @return $this */ @@ -1139,7 +1151,7 @@ public function setTime($time) } /** - * Gets url + * Gets url. * * @return string */ @@ -1149,9 +1161,9 @@ public function getUrl() } /** - * Sets url + * Sets url. * - * @param string $url Page URL from which the identification request was sent. + * @param string $url page URL from which the identification request was sent * * @return $this */ @@ -1163,7 +1175,7 @@ public function setUrl($url) } /** - * Gets tag + * Gets tag. * * @return map[string,object] */ @@ -1173,9 +1185,9 @@ public function getTag() } /** - * Sets tag + * Sets tag. * - * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request. + * @param map[string,object] $tag A customer-provided value or an object that was sent with identification request * * @return $this */ @@ -1187,7 +1199,7 @@ public function setTag($tag) } /** - * Gets linked_id + * Gets linked_id. * * @return string */ @@ -1197,9 +1209,9 @@ public function getLinkedId() } /** - * Sets linked_id + * 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 */ @@ -1211,9 +1223,9 @@ public function setLinkedId($linked_id) } /** - * Gets confidence + * Gets confidence. * - * @return \Fingerprint\ServerAPI\Model\Confidence + * @return Confidence */ public function getConfidence() { @@ -1221,9 +1233,9 @@ public function getConfidence() } /** - * Sets confidence + * Sets confidence. * - * @param \Fingerprint\ServerAPI\Model\Confidence $confidence confidence + * @param Confidence $confidence confidence * * @return $this */ @@ -1235,7 +1247,7 @@ public function setConfidence($confidence) } /** - * Gets visitor_found + * Gets visitor_found. * * @return bool */ @@ -1245,9 +1257,9 @@ public function getVisitorFound() } /** - * Sets visitor_found + * Sets visitor_found. * - * @param bool $visitor_found Attribute represents if a visitor had been identified before. + * @param bool $visitor_found attribute represents if a visitor had been identified before * * @return $this */ @@ -1259,9 +1271,9 @@ public function setVisitorFound($visitor_found) } /** - * Gets first_seen_at + * Gets first_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getFirstSeenAt() { @@ -1269,9 +1281,9 @@ public function getFirstSeenAt() } /** - * Sets first_seen_at + * Sets first_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $first_seen_at first_seen_at + * @param SeenAt $first_seen_at first_seen_at * * @return $this */ @@ -1283,9 +1295,9 @@ public function setFirstSeenAt($first_seen_at) } /** - * Gets last_seen_at + * Gets last_seen_at. * - * @return \Fingerprint\ServerAPI\Model\SeenAt + * @return SeenAt */ public function getLastSeenAt() { @@ -1293,9 +1305,9 @@ public function getLastSeenAt() } /** - * Sets last_seen_at + * Sets last_seen_at. * - * @param \Fingerprint\ServerAPI\Model\SeenAt $last_seen_at last_seen_at + * @param SeenAt $last_seen_at last_seen_at * * @return $this */ @@ -1305,12 +1317,13 @@ public function setLastSeenAt($last_seen_at) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) @@ -1321,7 +1334,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed */ @@ -1334,10 +1347,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int $offset Offset + * @param mixed $value Value to be set */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) @@ -1352,30 +1363,11 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } } diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index cd6ecc02..214bb57a 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -1,17 +1,18 @@ format('Y-m-d') : $data->format(\DateTime::ATOM); - } elseif (is_array($data)) { + } + if ($data instanceof \DateTime) { + return ('date' === $format) ? $data->format('Y-m-d') : $data->format(\DateTime::ATOM); + } + if (is_array($data)) { foreach ($data as $property => $value) { $data[$property] = self::sanitizeForSerialization($value); } + return $data; - } elseif ($data instanceof \stdClass) { + } + if ($data instanceof \stdClass) { foreach ($data as $property => $value) { - $data->$property = self::sanitizeForSerialization($value); + $data->{$property} = self::sanitizeForSerialization($value); } + return $data; - } elseif (is_object($data)) { + } + if (is_object($data)) { $values = []; $formats = $data::swaggerFormats(); foreach ($data::swaggerTypes() as $property => $swaggerType) { $getter = $data::getters()[$property]; - $value = $data->$getter(); - if ($value !== null + $value = $data->{$getter}(); + if (null !== $value && !in_array($swaggerType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true) && method_exists($swaggerType, 'getAllowableEnumValues') && !in_array($value, $swaggerType::getAllowableEnumValues())) { $imploded = implode("', '", $swaggerType::getAllowableEnumValues()); - throw new \InvalidArgumentException("Invalid value for enum '$swaggerType', must be one of: '$imploded'"); + + throw new \InvalidArgumentException("Invalid value for enum '{$swaggerType}', must be one of: '{$imploded}'"); } - if ($value !== null) { + if (null !== $value) { $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]); } } - return (object)$values; - } else { - return (string)$data; + + return (object) $values; } + + return (string) $data; } /** * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif + * e.g. ../../sun.gif becomes sun.gif. * * @param string $filename filename to be sanitized * @@ -95,11 +105,11 @@ public static function sanitizeForSerialization($data, $format = null) */ public static function sanitizeFilename($filename) { - if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + if (preg_match('/.*[\/\\\](.*)$/', $filename, $match)) { return $match[1]; - } else { - return $filename; } + + return $filename; } /** @@ -121,8 +131,8 @@ public static function toPathValue($value) * If it's a string, pass through unchanged. It will be url-encoded * later. * - * @param string[]|string|\DateTime $object an object to be serialized to a string - * @param string|null $format the format of the parameter + * @param \DateTime|string|string[] $object an object to be serialized to a string + * @param null|string $format the format of the parameter * * @return string the serialized object */ @@ -130,15 +140,15 @@ public static function toQueryValue($object, $format = null) { if (is_array($object)) { return implode(',', $object); - } else { - return self::toString($object, $format); } + + 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 + * If it's a datetime object, format it in RFC3339. * * @param string $value a string which will be part of the header * @@ -152,9 +162,9 @@ public static function toHeaderValue($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 + * If it's a datetime object, format it in RFC3339. * - * @param string|\SplFileObject $value the value of the form parameter + * @param \SplFileObject|string $value the value of the form parameter * * @return string the form string */ @@ -162,29 +172,29 @@ public static function toFormValue($value) { if ($value instanceof \SplFileObject) { return $value->getRealPath(); - } else { - return self::toString($value); } + + 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 * If it's a datetime object, format it in RFC3339 - * If it's a date, format it in Y-m-d + * If it's a date, format it in Y-m-d. * - * @param string|\DateTime $value the value of the parameter - * @param string|null $format the format of the parameter + * @param \DateTime|string $value the value of the parameter + * @param null|string $format the format of the parameter * * @return string the header string */ public static function toString($value, $format = null) { if ($value instanceof \DateTime) { - return ($format === 'date') ? $value->format('Y-m-d') : $value->format(\DateTime::ATOM); - } else { - return $value; + return ('date' === $format) ? $value->format('Y-m-d') : $value->format(\DateTime::ATOM); } + + return $value; } /** @@ -192,7 +202,7 @@ public static function toString($value, $format = null) * * @param array $collection collection to serialize to a string * @param string $collectionFormat the format use for serialization (csv, - * ssv, tsv, pipes, multi) + * ssv, tsv, pipes, multi) * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array * * @return string @@ -204,6 +214,7 @@ public static function serializeCollection(array $collection, $collectionFormat, // need to fix the result of multidimensional arrays. return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); } + switch ($collectionFormat) { case 'pipes': return implode('|', $collection); @@ -222,41 +233,47 @@ public static function serializeCollection(array $collection, $collectionFormat, } /** - * Deserialize a JSON string into an object + * Deserialize a JSON string into an object. * - * @param mixed $data object or primitive to be deserialized - * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers * - * @return object|array|null an single or an array of $class instances + * @throws \Exception */ - public static function deserialize($data, $class, $httpHeaders = null) + public static function deserialize($data, $class, $httpHeaders = null): mixed { if (null === $data) { return null; - } elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int] + } + if ('map[' === substr($class, 0, 4)) { // for associative array e.g. map[string,int] $inner = substr($class, 4, -1); $deserialized = []; - if (strrpos($inner, ",") !== false) { + 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); } } + return $deserialized; - } elseif (strcasecmp(substr($class, -2), '[]') === 0) { + } + if (0 === strcasecmp(substr($class, -2), '[]')) { $subClass = substr($class, 0, -2); $values = []; foreach ($data as $key => $value) { $values[] = self::deserialize($value, $subClass, null); } + return $values; - } elseif ($class === 'object' || $class === '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult') { + } + if ('object' === $class || '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult' === $class) { settype($data, 'array'); + return $data; - } elseif ($class === '\DateTime') { + } + if ('\DateTime' === $class) { // Some API's return an invalid, empty string as a // date-time property. DateTime::__construct() will return // the current time for empty input which is probably not @@ -265,59 +282,62 @@ public static function deserialize($data, $class, $httpHeaders = null) // this graceful. if (!empty($data)) { return new \DateTime($data); - } else { - return null; } - } elseif (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { - settype($data, $class); - return $data; - } elseif ($class === '\SplFileObject') { - /** @var \Psr\Http\Message\StreamInterface $data */ - - // determine file name - if (array_key_exists('Content-Disposition', $httpHeaders) && - preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); - } else { - $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + + return null; + } + if (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $originalData = $data; + $normalizedClass = strtolower($class); + + switch ($normalizedClass) { + case 'int': + $normalizedClass = 'integer'; + + break; + + case 'bool': + $normalizedClass = 'boolean'; + + break; + } + if ('float' === $normalizedClass && is_numeric($originalData)) { + return (float) $originalData; + } + if ('string' === $normalizedClass && is_object($data)) { + throw new \Exception('Cannot convert object to string'); } - $file = fopen($filename, 'w'); - while ($chunk = $data->read(200)) { - fwrite($file, $chunk); + settype($data, $class); + if (gettype($data) === $normalizedClass) { + return $data; } - fclose($file); - return new \SplFileObject($filename, 'r'); + throw new \Exception('Serialization error: Could not convert '.gettype($originalData).' to '.$class); } elseif (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues())) { $imploded = implode("', '", $class::getAllowableEnumValues()); - throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + + throw new \InvalidArgumentException("Invalid value for enum '{$class}', must be one of: '{$imploded}'"); } + return $data; - } else { - // If a discriminator is defined and points to a valid subclass, use it. - $discriminator = $class::DISCRIMINATOR; - if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { - $subclass = 'Fingerprint\ServerAPI\Model\\' . $data->{$discriminator}; - if (is_subclass_of($subclass, $class)) { - $class = $subclass; - } - } - $instance = new $class(); - foreach ($instance::swaggerTypes() as $property => $type) { - $propertySetter = $instance::setters()[$property]; + } - if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { - continue; - } + $instance = new $class(); + foreach ($instance::swaggerTypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; - $propertyValue = $data->{$instance::attributeMap()[$property]}; - if (isset($propertyValue)) { - $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); - } + 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 $instance; } } diff --git a/src/Sealed/DecompressionException.php b/src/Sealed/DecompressionException.php index 1f5d6622..6f6d3763 100644 --- a/src/Sealed/DecompressionException.php +++ b/src/Sealed/DecompressionException.php @@ -2,12 +2,10 @@ namespace Fingerprint\ServerAPI\Sealed; -use Exception; - -class DecompressionException extends Exception +class DecompressionException extends \Exception { public function __construct() { - parent::__construct("Decompression failed"); + parent::__construct('Decompression failed'); } -} \ No newline at end of file +} diff --git a/src/Sealed/DecryptionAlgorithm.php b/src/Sealed/DecryptionAlgorithm.php index 766aebc6..80427cf9 100644 --- a/src/Sealed/DecryptionAlgorithm.php +++ b/src/Sealed/DecryptionAlgorithm.php @@ -4,5 +4,5 @@ class DecryptionAlgorithm { - const AES_256_GCM = 'aes-256-gcm'; -} \ No newline at end of file + public const AES_256_GCM = 'aes-256-gcm'; +} diff --git a/src/Sealed/DecryptionKey.php b/src/Sealed/DecryptionKey.php index 3135785f..98799a73 100644 --- a/src/Sealed/DecryptionKey.php +++ b/src/Sealed/DecryptionKey.php @@ -22,4 +22,4 @@ public function getAlgorithm() { return $this->algorithm; } -} \ No newline at end of file +} diff --git a/src/Sealed/InvalidSealedDataException.php b/src/Sealed/InvalidSealedDataException.php index 283857d1..809199f9 100644 --- a/src/Sealed/InvalidSealedDataException.php +++ b/src/Sealed/InvalidSealedDataException.php @@ -2,12 +2,10 @@ namespace Fingerprint\ServerAPI\Sealed; -use InvalidArgumentException; - -class InvalidSealedDataException extends InvalidArgumentException +class InvalidSealedDataException extends \InvalidArgumentException { public function __construct() { - parent::__construct("Invalid sealed data"); + parent::__construct('Invalid sealed data'); } -} \ No newline at end of file +} diff --git a/src/Sealed/InvalidSealedDataHeaderException.php b/src/Sealed/InvalidSealedDataHeaderException.php index ed72b610..9f4d70e9 100644 --- a/src/Sealed/InvalidSealedDataHeaderException.php +++ b/src/Sealed/InvalidSealedDataHeaderException.php @@ -2,12 +2,10 @@ namespace Fingerprint\ServerAPI\Sealed; -use InvalidArgumentException; - -class InvalidSealedDataHeaderException extends InvalidArgumentException +class InvalidSealedDataHeaderException extends \InvalidArgumentException { public function __construct() { - parent::__construct("Invalid sealed data header"); + parent::__construct('Invalid sealed data header'); } -} \ No newline at end of file +} diff --git a/src/Sealed/Sealed.php b/src/Sealed/Sealed.php index 909172fc..5bd26c57 100644 --- a/src/Sealed/Sealed.php +++ b/src/Sealed/Sealed.php @@ -2,22 +2,21 @@ namespace Fingerprint\ServerAPI\Sealed; -use Exception; use Fingerprint\ServerAPI\Model\EventResponse; -use InvalidArgumentException; -class Sealed { - private static $SEAL_HEADER = "\x9E\x85\xDC\xED"; +class Sealed +{ private const NONCE_LENGTH = 12; private const AUTH_TAG_LENGTH = 16; + private static $SEAL_HEADER = "\x9E\x85\xDC\xED"; /** - * @param string $sealed * @param DecryptionKey[] $keys - * @return EventResponse + * * @throws UnsealAggregateException */ - public static function unsealEventResponse(string $sealed, array $keys): EventResponse { + public static function unsealEventResponse(string $sealed, array $keys): EventResponse + { $unsealed = self::unseal($sealed, $keys); $data = json_decode($unsealed, true); @@ -32,9 +31,9 @@ public static function unsealEventResponse(string $sealed, array $keys): EventRe /** * Decrypts the sealed response with the provided keys. * - * @param string $sealed Base64 encoded sealed data - * @param DecryptionKey[] $keys Decryption keys. The SDK will try to decrypt the result with each key until it succeeds. - * @return string + * @param string $sealed Base64 encoded sealed data + * @param DecryptionKey[] $keys Decryption keys. The SDK will try to decrypt the result with each key until it succeeds. + * * @throws UnsealAggregateException */ public static function unseal(string $sealed, array $keys): string @@ -50,18 +49,20 @@ public static function unseal(string $sealed, array $keys): string case DecryptionAlgorithm::AES_256_GCM: try { $data = substr($sealed, strlen(self::$SEAL_HEADER)); + return self::decryptAes256Gcm($data, $key->getKey()); - } catch (Exception $exception) { + } catch (\Exception $exception) { $aggregateException->addException(new UnsealException( - "Failed to decrypt", + 'Failed to decrypt', $exception, $key )); } + break; default: - throw new InvalidArgumentException("Invalid decryption algorithm"); + throw new \InvalidArgumentException('Invalid decryption algorithm'); } } @@ -69,7 +70,10 @@ public static function unseal(string $sealed, array $keys): string } /** - * @throws Exception + * @param mixed $sealedData + * @param mixed $decryptionKey + * + * @throws \Exception */ private static function decryptAes256Gcm($sealedData, $decryptionKey): string { @@ -81,24 +85,26 @@ private static function decryptAes256Gcm($sealedData, $decryptionKey): string $decryptedData = openssl_decrypt($ciphertext, 'aes-256-gcm', $decryptionKey, OPENSSL_RAW_DATA, $nonce, $tag); - if ($decryptedData === false) { - throw new Exception("Decryption failed"); + if (false === $decryptedData) { + throw new \Exception('Decryption failed'); } return self::decompress($decryptedData); } /** - * @throws Exception + * @param mixed $data + * + * @throws \Exception */ private static function decompress($data): string { $inflated = gzinflate($data); - if ($inflated === false) { + if (false === $inflated) { throw new DecompressionException(); } return $inflated; } -} \ No newline at end of file +} diff --git a/src/Sealed/UnsealAggregateException.php b/src/Sealed/UnsealAggregateException.php index b465f91b..00f3969b 100644 --- a/src/Sealed/UnsealAggregateException.php +++ b/src/Sealed/UnsealAggregateException.php @@ -2,28 +2,25 @@ namespace Fingerprint\ServerAPI\Sealed; -use Exception; - -class UnsealAggregateException extends Exception +class UnsealAggregateException extends \Exception { /** - * @var Exception[] + * @var \Exception[] */ private $exceptions; public function __construct() { - parent::__construct("Failed to unseal with all decryption keys"); + parent::__construct('Failed to unseal with all decryption keys'); } - public function addException(Exception $exception) + public function addException(\Exception $exception) { $this->exceptions[] = $exception; } - public function getExceptions() { return $this->exceptions; } -} \ No newline at end of file +} diff --git a/src/Sealed/UnsealException.php b/src/Sealed/UnsealException.php index 6d35b563..16bbad3a 100644 --- a/src/Sealed/UnsealException.php +++ b/src/Sealed/UnsealException.php @@ -2,10 +2,7 @@ namespace Fingerprint\ServerAPI\Sealed; - -use Exception; - -class UnsealException extends Exception +class UnsealException extends \Exception { public $decryptionKeyDescription; @@ -17,10 +14,10 @@ public function __construct($message, $cause, $decryptionKey) public function __toString() { - return "UnsealException{" . - "decryptionKey=" . $this->decryptionKeyDescription . - ", message=" . $this->getMessage() . - ", cause=" . $this->getPrevious() . + return 'UnsealException{'. + 'decryptionKey='.$this->decryptionKeyDescription. + ', message='.$this->getMessage(). + ', cause='.$this->getPrevious(). '}'; } -} \ No newline at end of file +} diff --git a/src/SerializationException.php b/src/SerializationException.php new file mode 100644 index 00000000..9c0fe867 --- /dev/null +++ b/src/SerializationException.php @@ -0,0 +1,21 @@ +getCode(), $prev); + $this->response = $response; + } + + public function getResponse(): ResponseInterface + { + return $this->response; + } +} diff --git a/template/ApiException.mustache b/template/ApiException.mustache new file mode 100644 index 00000000..d8b983c9 --- /dev/null +++ b/template/ApiException.mustache @@ -0,0 +1,75 @@ +partial_header}} +/** + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ + +namespace {{invokerPackage}}; + +use \Exception; + +/** + * ApiException Class Doc Comment + * + * @category Class + * @package {{invokerPackage}} + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen + */ +class ApiException extends Exception +{ + + /** + * 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) + { + parent::__construct($message, $code); + } + + /** + * Sets the deseralized response object (during deserialization) + * + * @param mixed $obj Deserialized response object + * + * @return void + */ + public function setResponseObject($obj) + { + $this->responseObject = $obj; + } + + /** + * Gets the deseralized response object (during deserialization) + * + * @return mixed the deserialized response object + */ + public function getResponseObject() + { + return $this->responseObject; + } +} \ No newline at end of file diff --git a/template/ObjectSerializer.mustache b/template/ObjectSerializer.mustache deleted file mode 100644 index 89e95e21..00000000 --- a/template/ObjectSerializer.mustache +++ /dev/null @@ -1,314 +0,0 @@ -partial_header}} -/** - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen - * Do not edit the class manually. - */ - -namespace {{invokerPackage}}; - -/** - * ObjectSerializer Class Doc Comment - * - * @category Class - * @package {{invokerPackage}} - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen - */ -class ObjectSerializer -{ - /** - * Serialize data - * - * @param mixed $data the data to serialize - * @param string $format the format of the Swagger type of the data - * - * @return string|object serialized form of $data - */ - public static function sanitizeForSerialization($data, $format = null) - { - if (is_scalar($data) || null === $data) { - return $data; - } elseif ($data instanceof \DateTime) { - return ($format === 'date') ? $data->format('Y-m-d') : $data->format(\DateTime::ATOM); - } elseif (is_array($data)) { - foreach ($data as $property => $value) { - $data[$property] = self::sanitizeForSerialization($value); - } - return $data; - } elseif ($data instanceof \stdClass) { - foreach ($data as $property => $value) { - $data->$property = self::sanitizeForSerialization($value); - } - return $data; - } elseif (is_object($data)) { - $values = []; - $formats = $data::swaggerFormats(); - foreach ($data::swaggerTypes() as $property => $swaggerType) { - $getter = $data::getters()[$property]; - $value = $data->$getter(); - if ($value !== null - && !in_array($swaggerType, [{{&primitives}}], true) - && method_exists($swaggerType, 'getAllowableEnumValues') - && !in_array($value, $swaggerType::getAllowableEnumValues())) { - $imploded = implode("', '", $swaggerType::getAllowableEnumValues()); - throw new \InvalidArgumentException("Invalid value for enum '$swaggerType', must be one of: '$imploded'"); - } - if ($value !== null) { - $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]); - } - } - return (object)$values; - } else { - 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]; - } else { - return $filename; - } - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the path, by url-encoding. - * - * @param string $value a string which will be part of the path - * - * @return string the serialized object - */ - public static function toPathValue($value) - { - return rawurlencode(self::toString($value)); - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the query, by imploding comma-separated if it's an object. - * If it's a string, pass through unchanged. It will be url-encoded - * later. - * - * @param string[]|string|\DateTime $object an object to be serialized to a string - * @param string|null $format the format of the parameter - * - * @return string the serialized object - */ - public static function toQueryValue($object, $format = null) - { - if (is_array($object)) { - return implode(',', $object); - } else { - 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 string|\SplFileObject $value the value of the form parameter - * - * @return string the form string - */ - public static function toFormValue($value) - { - if ($value instanceof \SplFileObject) { - return $value->getRealPath(); - } else { - 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 - * If it's a datetime object, format it in RFC3339 - * If it's a date, format it in Y-m-d - * - * @param string|\DateTime $value the value of the parameter - * @param string|null $format the format of the parameter - * - * @return string the header string - */ - public static function toString($value, $format = null) - { - if ($value instanceof \DateTime) { - return ($format === 'date') ? $value->format('Y-m-d') : $value->format(\DateTime::ATOM); - } else { - return $value; - } - } - - /** - * Serialize an array to a string. - * - * @param array $collection collection to serialize to a string - * @param string $collectionFormat the format use for serialization (csv, - * ssv, tsv, pipes, multi) - * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array - * - * @return string - */ - public static function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false) - { - 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, '', '&')); - } - switch ($collectionFormat) { - case 'pipes': - return implode('|', $collection); - - case 'tsv': - return implode("\t", $collection); - - case 'ssv': - return implode(' ', $collection); - - case 'csv': - // Deliberate fall through. CSV is default format. - default: - return implode(',', $collection); - } - } - - /** - * Deserialize a JSON string into an object - * - * @param mixed $data object or primitive to be deserialized - * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used - * - * @return object|array|null an single or an array of $class instances - */ - public static function deserialize($data, $class, $httpHeaders = null) - { - if (null === $data) { - return null; - } elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int] - $inner = substr($class, 4, -1); - $deserialized = []; - if (strrpos($inner, ",") !== false) { - $subClass_array = explode(',', $inner, 2); - $subClass = $subClass_array[1]; - foreach ($data as $key => $value) { - $deserialized[$key] = self::deserialize($value, $subClass, null); - } - } - return $deserialized; - } elseif (strcasecmp(substr($class, -2), '[]') === 0) { - $subClass = substr($class, 0, -2); - $values = []; - foreach ($data as $key => $value) { - $values[] = self::deserialize($value, $subClass, null); - } - return $values; - } elseif ($class === 'object' || $class === '\Fingerprint\ServerAPI\Model\RawDeviceAttributesResult') { - settype($data, 'array'); - return $data; - } elseif ($class === '\DateTime') { - // Some API's return an invalid, empty string as a - // date-time property. DateTime::__construct() will return - // the current time for empty input which is probably not - // what is meant. The invalid empty string is probably to - // be interpreted as a missing field/value. Let's handle - // this graceful. - if (!empty($data)) { - return new \DateTime($data); - } else { - return null; - } - } elseif (in_array($class, [{{&primitives}}], true)) { - settype($data, $class); - return $data; - } elseif ($class === '\SplFileObject') { - /** @var \Psr\Http\Message\StreamInterface $data */ - - // determine file name - if (array_key_exists('Content-Disposition', $httpHeaders) && - preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); - } else { - $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); - } - - $file = fopen($filename, 'w'); - while ($chunk = $data->read(200)) { - fwrite($file, $chunk); - } - fclose($file); - - return new \SplFileObject($filename, 'r'); - } elseif (method_exists($class, 'getAllowableEnumValues')) { - if (!in_array($data, $class::getAllowableEnumValues())) { - $imploded = implode("', '", $class::getAllowableEnumValues()); - throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); - } - return $data; - } else { - // If a discriminator is defined and points to a valid subclass, use it. - $discriminator = $class::DISCRIMINATOR; - if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { - $subclass = '{{invokerPackage}}\Model\\' . $data->{$discriminator}; - if (is_subclass_of($subclass, $class)) { - $class = $subclass; - } - } - $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; - } - } -} diff --git a/template/api.mustache b/template/api.mustache index e2cd5cda..a47717ca 100644 --- a/template/api.mustache +++ b/template/api.mustache @@ -21,13 +21,14 @@ namespace {{apiPackage}}; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use {{invokerPackage}}\ApiException; use {{invokerPackage}}\Configuration; -use {{invokerPackage}}\HeaderSelector; use {{invokerPackage}}\ObjectSerializer; +use {{invokerPackage}}\SerializationException; +use Psr\Http\Message\ResponseInterface; +use \GuzzleHttp\Exception\GuzzleException; /** * {{classname}} Class Doc Comment @@ -39,36 +40,21 @@ use {{invokerPackage}}\ObjectSerializer; */ {{#operations}}class {{classname}} { - /** - * @var ClientInterface - */ - protected $client; - - /** - * @var Configuration - */ - protected $config; - - /** - * @var HeaderSelector - */ - protected $headerSelector; + protected ClientInterface $client; + protected Configuration $config; protected $integration_info = 'fingerprint-pro-server-php-sdk/{{artifactVersion}}'; /** * @param ClientInterface $client * @param Configuration $config - * @param HeaderSelector $selector */ public function __construct( ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null + Configuration $config = null ) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); } /** @@ -81,33 +67,9 @@ use {{invokerPackage}}\ObjectSerializer; {{#operation}} {{#contents}} - /** - * Operation {{{operationId}}} -{{#summary}} - * - * {{{summary}}} -{{/summary}} - * -{{#description}} - * {{.}} - * -{{/description}} -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} - * - * @throws {{backSlash}}{{invokerPackage}}\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} - */ - public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - { - {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}});{{#returnType}} - return $response;{{/returnType}} - } /** - * Operation {{{operationId}}}WithHttpInfo + * Operation {{{operationId}}} {{#summary}} * * {{{summary}}} @@ -123,9 +85,11 @@ use {{invokerPackage}}\ObjectSerializer; * * @throws {{backSlash}}{{invokerPackage}}\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (array of strings) + * @throws SerializationException + * @throws GuzzleException + * @return array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface } */ - public function {{operationId}}WithHttpInfo({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) + public function {{operationId}}({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) { $returnType = '{{returnType}}'; $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); @@ -135,156 +99,69 @@ use {{invokerPackage}}\ObjectSerializer; try { $response = $this->client->send($request, $options); } catch (RequestException $e) { - throw new ApiException( + $apiException = new ApiException( "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + $e->getCode() ); + $apiException->setResponseObject($e->getResponse()); + throw $apiException; } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( + $apiException = new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $request->getUri() ), - $statusCode, - $response->getHeaders(), - $response->getBody() + $statusCode ); + $apiException->setResponseObject($response); + throw $apiException; } {{#returnType}} - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + + try { + $serialized = ObjectSerializer::deserialize($responseBody, $returnType, []); + } catch (\Exception $e) { + throw new SerializationException($response, $e); } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [$serialized, $response]; {{/returnType}} {{^returnType}} - return [null, $statusCode, $response->getHeaders()]; + return [null, $response]; {{/returnType}} } catch (ApiException $e) { - switch ($e->getCode()) { - {{#responses}} - {{#dataType}} - {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '{{dataType}}', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - 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 - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function {{operationId}}Async({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - { - return $this->{{operationId}}AsyncWithHttpInfo({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation {{{operationId}}}AsyncWithHttpInfo - * - * {{{summary}}} - * -{{#description}} - * {{.}} - * -{{/description}} -{{#parameters}} - * @param {{dataType}} ${{paramName}}{{#description}} {{{description}}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/parameters}} - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function {{operationId}}AsyncWithHttpInfo({{#parameters}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) - { - $returnType = '{{returnType}}'; - $request = $this->{{operationId}}Request({{#parameters}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - {{#returnType}} - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } + try { + switch ($e->getCode()) { + {{#responses}} + {{#dataType}} + {{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + /** @var ResponseInterface $response */ + $response = $e->getResponseObject(); + $responseBody = $response->getBody()->getContents(); + $response->getBody()->rewind(); + $data = ObjectSerializer::deserialize( + $responseBody, + '{{dataType}}', + $response->getHeaders() + ); + $e->setResponseObject($data); + break; + {{/dataType}} + {{/responses}} } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - {{/returnType}} - {{^returnType}} - return [null, $response->getStatusCode(), $response->getHeaders()]; - {{/returnType}} - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); + throw $e; + } catch (\Exception $_) { } - ); + } } /** @@ -349,11 +226,10 @@ use {{invokerPackage}}\ObjectSerializer; {{/parameters}} $resourcePath = '{{{path}}}'; - $formParams = []; + $headers = []; $queryParams = ['ii' => $this->integration_info]; $headerParams = []; $httpBody = ''; - $multipart = false; {{#queryParams}} // query params @@ -394,65 +270,18 @@ use {{invokerPackage}}\ObjectSerializer; } {{/pathParams}} - {{#formParams}} - // form params - if (${{paramName}} !== null) { - {{#isBinary}} - $multipart = true; - $formParams['{{baseName}}'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue(${{paramName}}), 'rb'); - {{/isBinary}} - {{^isBinary}} - $formParams['{{baseName}}'] = ObjectSerializer::toFormValue(${{paramName}}); - {{/isBinary}} - } - {{/formParams}} + {{#bodyParams}} // body params $_tempBody = null; - {{#bodyParams}} if (isset(${{paramName}})) { $_tempBody = ${{paramName}}; } - {{/bodyParams}} - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [{{#produces}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/produces}}] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [{{#produces}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/produces}}], - [{{#consumes}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/consumes}}] - ); - } - // for model (json/xml) if (isset($_tempBody)) { // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = http_build_query($formParams); - } + $httpBody = json_encode($_tempBody); } + {{/bodyParams}} {{#authMethods}} {{#isApiKey}} @@ -482,7 +311,10 @@ use {{invokerPackage}}\ObjectSerializer; {{/isOAuth}} {{/authMethods}} - $defaultHeaders = []; + $defaultHeaders = [ + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + ]; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } diff --git a/template/api_doc.mustache b/template/api_doc.mustache index 2b6c9f5b..f42a5e90 100644 --- a/template/api_doc.mustache +++ b/template/api_doc.mustache @@ -1,5 +1,5 @@ # {{invokerPackage}}\FingerprintApi{{#description}} -{{description}}{{/description}} + {{description}}{{/description}} All URIs are relative to *{{basePath}}* @@ -11,7 +11,7 @@ Method | HTTP request | Description {{#operations}} {{#operation}} # **{{{operationId}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) +> {{#returnType}} [ {{{returnType}}}, \Psr\Http\Message\ResponseInterface ] {{/returnType}}{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {{{summary}}}{{#notes}} @@ -34,15 +34,15 @@ use GuzzleHttp\Client; $config = Configuration::getDefaultConfiguration(FPJS_API_SECRET, Configuration::REGION_EUROPE); $client = new FingerprintApi( new Client(), - $config +$config ); {{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} try { - {{#returnType}}$result = {{/returnType}}$client->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} - echo "
" . $response->__toString() . "
";{{/returnType}} + {{#returnType}}list($model, $httpResponse) = {{/returnType}}$client->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + echo "
" . $httpResponse->getBody()->getContents() . "
";{{/returnType}} } catch (Exception $e) { echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; } @@ -58,7 +58,10 @@ Name | Type | Description | Notes ### Return type -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**](../Model/{{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} +Array: +0. {{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**](../Model/{{returnBaseType}}.md) | null{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null{{/returnType}}, +1. \Psr\Http\Message\ResponseInterface + ### Authorization @@ -72,4 +75,4 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) {{/operation}} -{{/operations}} +{{/operations}} \ No newline at end of file diff --git a/template/composer.mustache b/template/composer.mustache index 397d75a8..1f968f05 100644 --- a/template/composer.mustache +++ b/template/composer.mustache @@ -42,8 +42,7 @@ }, "require-dev": { "phpunit/phpunit": "8.5.33", - "squizlabs/php_codesniffer": "~2.6", - "friendsofphp/php-cs-fixer": "~2.19" + "vlucas/phpdotenv": "^5.6" }, "autoload": { "psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/src" } diff --git a/template/model.mustache b/template/model.mustache index e1a87299..bac220d1 100644 --- a/template/model.mustache +++ b/template/model.mustache @@ -4,12 +4,9 @@ /** * {{classname}} * - * PHP version 5 - * * @category Class - * @package {{invokerPackage}} * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @see https://github.com/swagger-api/swagger-codegen */ {{>partial_header}} diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 98959904..4604ec01 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -1,7 +1,5 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess{{/parentSchema}} { - const DISCRIMINATOR = {{#discriminator}}'{{discriminator}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}}; - /** * The original name of the model. * @@ -163,12 +161,6 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa {{#vars}} $this->container['{{name}}'] = isset($data['{{name}}']) ? $data['{{name}}'] : {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}; {{/vars}} - {{#discriminator}} - - // Initialize discriminator property with the model name. - $discriminator = array_search('{{discriminator}}', self::$attributeMap, true); - $this->container[$discriminator] = static::$swaggerModelName; - {{/discriminator}} } /** diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index 788f87f9..3ee91f78 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -2,6 +2,7 @@ namespace Fingerprint\ServerAPI; +use Exception; use Fingerprint\ServerAPI\Api\FingerprintApi; use Fingerprint\ServerAPI\Model\EventResponse; use Fingerprint\ServerAPI\Model\IdentificationError; @@ -15,12 +16,14 @@ class FingerprintApiTest extends TestCase /** @var FingerprintApi */ protected $fingerprint_api; - const MOCK_REQUEST_ID = '1708102555327.NLOjmg'; - const MOCK_EXTRA_FIELDS_REQUEST_ID = '0KSh65EnVoB85JBmloQK'; - const MOCK_REQUEST_ALL_ERRORS = 'ALL_ERRORS'; - const MOCK_REQUEST_EXTRA_FIELDS = 'EXTRA_FIELDS'; - const MOCK_VISITOR_ID = 'AcxioeQKffpXF8iGQK3P'; - const MOCK_VISITOR_REQUEST_ID = '1655373780901.HhjRFX'; + public const MOCK_REQUEST_ID = '1708102555327.NLOjmg'; + public const MOCK_REQUEST_ID_WITH_UNKNOWN = 'UNKNOWN_FIELD_REQUEST_ID'; + public const MOCK_REQUEST_ID_WITH_BROKEN = 'BROKEN_FIELD_REQUEST_ID'; + public const MOCK_EXTRA_FIELDS_REQUEST_ID = '0KSh65EnVoB85JBmloQK'; + public const MOCK_REQUEST_ALL_ERRORS = 'ALL_ERRORS'; + public const MOCK_REQUEST_EXTRA_FIELDS = 'EXTRA_FIELDS'; + public const MOCK_VISITOR_ID = 'AcxioeQKffpXF8iGQK3P'; + public const MOCK_VISITOR_REQUEST_ID = '1655373780901.HhjRFX'; protected function getMethod($method_name) { @@ -32,10 +35,10 @@ protected function getMethod($method_name) protected function getVersion() { - $config_file = file_get_contents(__DIR__ . '/../config.json'); + $config_file = file_get_contents(__DIR__ . '/../composer.json'); $config = json_decode($config_file, true); - return $config['artifactVersion']; + return $config['version']; } public function setUp(): void @@ -46,18 +49,22 @@ public function setUp(): void $this->fingerprint_api = $this->getMockBuilder(FingerprintApi::class) ->getMock(); - $this->fingerprint_api->method('getEvent')->will($this->returnCallback([$this, 'getEventMock'])); - $this->fingerprint_api->method('getVisits')->will($this->returnCallback([$this, 'getVisitsMock'])); + $this->fingerprint_api->method('getEvent')->will($this->returnCallback([$this, 'getEventWithHttpInfoMock'])); + $this->fingerprint_api->method('getVisits')->will($this->returnCallback([$this, 'getVisitsWithHttpInfoMock'])); } - public function getEventMock($request_id) + /** + * @throws \ReflectionException + * @throws SerializationException + */ + public function getEventWithHttpInfoMock($request_id): array { $event_request_method = $this->getMethod('getEventRequest'); /** @var \GuzzleHttp\Psr7\Request $event_request */ $event_request = $event_request_method->invokeArgs($this->fingerprint_api, [self::MOCK_REQUEST_ID]); $query = $event_request->getUri()->getQuery(); $this->assertStringContainsString("ii=" . urlencode("fingerprint-pro-server-php-sdk/" . $this->getVersion()), $query); - $mock_name = ''; + $mock_name = ""; switch ($request_id) { case self::MOCK_REQUEST_ID: $mock_name = 'get_event_200.json'; @@ -68,14 +75,34 @@ public function getEventMock($request_id) case self::MOCK_REQUEST_EXTRA_FIELDS: $mock_name = 'get_event_200_extra_fields.json'; break; + case self::MOCK_REQUEST_ID_WITH_UNKNOWN: + $mock_name = 'get_event_200_with_unknown_field.json'; + break; + case self::MOCK_REQUEST_ID_WITH_BROKEN: + $mock_name = 'get_event_200_with_broken_format.json'; + break; } - $events_mock_data = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/$mock_name")); - return ObjectSerializer::deserialize($events_mock_data, EventResponse::class); + + $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); + } catch (Exception $exception) { + throw new SerializationException($response, $exception); + } + + return [$serialized, $response]; } - public function getVisitsMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null) + /** + * @throws SerializationException + */ + public function getVisitsWithHttpInfoMock($visitor_id, $request_id = null, $linked_id = null, $limit = null, $before = null): array { - $visits_mock_data = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . '/mocks/get_visits_200_limit_500.json')); + $file = file_get_contents(__DIR__ . '/mocks/get_visits_200_limit_500.json'); + $visits_mock_data = \GuzzleHttp\json_decode($file); if ($request_id) { $visits_mock_data->visits = array_filter($visits_mock_data->visits, function ($item) use ($request_id) { return $item->requestId = $request_id; @@ -85,12 +112,20 @@ public function getVisitsMock($visitor_id, $request_id = null, $linked_id = null if ($limit && is_numeric($limit)) { $visits_mock_data->visits = array_slice($visits_mock_data->visits, 0, $limit); } - return ObjectSerializer::deserialize($visits_mock_data, Response::class); + + $response = new \GuzzleHttp\Psr7\Response(200, [], $file); + try { + $serialized = ObjectSerializer::deserialize($visits_mock_data, Response::class); + } catch (Exception $exception) { + throw new SerializationException($response, $exception); + } + + return [$serialized, $response]; } public function testGetEvent() { - $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID); $products = $event->getProducts(); $identification_product = $products->getIdentification(); $botd_product = $products->getBotd(); @@ -104,9 +139,8 @@ public function testGetEvent() $virtual_machine_product = $products->getVirtualMachine(); $request_id = $identification_product->getData()->getRequestId(); $this->assertEquals(self::MOCK_REQUEST_ID, $request_id); - var_dump($botd_product->getData()->getBot()->getResult()); $this->assertEquals('notDetected', $botd_product->getData()->getBot()->getResult()); - $this->assertFalse( $vpn_product->getData()->getMethods()->getPublicVpn()); + $this->assertFalse($vpn_product->getData()->getMethods()->getPublicVpn()); $this->assertEquals('94.142.239.124', $ip_info_product->getData()->getV4()->getAddress()); $this->assertFalse($cloned_app_product->getData()->getResult()); $this->assertEquals(new \DateTime('1970-01-01T00:00:00Z'), $factory_reset_product->getData()->getTime()); @@ -120,18 +154,18 @@ public function testGetEvent() $this->assertEquals(35.73832903057337, $raw_device_attributes['audio']->value); $this->assertEquals('4dce9d6017c3e0c052a77252f29f2b1c', $raw_device_attributes['canvas']->value->Geometry); $this->assertEquals('p3', $raw_device_attributes['colorGamut']->value); - $this->assertTrue( $raw_device_attributes['cookiesEnabled']->value); + $this->assertTrue($raw_device_attributes['cookiesEnabled']->value); $location_spuffing = $products->getLocationSpoofing()->getData(); - $this->assertFalse( $location_spuffing->getResult()); + $this->assertFalse($location_spuffing->getResult()); $high_activity = $products->getHighActivity()->getData(); - $this->assertFalse( $high_activity->getResult()); + $this->assertFalse($high_activity->getResult()); } public function testGetEventWithExtraFields() { - $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_EXTRA_FIELDS); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_EXTRA_FIELDS); $products = $event->getProducts(); $identification_product = $products->getIdentification(); $request_id = $identification_product->getData()->getRequestId(); @@ -140,7 +174,7 @@ public function testGetEventWithExtraFields() public function testGetEventWithAllErrors() { - $event = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ALL_ERRORS); + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ALL_ERRORS); $products = $event->getProducts(); $identification_error = $products->getIdentification()->getError(); $botd_error = $products->getBotd()->getError(); @@ -184,13 +218,13 @@ public function testGetEventWithAllErrors() public function testGetVisits() { - $visits = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID); + list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID); $this->assertEquals($visits->getVisitorId(), self::MOCK_VISITOR_ID); } public function testGetVisitsByRequestId() { - $visits = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID, self::MOCK_VISITOR_REQUEST_ID); + list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID, self::MOCK_VISITOR_REQUEST_ID); foreach ($visits->getVisits() as $visit) { $this->assertEquals(self::MOCK_VISITOR_REQUEST_ID, $visit->getRequestId()); } @@ -199,8 +233,52 @@ public function testGetVisitsByRequestId() public function testGetVisitsWithLimit() { $limit = 100; - $visits = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID, null, $limit); + list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID, null, $limit); $count = count($visits->getVisits()); $this->assertLessThanOrEqual($limit, $count); } + + public function testGetEventRawResponse() + { + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID); + $mockedResult = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/get_event_200.json")); + $this->assertEquals($mockedResult, \GuzzleHttp\json_decode($response->getBody()->getContents())); + } + + public function testGetVisitsRawResponse() + { + list($visits, $response) = $this->fingerprint_api->getVisits(self::MOCK_VISITOR_ID); + $mockedResult = \GuzzleHttp\json_decode(file_get_contents(__DIR__ . "/mocks/get_visits_200_limit_500.json")); + $this->assertEquals($mockedResult, \GuzzleHttp\json_decode($response->getBody()->getContents())); + } + + public function testGetEventParsedModelWithUnknownField() + { + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_UNKNOWN); + $this->assertEquals(false, $event->getProducts()->getIncognito()->getData()->getResult()); + } + + public function testGetUnknownFieldFromEvent() + { + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_UNKNOWN); + $responseBody = \GuzzleHttp\json_decode($response->getBody()->getContents()); + $this->assertEquals("field", $responseBody->unknown); + $this->assertEquals("field", $responseBody->products->unknown); + $this->assertEquals("field", $responseBody->products->identification->unknown); + $this->assertEquals("field", $responseBody->products->identification->data->unknown); + } + + public function testGetBrokenFormatEvent() + { + try { + list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_BROKEN); + } catch (SerializationException $exception) { + $response = $exception->getResponse(); + } + $responseBody = \GuzzleHttp\json_decode($response->getBody()->getContents()); + + $this->assertNull($event); + $this->assertNotNull($responseBody); + $this->assertEquals("format", $responseBody->products->identification->data->linkedId->broken); + } } diff --git a/test/mocks/get_event_200_with_broken_format.json b/test/mocks/get_event_200_with_broken_format.json new file mode 100644 index 00000000..4ac8b6f5 --- /dev/null +++ b/test/mocks/get_event_200_with_broken_format.json @@ -0,0 +1,283 @@ +{ + "products": { + "identification": { + "data": { + "visitorId": "Ibk1527CUFmcnjLwIs4A9", + "requestId": "1708102555327.NLOjmg", + "incognito": true, + "linkedId": { + "broken": "format" + }, + "tag": {}, + "time": "2019-05-21T16:40:13Z", + "timestamp": 1582299576512, + "url": "https://www.example.com/login?hope{this{works[!", + "ip": "61.127.217.15", + "ipLocation": { + "accuracyRadius": 10, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "61202", + "timezone": "Europe/Dusseldorf", + "city": { + "name": "Dusseldorf" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "63", + "name": "North Rhine-Westphalia" + } + ] + }, + "browserDetails": { + "browserName": "Chrome", + "browserMajorVersion": "74", + "browserFullVersion": "74.0.3729", + "os": "Windows", + "osVersion": "7", + "device": "Other", + "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) ...." + }, + "confidence": { + "score": 0.97 + }, + "visitorFound": false, + "firstSeenAt": { + "global": "2022-03-16T11:26:45.362Z", + "subscription": "2022-03-16T11:31:01.101Z" + }, + "lastSeenAt": { + "global": null, + "subscription": null + } + } + }, + "botd": { + "data": { + "bot": { + "result": "notDetected" + }, + "url": "https://www.example.com/login?hope{this{works}[!", + "ip": "61.127.217.15", + "time": "2019-05-21T16:40:13Z", + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36", + "requestId": "1708102555327.NLOjmg" + } + }, + "rootApps": { + "data": { + "result": false + } + }, + "emulator": { + "data": { + "result": false + } + }, + "ipInfo": { + "data": { + "v4": { + "address": "94.142.239.124", + "geolocation": { + "accuracyRadius": 20, + "latitude": 50.05, + "longitude": 14.4, + "postalCode": "150 00", + "timezone": "Europe/Prague", + "city": { + "name": "Prague" + }, + "country": { + "code": "CZ", + "name": "Czechia" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "10", + "name": "Hlavni mesto Praha" + } + ] + }, + "asn": { + "asn": "7922", + "name": "COMCAST-7922", + "network": "73.136.0.0/13" + }, + "datacenter": { + "result": true, + "name": "DediPath" + } + }, + "v6": { + "address": "2001:db8:3333:4444:5555:6666:7777:8888", + "geolocation": { + "accuracyRadius": 5, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "10112", + "timezone": "Europe/Berlin", + "city": { + "name": "Berlin" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "BE", + "name": "Land Berlin" + } + ] + }, + "asn": { + "asn": "6805", + "name": "Telefonica Germany", + "network": "2a02:3100::/24" + }, + "datacenter": { + "result": false, + "name": "" + } + } + } + }, + "ipBlocklist": { + "data": { + "result": false, + "details": { + "emailSpam": false, + "attackSource": false + } + } + }, + "tor": { + "data": { + "result": false + } + }, + "vpn": { + "data": { + "result": false, + "originTimezone": "Europe/Berlin", + "originCountry": "unknown", + "methods": { + "timezoneMismatch": false, + "publicVPN": false, + "auxiliaryMobile": false + } + } + }, + "proxy": { + "data": { + "result": false + } + }, + "incognito": { + "data": { + "result": false + } + }, + "tampering": { + "data": { + "result": false, + "anomalyScore": 0.1955 + } + }, + "clonedApp": { + "data": { + "result": false + } + }, + "factoryReset": { + "data": { + "time": "1970-01-01T00:00:00Z", + "timestamp": 0 + } + }, + "jailbroken": { + "data": { + "result": false + } + }, + "frida": { + "data": { + "result": false + } + }, + "privacySettings": { + "data": { + "result": false + } + }, + "virtualMachine": { + "data": { + "result": false + } + }, + "rawDeviceAttributes": { + "data": { + "architecture": { + "value": 127 + }, + "audio": { + "value": 35.73832903057337 + }, + "canvas": { + "value": { + "Winding": true, + "Geometry": "4dce9d6017c3e0c052a77252f29f2b1c", + "Text": "dd2474a56ff78c1de3e7a07070ba3b7d" + } + }, + "colorDepth": { + "value": 30 + }, + "colorGamut": { + "value": "p3" + }, + "contrast": { + "value": 0 + }, + "cookiesEnabled": { + "value": true + }, + "cpuClass": {}, + "fonts": { + "value": [ + "Arial Unicode MS", + "Gill Sans", + "Helvetica Neue", + "Menlo" + ] + } + } + }, + "highActivity": { + "data": { + "result": false + } + }, + "locationSpoofing": { + "data": { + "result": false + } + } + } +} diff --git a/test/mocks/get_event_200_with_unknown_field.json b/test/mocks/get_event_200_with_unknown_field.json new file mode 100644 index 00000000..eba63e09 --- /dev/null +++ b/test/mocks/get_event_200_with_unknown_field.json @@ -0,0 +1,285 @@ +{ + "unknown": "field", + "products": { + "unknown": "field", + "identification": { + "unknown": "field", + "data": { + "unknown": "field", + "visitorId": "Ibk1527CUFmcnjLwIs4A9", + "requestId": "1708102555327.NLOjmg", + "incognito": true, + "linkedId": "somelinkedId", + "tag": {}, + "time": "2019-05-21T16:40:13Z", + "timestamp": 1582299576512, + "url": "https://www.example.com/login?hope{this{works[!", + "ip": "61.127.217.15", + "ipLocation": { + "accuracyRadius": 10, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "61202", + "timezone": "Europe/Dusseldorf", + "city": { + "name": "Dusseldorf" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "63", + "name": "North Rhine-Westphalia" + } + ] + }, + "browserDetails": { + "browserName": "Chrome", + "browserMajorVersion": "74", + "browserFullVersion": "74.0.3729", + "os": "Windows", + "osVersion": "7", + "device": "Other", + "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) ...." + }, + "confidence": { + "score": 0.97 + }, + "visitorFound": false, + "firstSeenAt": { + "global": "2022-03-16T11:26:45.362Z", + "subscription": "2022-03-16T11:31:01.101Z" + }, + "lastSeenAt": { + "global": null, + "subscription": null + } + } + }, + "botd": { + "data": { + "bot": { + "result": "notDetected" + }, + "url": "https://www.example.com/login?hope{this{works}[!", + "ip": "61.127.217.15", + "time": "2019-05-21T16:40:13Z", + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36", + "requestId": "1708102555327.NLOjmg" + } + }, + "rootApps": { + "data": { + "result": false + } + }, + "emulator": { + "data": { + "result": false + } + }, + "ipInfo": { + "data": { + "v4": { + "address": "94.142.239.124", + "geolocation": { + "accuracyRadius": 20, + "latitude": 50.05, + "longitude": 14.4, + "postalCode": "150 00", + "timezone": "Europe/Prague", + "city": { + "name": "Prague" + }, + "country": { + "code": "CZ", + "name": "Czechia" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "10", + "name": "Hlavni mesto Praha" + } + ] + }, + "asn": { + "asn": "7922", + "name": "COMCAST-7922", + "network": "73.136.0.0/13" + }, + "datacenter": { + "result": true, + "name": "DediPath" + } + }, + "v6": { + "address": "2001:db8:3333:4444:5555:6666:7777:8888", + "geolocation": { + "accuracyRadius": 5, + "latitude": 49.982, + "longitude": 36.2566, + "postalCode": "10112", + "timezone": "Europe/Berlin", + "city": { + "name": "Berlin" + }, + "country": { + "code": "DE", + "name": "Germany" + }, + "continent": { + "code": "EU", + "name": "Europe" + }, + "subdivisions": [ + { + "isoCode": "BE", + "name": "Land Berlin" + } + ] + }, + "asn": { + "asn": "6805", + "name": "Telefonica Germany", + "network": "2a02:3100::/24" + }, + "datacenter": { + "result": false, + "name": "" + } + } + } + }, + "ipBlocklist": { + "data": { + "result": false, + "details": { + "emailSpam": false, + "attackSource": false + } + } + }, + "tor": { + "data": { + "result": false + } + }, + "vpn": { + "data": { + "result": false, + "originTimezone": "Europe/Berlin", + "originCountry": "unknown", + "methods": { + "timezoneMismatch": false, + "publicVPN": false, + "auxiliaryMobile": false + } + } + }, + "proxy": { + "data": { + "result": false + } + }, + "incognito": { + "data": { + "result": false + } + }, + "tampering": { + "data": { + "result": false, + "anomalyScore": 0.1955 + } + }, + "clonedApp": { + "data": { + "result": false + } + }, + "factoryReset": { + "data": { + "time": "1970-01-01T00:00:00Z", + "timestamp": 0 + } + }, + "jailbroken": { + "data": { + "result": false + } + }, + "frida": { + "data": { + "result": false + } + }, + "privacySettings": { + "data": { + "result": false + } + }, + "virtualMachine": { + "data": { + "result": false + } + }, + "rawDeviceAttributes": { + "data": { + "architecture": { + "value": 127 + }, + "audio": { + "value": 35.73832903057337 + }, + "canvas": { + "value": { + "Winding": true, + "Geometry": "4dce9d6017c3e0c052a77252f29f2b1c", + "Text": "dd2474a56ff78c1de3e7a07070ba3b7d" + } + }, + "colorDepth": { + "value": 30 + }, + "colorGamut": { + "value": "p3" + }, + "contrast": { + "value": 0 + }, + "cookiesEnabled": { + "value": true + }, + "cpuClass": {}, + "fonts": { + "value": [ + "Arial Unicode MS", + "Gill Sans", + "Helvetica Neue", + "Menlo" + ] + } + } + }, + "highActivity": { + "data": { + "result": false + } + }, + "locationSpoofing": { + "data": { + "result": false + } + } + } +}