diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index ca661593a0..4920e4a31e 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -67,6 +67,13 @@ runs: path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-java-2/target key: ${{ runner.os }}-java-client-${{ hashFiles('clients/algoliasearch-client-java-2/**') }} + - name: Restore built PHP search client + if: ${{ inputs.job == 'cts' }} + uses: actions/cache@v2 + with: + path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-php/dist + key: ${{ runner.os }}-php-client-${{ hashFiles('clients/algoliasearch-client-php/**') }} + # setup yarn - name: Get yarn cache directory path shell: bash diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 5d0c437c85..1398e38277 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -40,6 +40,9 @@ runs: echo "::set-output name=JAVA_CLIENT_CHANGED::$(git diff --shortstat origin/${{ github.base_ref }}..HEAD -- clients/algoliasearch-client-java-2 | wc -l)" echo "::set-output name=JAVA_TEMPLATE_CHANGED::$(git diff --shortstat origin/${{ github.base_ref }}..HEAD -- templates/java | wc -l)" + echo "::set-output name=PHP_CLIENT_CHANGED::$(git diff --shortstat origin/${{ github.base_ref }}..HEAD -- clients/algoliasearch-client-php | wc -l)" + echo "::set-output name=PHP_TEMPLATE_CHANGED::$(git diff --shortstat origin/${{ github.base_ref }}..HEAD -- templates/php | wc -l)" + - name: Compute specs matrix id: spec-matrix shell: bash @@ -91,6 +94,23 @@ runs: echo "::set-output name=MATRIX::$matrix" echo "::set-output name=RUN_CLIENT::$run" + - name: Compute the PHP client build matrix + id: php-matrix + shell: bash + run: | + base_changed=${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.PHP_TEMPLATE_CHANGED > 0 }} + + matrix=$(./scripts/ci/create-client-matrix.sh php $base_changed ${{ github.base_ref }}) + + if [[ $matrix == '{"client":["no-run"]}' ]]; then + run="false" + else + run="true" + fi + + echo "::set-output name=MATRIX::$matrix" + echo "::set-output name=RUN_CLIENT::$run" + outputs: RUN_SPECS: description: Whether to run specs or not @@ -116,6 +136,14 @@ outputs: description: Generate the matrix for the Java client value: ${{ steps.java-matrix.outputs.MATRIX }} + RUN_PHP: + description: Whether to run php client or not + value: ${{ steps.php-matrix.outputs.RUN_CLIENT }} + + PHP_MATRIX: + description: Generate the matrix for the PHP client + value: ${{ steps.php-matrix.outputs.MATRIX }} + RUN_CTS: description: Determine if the `cts` job should run value: ${{ github.ref_name == 'main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.SPECS_CHANGED > 0 || steps.diff.outputs.TESTS_CHANGED > 0 || steps.diff.outputs.JS_CLIENT_CHANGED > 0 || steps.diff.outputs.JS_TEMPLATE_CHANGED > 0 || steps.diff.outputs.JAVA_CLIENT_CHANGED > 0 || steps.diff.outputs.JAVA_TEMPLATE_CHANGED > 0 }} diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e417cb0d5c..9b0d1b2e80 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -36,6 +36,9 @@ jobs: RUN_JAVA: ${{ steps.setup.outputs.RUN_JAVA }} JAVA_MATRIX: ${{ steps.setup.outputs.JAVA_MATRIX }} + RUN_PHP: ${{ steps.setup.outputs.RUN_PHP }} + PHP_MATRIX: ${{ steps.setup.outputs.PHP_MATRIX }} + RUN_CTS: ${{ steps.setup.outputs.RUN_CTS }} specs: @@ -116,11 +119,44 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: yarn build:clients java ${{ matrix.client.name }} + client_php: + runs-on: ubuntu-20.04 + needs: + - setup + - specs + if: ${{ always() && needs.setup.outputs.RUN_PHP == 'true' }} + strategy: + matrix: ${{ fromJSON(needs.setup.outputs.PHP_MATRIX) }} + steps: + - uses: actions/checkout@v2 + + - name: Restore cache + uses: ./.github/actions/cache + with: + job: php + + - name: Cache ${{ matrix.client.name }} client + id: cache + uses: actions/cache@v2 + with: + path: '/home/runner/work/api-clients-automation/api-clients-automation/${{ matrix.client.folder }}/dist' + key: ${{ runner.os }}-php-client-${{ matrix.client.name }}-${{ hashFiles(format('{0}/**', matrix.client.folder)) }} + + - name: Generate ${{ matrix.client.name }} client + if: steps.cache.outputs.cache-hit != 'true' + run: yarn generate php ${{ matrix.client.name }} + + - name: Build ${{ matrix.client.name }} client + if: steps.cache.outputs.cache-hit != 'true' + run: yarn build:clients php ${{ matrix.client.name }} + cts: runs-on: ubuntu-20.04 needs: - client_javascript - client_java + - client_php + if: ${{ always() && needs.setup.outputs.RUN_CTS == 'true' }} steps: - uses: actions/checkout@v2 diff --git a/clients/algoliasearch-client-php/.gitignore b/clients/algoliasearch-client-php/.gitignore index 3d513912a6..aa44c17b5e 100644 --- a/clients/algoliasearch-client-php/.gitignore +++ b/clients/algoliasearch-client-php/.gitignore @@ -10,3 +10,4 @@ composer.phar .phpunit.result.cache .openapi-generator/ +composer.lock diff --git a/clients/algoliasearch-client-php/.openapi-generator-ignore b/clients/algoliasearch-client-php/.openapi-generator-ignore index d8c3ddaef1..e0b35c13b6 100644 --- a/clients/algoliasearch-client-php/.openapi-generator-ignore +++ b/clients/algoliasearch-client-php/.openapi-generator-ignore @@ -8,7 +8,7 @@ docs/** test/** .travis.yml -.php_cs phpunit.xml.dist README.md git_push.sh +.php_cs diff --git a/clients/algoliasearch-client-php/.openapi-generator/FILES b/clients/algoliasearch-client-php/.openapi-generator/FILES deleted file mode 100644 index 83e22b9826..0000000000 --- a/clients/algoliasearch-client-php/.openapi-generator/FILES +++ /dev/null @@ -1,104 +0,0 @@ -.gitignore -composer.json -lib/Api/SearchApi.php -lib/ApiException.php -lib/Configuration.php -lib/HeaderSelector.php -lib/Model/Action.php -lib/Model/AddApiKeyResponse.php -lib/Model/Anchoring.php -lib/Model/ApiKey.php -lib/Model/AssignUserIdObject.php -lib/Model/AutomaticFacetFilter.php -lib/Model/BaseBrowseResponse.php -lib/Model/BaseIndexSettings.php -lib/Model/BaseSearchParams.php -lib/Model/BaseSearchResponse.php -lib/Model/BaseSearchResponseFacetsStats.php -lib/Model/BatchAssignUserIdsObject.php -lib/Model/BatchDictionaryEntries.php -lib/Model/BatchDictionaryEntriesRequest.php -lib/Model/BatchObject.php -lib/Model/BatchResponse.php -lib/Model/BatchWriteObject.php -lib/Model/BrowseRequest.php -lib/Model/BrowseResponse.php -lib/Model/BuildInOperation.php -lib/Model/Condition.php -lib/Model/Consequence.php -lib/Model/ConsequenceHide.php -lib/Model/ConsequenceParams.php -lib/Model/CreatedAtObject.php -lib/Model/CreatedAtResponse.php -lib/Model/DeleteApiKeyResponse.php -lib/Model/DeleteSourceResponse.php -lib/Model/DeletedAtResponse.php -lib/Model/DictionaryEntry.php -lib/Model/DictionaryLanguage.php -lib/Model/DictionarySettingsRequest.php -lib/Model/ErrorBase.php -lib/Model/GetDictionarySettingsResponse.php -lib/Model/GetLogsResponse.php -lib/Model/GetLogsResponseInnerQueries.php -lib/Model/GetLogsResponseLogs.php -lib/Model/GetObjectsObject.php -lib/Model/GetObjectsResponse.php -lib/Model/GetTaskResponse.php -lib/Model/GetTopUserIdsResponse.php -lib/Model/HighlightResult.php -lib/Model/Index.php -lib/Model/IndexSettings.php -lib/Model/IndexSettingsAsSearchParams.php -lib/Model/KeyObject.php -lib/Model/Languages.php -lib/Model/ListApiKeysResponse.php -lib/Model/ListClustersResponse.php -lib/Model/ListIndicesResponse.php -lib/Model/ListUserIdsResponse.php -lib/Model/ModelInterface.php -lib/Model/MultipleBatchResponse.php -lib/Model/MultipleGetObjectsObject.php -lib/Model/MultipleQueries.php -lib/Model/MultipleQueriesObject.php -lib/Model/MultipleQueriesResponse.php -lib/Model/Operation.php -lib/Model/OperationIndexObject.php -lib/Model/Params.php -lib/Model/Promote.php -lib/Model/RankingInfo.php -lib/Model/RankingInfoMatchedGeoLocation.php -lib/Model/Record.php -lib/Model/RemoveUserIdResponse.php -lib/Model/ReplaceSourceResponse.php -lib/Model/RequiredSearchParams.php -lib/Model/Rule.php -lib/Model/SaveObjectResponse.php -lib/Model/SaveSynonymResponse.php -lib/Model/SearchDictionaryEntries.php -lib/Model/SearchForFacetValuesRequest.php -lib/Model/SearchForFacetValuesResponse.php -lib/Model/SearchForFacetValuesResponseFacetHits.php -lib/Model/SearchHits.php -lib/Model/SearchParams.php -lib/Model/SearchParamsObject.php -lib/Model/SearchParamsString.php -lib/Model/SearchResponse.php -lib/Model/SearchRulesParams.php -lib/Model/SearchRulesResponse.php -lib/Model/SearchSynonymsResponse.php -lib/Model/SearchUserIdsObject.php -lib/Model/SearchUserIdsResponse.php -lib/Model/SearchUserIdsResponseHighlightResult.php -lib/Model/SearchUserIdsResponseHits.php -lib/Model/SnippetResult.php -lib/Model/Source.php -lib/Model/StandardEntries.php -lib/Model/SynonymHit.php -lib/Model/SynonymHitHighlightResult.php -lib/Model/TimeRange.php -lib/Model/UpdateApiKeyResponse.php -lib/Model/UpdatedAtResponse.php -lib/Model/UpdatedAtWithObjectIdResponse.php -lib/Model/UpdatedRuleResponse.php -lib/Model/UserId.php -lib/ObjectSerializer.php diff --git a/clients/algoliasearch-client-php/.openapi-generator/VERSION b/clients/algoliasearch-client-php/.openapi-generator/VERSION deleted file mode 100644 index e230c8396d..0000000000 --- a/clients/algoliasearch-client-php/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.3.0 \ No newline at end of file diff --git a/clients/algoliasearch-client-php/.php-cs-fixer.php b/clients/algoliasearch-client-php/.php-cs-fixer.php new file mode 100644 index 0000000000..96dde31c05 --- /dev/null +++ b/clients/algoliasearch-client-php/.php-cs-fixer.php @@ -0,0 +1,63 @@ +setUsingCache(true) + ->setRules([ + 'array_syntax' => [ 'syntax' => 'short' ], + 'blank_line_after_namespace' => false, + 'blank_line_after_opening_tag' => true, + 'blank_line_before_statement' => true, + 'braces' => false, + 'cast_spaces' => true, + 'combine_consecutive_unsets' => true, + 'echo_tag_syntax' => true, + 'general_phpdoc_tag_rename' => true, + 'mb_str_functions' => true, + 'no_blank_lines_after_class_opening' => true, + 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, + 'no_extra_blank_lines' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_short_bool_cast' => true, + 'no_trailing_whitespace' => true, + 'no_trailing_whitespace_in_comment' => false, + 'no_unneeded_control_parentheses' => true, + 'no_unreachable_default_argument_value' => true, + 'no_unused_imports' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'normalize_index_brace' => true, + 'not_operator_with_space' => false, + 'object_operator_without_whitespace' => true, + 'ordered_imports' => true, + 'phpdoc_annotation_without_dot' => true, + 'phpdoc_inline_tag_normalizer' => true, + 'phpdoc_order' => true, + 'phpdoc_scalar' => true, + 'phpdoc_separation' => true, + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_tag_type' => true, + 'protected_to_private' => true, + '@PSR2' => true, + 'short_scalar_cast' => true, + 'single_blank_line_at_eof' => false, + 'single_blank_line_before_namespace' => true, + 'single_quote' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'strict_comparison' => true, + 'strict_param' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline' => true, + 'trim_array_spaces' => true, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('test') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/clients/algoliasearch-client-php/lib/Api/SearchApi.php b/clients/algoliasearch-client-php/lib/Api/SearchApi.php index 9491959484..690b95da0a 100644 --- a/clients/algoliasearch-client-php/lib/Api/SearchApi.php +++ b/clients/algoliasearch-client-php/lib/Api/SearchApi.php @@ -2,17 +2,16 @@ namespace Algolia\AlgoliaSearch\Api; +use Algolia\AlgoliaSearch\ApiException; +use Algolia\AlgoliaSearch\Configuration; +use Algolia\AlgoliaSearch\HeaderSelector; +use Algolia\AlgoliaSearch\ObjectSerializer; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Exception\ConnectException; -use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; -use Algolia\AlgoliaSearch\ApiException; -use Algolia\AlgoliaSearch\Configuration; -use Algolia\AlgoliaSearch\HeaderSelector; -use Algolia\AlgoliaSearch\ObjectSerializer; /** * SearchApi Class Doc Comment @@ -45,7 +44,7 @@ class SearchApi /** * @param Configuration $config */ - public function __construct(Configuration $config = null) + public function __construct(Configuration $config = null) { $this->config = $config ?: new Configuration(); @@ -91,6 +90,7 @@ public function getConfig() * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\AddApiKeyResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function addApiKey($apiKey) @@ -110,9 +110,9 @@ public function addApiKey($apiKey) ['application/json'], ['application/json'] ); - if (isset($apiKey)) { + if (isset($apiKey)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($apiKey)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -142,7 +142,7 @@ public function addApiKey($apiKey) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\AddApiKeyResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -160,6 +160,7 @@ public function addApiKey($apiKey) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtWithObjectIdResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function addOrUpdateObject($indexName, $objectID, $body) @@ -207,9 +208,9 @@ public function addOrUpdateObject($indexName, $objectID, $body) ['application/json'], ['application/json'] ); - if (isset($body)) { + if (isset($body)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -239,7 +240,7 @@ public function addOrUpdateObject($indexName, $objectID, $body) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtWithObjectIdResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -253,6 +254,7 @@ public function addOrUpdateObject($indexName, $objectID, $body) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\CreatedAtResponse */ public function appendSource($source) @@ -272,9 +274,9 @@ public function appendSource($source) ['application/json'], ['application/json'] ); - if (isset($source)) { + if (isset($source)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($source)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -304,7 +306,7 @@ public function appendSource($source) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\CreatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -321,6 +323,7 @@ public function appendSource($source) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\CreatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function assignUserId($xAlgoliaUserID, $assignUserIdObject) @@ -331,8 +334,8 @@ public function assignUserId($xAlgoliaUserID, $assignUserIdObject) 'Missing the required parameter $xAlgoliaUserID when calling assignUserId' ); } - if (!preg_match("/^[a-zA-Z0-9 \\-*.]+$/", $xAlgoliaUserID)) { - throw new \InvalidArgumentException("invalid value for \"xAlgoliaUserID\" when calling SearchApi.assignUserId, must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/."); + if (!preg_match('/^[a-zA-Z0-9 \\-*.]+$/', $xAlgoliaUserID)) { + throw new \InvalidArgumentException('invalid value for "xAlgoliaUserID" when calling SearchApi.assignUserId, must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/.'); } // verify the required parameter 'assignUserIdObject' is set @@ -357,9 +360,9 @@ public function assignUserId($xAlgoliaUserID, $assignUserIdObject) ['application/json'], ['application/json'] ); - if (isset($assignUserIdObject)) { + if (isset($assignUserIdObject)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($assignUserIdObject)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -389,7 +392,7 @@ public function assignUserId($xAlgoliaUserID, $assignUserIdObject) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\CreatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -404,6 +407,7 @@ public function assignUserId($xAlgoliaUserID, $assignUserIdObject) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\BatchResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function batch($indexName, $batchWriteObject) @@ -437,9 +441,9 @@ public function batch($indexName, $batchWriteObject) ['application/json'], ['application/json'] ); - if (isset($batchWriteObject)) { + if (isset($batchWriteObject)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($batchWriteObject)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -469,7 +473,7 @@ public function batch($indexName, $batchWriteObject) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\BatchResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -486,6 +490,7 @@ public function batch($indexName, $batchWriteObject) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\CreatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function batchAssignUserIds($xAlgoliaUserID, $batchAssignUserIdsObject) @@ -496,8 +501,8 @@ public function batchAssignUserIds($xAlgoliaUserID, $batchAssignUserIdsObject) 'Missing the required parameter $xAlgoliaUserID when calling batchAssignUserIds' ); } - if (!preg_match("/^[a-zA-Z0-9 \\-*.]+$/", $xAlgoliaUserID)) { - throw new \InvalidArgumentException("invalid value for \"xAlgoliaUserID\" when calling SearchApi.batchAssignUserIds, must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/."); + if (!preg_match('/^[a-zA-Z0-9 \\-*.]+$/', $xAlgoliaUserID)) { + throw new \InvalidArgumentException('invalid value for "xAlgoliaUserID" when calling SearchApi.batchAssignUserIds, must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/.'); } // verify the required parameter 'batchAssignUserIdsObject' is set @@ -522,9 +527,9 @@ public function batchAssignUserIds($xAlgoliaUserID, $batchAssignUserIdsObject) ['application/json'], ['application/json'] ); - if (isset($batchAssignUserIdsObject)) { + if (isset($batchAssignUserIdsObject)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($batchAssignUserIdsObject)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -554,7 +559,7 @@ public function batchAssignUserIds($xAlgoliaUserID, $batchAssignUserIdsObject) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\CreatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -571,6 +576,7 @@ public function batchAssignUserIds($xAlgoliaUserID, $batchAssignUserIdsObject) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function batchDictionaryEntries($dictionaryName, $batchDictionaryEntries) @@ -604,9 +610,9 @@ public function batchDictionaryEntries($dictionaryName, $batchDictionaryEntries) ['application/json'], ['application/json'] ); - if (isset($batchDictionaryEntries)) { + if (isset($batchDictionaryEntries)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($batchDictionaryEntries)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -636,7 +642,7 @@ public function batchDictionaryEntries($dictionaryName, $batchDictionaryEntries) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -655,6 +661,7 @@ public function batchDictionaryEntries($dictionaryName, $batchDictionaryEntries) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function batchRules($indexName, $rule, $forwardToReplicas = null, $clearExistingRules = null) @@ -702,9 +709,9 @@ public function batchRules($indexName, $rule, $forwardToReplicas = null, $clearE ['application/json'], ['application/json'] ); - if (isset($rule)) { + if (isset($rule)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($rule)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -734,7 +741,7 @@ public function batchRules($indexName, $rule, $forwardToReplicas = null, $clearE $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -751,6 +758,7 @@ public function batchRules($indexName, $rule, $forwardToReplicas = null, $clearE * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\BrowseResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function browse($indexName, $browseRequest = null) @@ -778,9 +786,9 @@ public function browse($indexName, $browseRequest = null) ['application/json'], ['application/json'] ); - if (isset($browseRequest)) { + if (isset($browseRequest)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($browseRequest)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -810,7 +818,7 @@ public function browse($indexName, $browseRequest = null) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\BrowseResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -827,6 +835,7 @@ public function browse($indexName, $browseRequest = null) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function clearAllSynonyms($indexName, $forwardToReplicas = null) @@ -890,7 +899,7 @@ public function clearAllSynonyms($indexName, $forwardToReplicas = null) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -906,6 +915,7 @@ public function clearAllSynonyms($indexName, $forwardToReplicas = null) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function clearObjects($indexName) @@ -962,7 +972,7 @@ public function clearObjects($indexName) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -979,6 +989,7 @@ public function clearObjects($indexName) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function clearRules($indexName, $forwardToReplicas = null) @@ -1042,7 +1053,7 @@ public function clearRules($indexName, $forwardToReplicas = null) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -1058,6 +1069,7 @@ public function clearRules($indexName, $forwardToReplicas = null) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\DeleteApiKeyResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function deleteApiKey($key) @@ -1114,7 +1126,7 @@ public function deleteApiKey($key) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\DeleteApiKeyResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -1131,6 +1143,7 @@ public function deleteApiKey($key) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\DeletedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function deleteBy($indexName, $searchParams) @@ -1164,9 +1177,9 @@ public function deleteBy($indexName, $searchParams) ['application/json'], ['application/json'] ); - if (isset($searchParams)) { + if (isset($searchParams)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($searchParams)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -1196,7 +1209,7 @@ public function deleteBy($indexName, $searchParams) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\DeletedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -1212,6 +1225,7 @@ public function deleteBy($indexName, $searchParams) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\DeletedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function deleteIndex($indexName) @@ -1268,7 +1282,7 @@ public function deleteIndex($indexName) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\DeletedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -1285,6 +1299,7 @@ public function deleteIndex($indexName) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\DeletedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function deleteObject($indexName, $objectID) @@ -1355,7 +1370,7 @@ public function deleteObject($indexName, $objectID) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\DeletedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -1373,6 +1388,7 @@ public function deleteObject($indexName, $objectID) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function deleteRule($indexName, $objectID, $forwardToReplicas = null) @@ -1450,7 +1466,7 @@ public function deleteRule($indexName, $objectID, $forwardToReplicas = null) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -1464,6 +1480,7 @@ public function deleteRule($indexName, $objectID, $forwardToReplicas = null) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\DeleteSourceResponse */ public function deleteSource($source) @@ -1520,7 +1537,7 @@ public function deleteSource($source) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\DeleteSourceResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -1538,6 +1555,7 @@ public function deleteSource($source) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\DeletedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function deleteSynonym($indexName, $objectID, $forwardToReplicas = null) @@ -1615,7 +1633,7 @@ public function deleteSynonym($indexName, $objectID, $forwardToReplicas = null) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\DeletedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -1631,6 +1649,7 @@ public function deleteSynonym($indexName, $objectID, $forwardToReplicas = null) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\KeyObject|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function getApiKey($key) @@ -1687,7 +1706,7 @@ public function getApiKey($key) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\KeyObject'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -1702,11 +1721,11 @@ public function getApiKey($key) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return array|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function getDictionaryLanguages() { - $resourcePath = '/1/dictionaries/*/languages'; $queryParams = []; $headerParams = []; @@ -1744,7 +1763,7 @@ public function getDictionaryLanguages() $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = 'array<string,\Algolia\AlgoliaSearch\Model\Languages>'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -1759,11 +1778,11 @@ public function getDictionaryLanguages() * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\GetDictionarySettingsResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function getDictionarySettings() { - $resourcePath = '/1/dictionaries/*/settings'; $queryParams = []; $headerParams = []; @@ -1801,7 +1820,7 @@ public function getDictionarySettings() $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\GetDictionarySettingsResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -1818,6 +1837,7 @@ public function getDictionarySettings() * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\GetLogsResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function getLogs($offset = 0, $length = 10, $indexName = null, $type = 'all') @@ -1826,7 +1846,6 @@ public function getLogs($offset = 0, $length = 10, $indexName = null, $type = 'a throw new \InvalidArgumentException('invalid value for "$length" when calling SearchApi.getLogs, must be smaller than or equal to 1000.'); } - $resourcePath = '/1/logs'; $queryParams = []; $headerParams = []; @@ -1892,7 +1911,7 @@ public function getLogs($offset = 0, $length = 10, $indexName = null, $type = 'a $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\GetLogsResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -1910,6 +1929,7 @@ public function getLogs($offset = 0, $length = 10, $indexName = null, $type = 'a * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return array|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function getObject($indexName, $objectID, $attributesToRetrieve = null) @@ -1987,7 +2007,7 @@ public function getObject($indexName, $objectID, $attributesToRetrieve = null) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = 'array<string,string>'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2003,6 +2023,7 @@ public function getObject($indexName, $objectID, $attributesToRetrieve = null) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\GetObjectsResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function getObjects($getObjectsObject) @@ -2022,9 +2043,9 @@ public function getObjects($getObjectsObject) ['application/json'], ['application/json'] ); - if (isset($getObjectsObject)) { + if (isset($getObjectsObject)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($getObjectsObject)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -2054,7 +2075,7 @@ public function getObjects($getObjectsObject) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\GetObjectsResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2071,6 +2092,7 @@ public function getObjects($getObjectsObject) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\Rule|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function getRule($indexName, $objectID) @@ -2141,7 +2163,7 @@ public function getRule($indexName, $objectID) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\Rule'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2155,6 +2177,7 @@ public function getRule($indexName, $objectID) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\IndexSettings|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function getSettings($indexName) @@ -2211,7 +2234,7 @@ public function getSettings($indexName) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\IndexSettings'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2224,11 +2247,11 @@ public function getSettings($indexName) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\Source[] */ public function getSources() { - $resourcePath = '/1/security/sources'; $queryParams = []; $headerParams = []; @@ -2266,7 +2289,7 @@ public function getSources() $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\Source[]'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2283,6 +2306,7 @@ public function getSources() * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\SynonymHit|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function getSynonym($indexName, $objectID) @@ -2353,7 +2377,7 @@ public function getSynonym($indexName, $objectID) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\SynonymHit'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2368,6 +2392,7 @@ public function getSynonym($indexName, $objectID) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\GetTaskResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function getTask($indexName, $taskID) @@ -2438,7 +2463,7 @@ public function getTask($indexName, $taskID) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\GetTaskResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2453,11 +2478,11 @@ public function getTask($indexName, $taskID) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\GetTopUserIdsResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function getTopUserIds() { - $resourcePath = '/1/clusters/mapping/top'; $queryParams = []; $headerParams = []; @@ -2495,7 +2520,7 @@ public function getTopUserIds() $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\GetTopUserIdsResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2511,6 +2536,7 @@ public function getTopUserIds() * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UserId|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function getUserId($userID) @@ -2521,11 +2547,10 @@ public function getUserId($userID) 'Missing the required parameter $userID when calling getUserId' ); } - if (!preg_match("/^[a-zA-Z0-9 \\-*.]+$/", $userID)) { - throw new \InvalidArgumentException("invalid value for \"userID\" when calling SearchApi.getUserId, must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/."); + if (!preg_match('/^[a-zA-Z0-9 \\-*.]+$/', $userID)) { + throw new \InvalidArgumentException('invalid value for "userID" when calling SearchApi.getUserId, must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/.'); } - $resourcePath = '/1/clusters/mapping/{userID}'; $queryParams = []; $headerParams = []; @@ -2571,7 +2596,7 @@ public function getUserId($userID) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UserId'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2587,11 +2612,11 @@ public function getUserId($userID) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\CreatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function hasPendingMappings($getClusters = null) { - $resourcePath = '/1/clusters/mapping/pending'; $queryParams = []; $headerParams = []; @@ -2636,7 +2661,7 @@ public function hasPendingMappings($getClusters = null) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\CreatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2651,11 +2676,11 @@ public function hasPendingMappings($getClusters = null) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\ListApiKeysResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function listApiKeys() { - $resourcePath = '/1/keys'; $queryParams = []; $headerParams = []; @@ -2693,7 +2718,7 @@ public function listApiKeys() $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\ListApiKeysResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2708,11 +2733,11 @@ public function listApiKeys() * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\ListClustersResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function listClusters() { - $resourcePath = '/1/clusters'; $queryParams = []; $headerParams = []; @@ -2750,7 +2775,7 @@ public function listClusters() $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\ListClustersResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2766,11 +2791,11 @@ public function listClusters() * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\ListIndicesResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function listIndices($page = null) { - $resourcePath = '/1/indexes'; $queryParams = []; $headerParams = []; @@ -2815,7 +2840,7 @@ public function listIndices($page = null) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\ListIndicesResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2832,11 +2857,11 @@ public function listIndices($page = null) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\ListUserIdsResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function listUserIds($page = null, $hitsPerPage = 100) { - $resourcePath = '/1/clusters/mapping'; $queryParams = []; $headerParams = []; @@ -2888,7 +2913,7 @@ public function listUserIds($page = null, $hitsPerPage = 100) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\ListUserIdsResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2902,6 +2927,7 @@ public function listUserIds($page = null, $hitsPerPage = 100) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\MultipleBatchResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function multipleBatch($batchObject) @@ -2921,9 +2947,9 @@ public function multipleBatch($batchObject) ['application/json'], ['application/json'] ); - if (isset($batchObject)) { + if (isset($batchObject)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($batchObject)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -2953,7 +2979,7 @@ public function multipleBatch($batchObject) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\MultipleBatchResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -2967,6 +2993,7 @@ public function multipleBatch($batchObject) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\MultipleQueriesResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function multipleQueries($multipleQueriesObject) @@ -2986,9 +3013,9 @@ public function multipleQueries($multipleQueriesObject) ['application/json'], ['application/json'] ); - if (isset($multipleQueriesObject)) { + if (isset($multipleQueriesObject)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($multipleQueriesObject)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -3018,7 +3045,7 @@ public function multipleQueries($multipleQueriesObject) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\MultipleQueriesResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -3035,6 +3062,7 @@ public function multipleQueries($multipleQueriesObject) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function operationIndex($indexName, $operationIndexObject) @@ -3068,9 +3096,9 @@ public function operationIndex($indexName, $operationIndexObject) ['application/json'], ['application/json'] ); - if (isset($operationIndexObject)) { + if (isset($operationIndexObject)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($operationIndexObject)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -3100,7 +3128,7 @@ public function operationIndex($indexName, $operationIndexObject) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -3119,6 +3147,7 @@ public function operationIndex($indexName, $operationIndexObject) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtWithObjectIdResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function partialUpdateObject($indexName, $objectID, $oneOfStringBuildInOperation, $createIfNotExists = true) @@ -3173,9 +3202,9 @@ public function partialUpdateObject($indexName, $objectID, $oneOfStringBuildInOp ['application/json'], ['application/json'] ); - if (isset($oneOfStringBuildInOperation)) { + if (isset($oneOfStringBuildInOperation)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($oneOfStringBuildInOperation)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -3205,7 +3234,7 @@ public function partialUpdateObject($indexName, $objectID, $oneOfStringBuildInOp $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtWithObjectIdResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -3221,6 +3250,7 @@ public function partialUpdateObject($indexName, $objectID, $oneOfStringBuildInOp * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\RemoveUserIdResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function removeUserId($userID) @@ -3231,11 +3261,10 @@ public function removeUserId($userID) 'Missing the required parameter $userID when calling removeUserId' ); } - if (!preg_match("/^[a-zA-Z0-9 \\-*.]+$/", $userID)) { - throw new \InvalidArgumentException("invalid value for \"userID\" when calling SearchApi.removeUserId, must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/."); + if (!preg_match('/^[a-zA-Z0-9 \\-*.]+$/', $userID)) { + throw new \InvalidArgumentException('invalid value for "userID" when calling SearchApi.removeUserId, must conform to the pattern /^[a-zA-Z0-9 \\-*.]+$/.'); } - $resourcePath = '/1/clusters/mapping/{userID}'; $queryParams = []; $headerParams = []; @@ -3281,7 +3310,7 @@ public function removeUserId($userID) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\RemoveUserIdResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -3295,6 +3324,7 @@ public function removeUserId($userID) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\ReplaceSourceResponse */ public function replaceSources($source) @@ -3314,9 +3344,9 @@ public function replaceSources($source) ['application/json'], ['application/json'] ); - if (isset($source)) { + if (isset($source)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($source)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -3346,7 +3376,7 @@ public function replaceSources($source) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\ReplaceSourceResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -3362,6 +3392,7 @@ public function replaceSources($source) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\AddApiKeyResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function restoreApiKey($key) @@ -3418,7 +3449,7 @@ public function restoreApiKey($key) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\AddApiKeyResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -3433,6 +3464,7 @@ public function restoreApiKey($key) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\SaveObjectResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function saveObject($indexName, $body) @@ -3466,9 +3498,9 @@ public function saveObject($indexName, $body) ['application/json'], ['application/json'] ); - if (isset($body)) { + if (isset($body)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -3498,7 +3530,7 @@ public function saveObject($indexName, $body) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\SaveObjectResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -3517,6 +3549,7 @@ public function saveObject($indexName, $body) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedRuleResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function saveRule($indexName, $objectID, $rule, $forwardToReplicas = null) @@ -3571,9 +3604,9 @@ public function saveRule($indexName, $objectID, $rule, $forwardToReplicas = null ['application/json'], ['application/json'] ); - if (isset($rule)) { + if (isset($rule)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($rule)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -3603,7 +3636,7 @@ public function saveRule($indexName, $objectID, $rule, $forwardToReplicas = null $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedRuleResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -3622,6 +3655,7 @@ public function saveRule($indexName, $objectID, $rule, $forwardToReplicas = null * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\SaveSynonymResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function saveSynonym($indexName, $objectID, $synonymHit, $forwardToReplicas = null) @@ -3676,9 +3710,9 @@ public function saveSynonym($indexName, $objectID, $synonymHit, $forwardToReplic ['application/json'], ['application/json'] ); - if (isset($synonymHit)) { + if (isset($synonymHit)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($synonymHit)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -3708,7 +3742,7 @@ public function saveSynonym($indexName, $objectID, $synonymHit, $forwardToReplic $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\SaveSynonymResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -3727,6 +3761,7 @@ public function saveSynonym($indexName, $objectID, $synonymHit, $forwardToReplic * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function saveSynonyms($indexName, $synonymHit, $forwardToReplicas = null, $replaceExistingSynonyms = null) @@ -3774,9 +3809,9 @@ public function saveSynonyms($indexName, $synonymHit, $forwardToReplicas = null, ['application/json'], ['application/json'] ); - if (isset($synonymHit)) { + if (isset($synonymHit)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($synonymHit)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -3806,7 +3841,7 @@ public function saveSynonyms($indexName, $synonymHit, $forwardToReplicas = null, $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -3821,6 +3856,7 @@ public function saveSynonyms($indexName, $synonymHit, $forwardToReplicas = null, * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\SearchResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function search($indexName, $searchParams) @@ -3854,9 +3890,9 @@ public function search($indexName, $searchParams) ['application/json'], ['application/json'] ); - if (isset($searchParams)) { + if (isset($searchParams)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($searchParams)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -3886,7 +3922,7 @@ public function search($indexName, $searchParams) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\SearchResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -3903,6 +3939,7 @@ public function search($indexName, $searchParams) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function searchDictionaryEntries($dictionaryName, $searchDictionaryEntries) @@ -3936,9 +3973,9 @@ public function searchDictionaryEntries($dictionaryName, $searchDictionaryEntrie ['application/json'], ['application/json'] ); - if (isset($searchDictionaryEntries)) { + if (isset($searchDictionaryEntries)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($searchDictionaryEntries)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -3968,7 +4005,7 @@ public function searchDictionaryEntries($dictionaryName, $searchDictionaryEntrie $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -3986,6 +4023,7 @@ public function searchDictionaryEntries($dictionaryName, $searchDictionaryEntrie * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\SearchForFacetValuesResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function searchForFacetValues($indexName, $facetName, $searchForFacetValuesRequest = null) @@ -4027,9 +4065,9 @@ public function searchForFacetValues($indexName, $facetName, $searchForFacetValu ['application/json'], ['application/json'] ); - if (isset($searchForFacetValuesRequest)) { + if (isset($searchForFacetValuesRequest)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($searchForFacetValuesRequest)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -4059,7 +4097,7 @@ public function searchForFacetValues($indexName, $facetName, $searchForFacetValu $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\SearchForFacetValuesResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -4076,6 +4114,7 @@ public function searchForFacetValues($indexName, $facetName, $searchForFacetValu * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\SearchRulesResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function searchRules($indexName, $searchRulesParams) @@ -4109,9 +4148,9 @@ public function searchRules($indexName, $searchRulesParams) ['application/json'], ['application/json'] ); - if (isset($searchRulesParams)) { + if (isset($searchRulesParams)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($searchRulesParams)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -4141,7 +4180,7 @@ public function searchRules($indexName, $searchRulesParams) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\SearchRulesResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -4161,6 +4200,7 @@ public function searchRules($indexName, $searchRulesParams) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\SearchSynonymsResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function searchSynonyms($indexName, $query = '', $type = null, $page = 0, $hitsPerPage = 100) @@ -4245,7 +4285,7 @@ public function searchSynonyms($indexName, $query = '', $type = null, $page = 0, $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\SearchSynonymsResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -4261,6 +4301,7 @@ public function searchSynonyms($indexName, $query = '', $type = null, $page = 0, * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\SearchUserIdsResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function searchUserIds($searchUserIdsObject) @@ -4280,9 +4321,9 @@ public function searchUserIds($searchUserIdsObject) ['application/json'], ['application/json'] ); - if (isset($searchUserIdsObject)) { + if (isset($searchUserIdsObject)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($searchUserIdsObject)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -4312,7 +4353,7 @@ public function searchUserIds($searchUserIdsObject) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\SearchUserIdsResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -4328,6 +4369,7 @@ public function searchUserIds($searchUserIdsObject) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function setDictionarySettings($dictionarySettingsRequest) @@ -4347,9 +4389,9 @@ public function setDictionarySettings($dictionarySettingsRequest) ['application/json'], ['application/json'] ); - if (isset($dictionarySettingsRequest)) { + if (isset($dictionarySettingsRequest)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($dictionarySettingsRequest)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -4379,7 +4421,7 @@ public function setDictionarySettings($dictionarySettingsRequest) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -4395,6 +4437,7 @@ public function setDictionarySettings($dictionarySettingsRequest) * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdatedAtResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function setSettings($indexName, $indexSettings, $forwardToReplicas = null) @@ -4435,9 +4478,9 @@ public function setSettings($indexName, $indexSettings, $forwardToReplicas = nul ['application/json'], ['application/json'] ); - if (isset($indexSettings)) { + if (isset($indexSettings)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($indexSettings)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -4467,7 +4510,7 @@ public function setSettings($indexName, $indexSettings, $forwardToReplicas = nul $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdatedAtResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -4484,6 +4527,7 @@ public function setSettings($indexName, $indexSettings, $forwardToReplicas = nul * * @throws \Algolia\AlgoliaSearch\ApiException on non-2xx response * @throws \InvalidArgumentException + * * @return \Algolia\AlgoliaSearch\Model\UpdateApiKeyResponse|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase|\Algolia\AlgoliaSearch\Model\ErrorBase */ public function updateApiKey($key, $apiKey) @@ -4517,9 +4561,9 @@ public function updateApiKey($key, $apiKey) ['application/json'], ['application/json'] ); - if (isset($apiKey)) { + if (isset($apiKey)) { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($apiKey)); - } + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('X-Algolia-API-Key'); if ($apiKey !== null) { @@ -4549,7 +4593,7 @@ public function updateApiKey($key, $apiKey) $headers, $httpBody ); - + $expectedResponse = null; $expectedResponse = '\Algolia\AlgoliaSearch\Model\UpdateApiKeyResponse'; list($response) = $this->sendRequest($request, $expectedResponse); @@ -4560,6 +4604,7 @@ public function updateApiKey($key, $apiKey) * Create http client option * * @throws \RuntimeException on file opening failure + * * @return array of http client options */ protected function createHttpClientOption() @@ -4579,12 +4624,14 @@ protected function createHttpClientOption() * Send the request and handle the response * * @throws \RuntimeException on file opening failure - * @return array + * + * @return array */ protected function sendRequest($request, $expectedResponse) { try { $options = $this->createHttpClientOption(); + try { $response = $this->client->send($request, $options); } catch (RequestException $e) { @@ -4618,7 +4665,7 @@ protected function sendRequest($request, $expectedResponse) ); } - switch($statusCode) { + switch ($statusCode) { case 200: if ($expectedResponse === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -4629,7 +4676,7 @@ protected function sendRequest($request, $expectedResponse) return [ ObjectSerializer::deserialize($content, $expectedResponse, []), $response->getStatusCode(), - $response->getHeaders() + $response->getHeaders(), ]; case 400: if ('\Algolia\AlgoliaSearch\Model\ErrorBase' === '\SplFileObject') { @@ -4641,7 +4688,7 @@ protected function sendRequest($request, $expectedResponse) return [ ObjectSerializer::deserialize($content, '\Algolia\AlgoliaSearch\Model\ErrorBase', []), $response->getStatusCode(), - $response->getHeaders() + $response->getHeaders(), ]; case 402: if ('\Algolia\AlgoliaSearch\Model\ErrorBase' === '\SplFileObject') { @@ -4653,7 +4700,7 @@ protected function sendRequest($request, $expectedResponse) return [ ObjectSerializer::deserialize($content, '\Algolia\AlgoliaSearch\Model\ErrorBase', []), $response->getStatusCode(), - $response->getHeaders() + $response->getHeaders(), ]; case 403: if ('\Algolia\AlgoliaSearch\Model\ErrorBase' === '\SplFileObject') { @@ -4665,7 +4712,7 @@ protected function sendRequest($request, $expectedResponse) return [ ObjectSerializer::deserialize($content, '\Algolia\AlgoliaSearch\Model\ErrorBase', []), $response->getStatusCode(), - $response->getHeaders() + $response->getHeaders(), ]; case 404: if ('\Algolia\AlgoliaSearch\Model\ErrorBase' === '\SplFileObject') { @@ -4677,7 +4724,7 @@ protected function sendRequest($request, $expectedResponse) return [ ObjectSerializer::deserialize($content, '\Algolia\AlgoliaSearch\Model\ErrorBase', []), $response->getStatusCode(), - $response->getHeaders() + $response->getHeaders(), ]; } @@ -4692,9 +4739,8 @@ protected function sendRequest($request, $expectedResponse) return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), - $response->getHeaders() + $response->getHeaders(), ]; - } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4704,6 +4750,7 @@ protected function sendRequest($request, $expectedResponse) $e->getResponseHeaders() ); $e->setResponseObject($data); + break; case 400: $data = ObjectSerializer::deserialize( @@ -4712,6 +4759,7 @@ protected function sendRequest($request, $expectedResponse) $e->getResponseHeaders() ); $e->setResponseObject($data); + break; case 402: $data = ObjectSerializer::deserialize( @@ -4720,6 +4768,7 @@ protected function sendRequest($request, $expectedResponse) $e->getResponseHeaders() ); $e->setResponseObject($data); + break; case 403: $data = ObjectSerializer::deserialize( @@ -4728,6 +4777,7 @@ protected function sendRequest($request, $expectedResponse) $e->getResponseHeaders() ); $e->setResponseObject($data); + break; case 404: $data = ObjectSerializer::deserialize( @@ -4736,8 +4786,10 @@ protected function sendRequest($request, $expectedResponse) $e->getResponseHeaders() ); $e->setResponseObject($data); + break; } + throw $e; } } diff --git a/clients/algoliasearch-client-php/lib/ApiException.php b/clients/algoliasearch-client-php/lib/ApiException.php index 0f80549494..d484a88eb5 100644 --- a/clients/algoliasearch-client-php/lib/ApiException.php +++ b/clients/algoliasearch-client-php/lib/ApiException.php @@ -12,7 +12,6 @@ */ class ApiException extends Exception { - /** * The HTTP body of the server response either as Json or string. * @@ -42,7 +41,7 @@ class ApiException extends Exception * @param string[]|null $responseHeaders HTTP response header * @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string */ - public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null) + public function __construct($message = '', $code = 0, $responseHeaders = [], $responseBody = null) { parent::__construct($message, $code); $this->responseHeaders = $responseHeaders; diff --git a/clients/algoliasearch-client-php/lib/Configuration.php b/clients/algoliasearch-client-php/lib/Configuration.php index 30f2a5e7aa..3027efaecd 100644 --- a/clients/algoliasearch-client-php/lib/Configuration.php +++ b/clients/algoliasearch-client-php/lib/Configuration.php @@ -113,6 +113,7 @@ public function __construct(string $appId, string $algoliaApiKey = null) public function setApiKey($apiKeyIdentifier, $key) { $this->apiKeys[$apiKeyIdentifier] = $key; + return $this; } @@ -139,6 +140,7 @@ public function getApiKey($apiKeyIdentifier) public function setApiKeyPrefix($apiKeyIdentifier, $prefix) { $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + return $this; } @@ -164,6 +166,7 @@ public function getApiKeyPrefix($apiKeyIdentifier) public function setAccessToken($accessToken) { $this->accessToken = $accessToken; + return $this; } @@ -192,7 +195,7 @@ public function setAppId($appId = '') /** * Gets the Algolia application ID * - * @return string + * @return string */ public function getAppId() { @@ -214,7 +217,7 @@ public function setAlgoliaApiKey($algoliaApiKey = '') /** * Gets the Algolia API Key * - * @return string + * @return string */ public function getAlgoliaApiKey() { @@ -231,6 +234,7 @@ public function getAlgoliaApiKey() public function setHost($host) { $this->host = $host; + return $this; } @@ -250,6 +254,7 @@ public function getHost() * @param string $userAgent the user agent of the api client * * @throws \InvalidArgumentException + * * @return $this */ public function setUserAgent($userAgent) @@ -259,6 +264,7 @@ public function setUserAgent($userAgent) } $this->userAgent = $userAgent; + return $this; } @@ -282,6 +288,7 @@ public function getUserAgent() public function setDebug($debug) { $this->debug = $debug; + return $this; } @@ -305,6 +312,7 @@ public function getDebug() public function setDebugFile($debugFile) { $this->debugFile = $debugFile; + return $this; } @@ -328,6 +336,7 @@ public function getDebugFile() public function setTempFolderPath($tempFolderPath) { $this->tempFolderPath = $tempFolderPath; + return $this; } @@ -417,9 +426,9 @@ public function getHostSettings() { return [ [ - "url" => "", - "description" => "No description provided", - ] + 'url' => '', + 'description' => 'No description provided', + ], ]; } @@ -428,6 +437,7 @@ public function getHostSettings() * * @param int $index index of the host settings * @param array|null $variables hash of variable and the corresponding value (optional) + * * @return string URL based on host settings */ public function getHostFromSettings($index, $variables = null) @@ -444,19 +454,19 @@ public function getHostFromSettings($index, $variables = null) } $host = $hosts[$index]; - $url = $host["url"]; + $url = $host['url']; // go through variable and assign a value - foreach ($host["variables"] ?? [] as $name => $variable) { + foreach ($host['variables'] ?? [] as $name => $variable) { if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user - if (in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum - $url = str_replace("{".$name."}", $variables[$name], $url); + if (in_array($variables[$name], $variable['enum_values'], true)) { // check to see if the value is in the enum + $url = str_replace('{'.$name.'}', $variables[$name], $url); } else { - throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"])."."); + throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].'. Must be '.join(',', $variable['enum_values']).'.'); } } else { // use default value - $url = str_replace("{".$name."}", $variable["default_value"], $url); + $url = str_replace('{'.$name.'}', $variable['default_value'], $url); } } diff --git a/clients/algoliasearch-client-php/lib/HeaderSelector.php b/clients/algoliasearch-client-php/lib/HeaderSelector.php index 7d68b37a53..c8cdd57128 100644 --- a/clients/algoliasearch-client-php/lib/HeaderSelector.php +++ b/clients/algoliasearch-client-php/lib/HeaderSelector.php @@ -2,8 +2,6 @@ namespace Algolia\AlgoliaSearch; -use \Exception; - /** * ApiException Class Doc Comment * @@ -12,10 +10,10 @@ */ class HeaderSelector { - /** * @param string[] $accept * @param string[] $contentTypes + * * @return array */ public function selectHeaders($accept, $contentTypes) @@ -28,11 +26,13 @@ public function selectHeaders($accept, $contentTypes) } $headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes); + return $headers; } /** * @param string[] $accept + * * @return array */ public function selectHeadersForMultipart($accept) @@ -40,6 +40,7 @@ public function selectHeadersForMultipart($accept) $headers = $this->selectHeaders($accept, []); unset($headers['Content-Type']); + return $headers; } @@ -56,9 +57,9 @@ private function selectAcceptHeader($accept) return null; } elseif ($jsonAccept = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept)) { return implode(',', $jsonAccept); - } else { - return implode(',', $accept); } + + return implode(',', $accept); } /** @@ -74,8 +75,8 @@ private function selectContentTypeHeader($contentType) return 'application/json'; } elseif (preg_grep("/application\/json/i", $contentType)) { return 'application/json'; - } else { - return implode(',', $contentType); } + + return implode(',', $contentType); } } diff --git a/clients/algoliasearch-client-php/lib/Model/Action.php b/clients/algoliasearch-client-php/lib/Model/Action.php index 8781092a8c..0296001727 100644 --- a/clients/algoliasearch-client-php/lib/Model/Action.php +++ b/clients/algoliasearch-client-php/lib/Model/Action.php @@ -1,13 +1,13 @@ 'string', - 'createdAt' => '\DateTime' + 'createdAt' => '\DateTime', ]; /** @@ -44,7 +44,7 @@ class AddApiKeyResponse implements ModelInterface, ArrayAccess, \JsonSerializabl */ protected static $openAPIFormats = [ 'key' => null, - 'createdAt' => 'date-time' + 'createdAt' => 'date-time', ]; /** @@ -75,7 +75,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'key' => 'key', - 'createdAt' => 'createdAt' + 'createdAt' => 'createdAt', ]; /** @@ -85,7 +85,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'key' => 'setKey', - 'createdAt' => 'setCreatedAt' + 'createdAt' => 'setCreatedAt', ]; /** @@ -95,7 +95,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'key' => 'getKey', - 'createdAt' => 'getCreatedAt' + 'createdAt' => 'getCreatedAt', ]; /** @@ -139,7 +139,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -174,6 +173,7 @@ public function listInvalidProperties() if ($this->container['createdAt'] === null) { $invalidProperties[] = "'createdAt' can't be null"; } + return $invalidProperties; } @@ -188,7 +188,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets key * @@ -202,7 +201,7 @@ public function getKey() /** * Sets key * - * @param string $key Key string. + * @param string $key key string * * @return self */ @@ -226,7 +225,7 @@ public function getCreatedAt() /** * Sets createdAt * - * @param \DateTime $createdAt Date of creation (ISO-8601 format). + * @param \DateTime $createdAt date of creation (ISO-8601 format) * * @return self */ @@ -239,9 +238,9 @@ public function setCreatedAt($createdAt) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -251,7 +250,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -280,7 +279,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -291,14 +290,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -325,4 +325,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/Anchoring.php b/clients/algoliasearch-client-php/lib/Model/Anchoring.php index 7760ddb377..031df08b5e 100644 --- a/clients/algoliasearch-client-php/lib/Model/Anchoring.php +++ b/clients/algoliasearch-client-php/lib/Model/Anchoring.php @@ -1,13 +1,13 @@ * @template TKey int|null @@ -39,7 +40,7 @@ class ApiKey implements ModelInterface, ArrayAccess, \JsonSerializable 'maxQueriesPerIPPerHour' => 'int', 'queryParameters' => 'string', 'referers' => 'string[]', - 'validity' => 'int' + 'validity' => 'int', ]; /** @@ -57,7 +58,7 @@ class ApiKey implements ModelInterface, ArrayAccess, \JsonSerializable 'maxQueriesPerIPPerHour' => null, 'queryParameters' => null, 'referers' => null, - 'validity' => null + 'validity' => null, ]; /** @@ -94,7 +95,7 @@ public static function openAPIFormats() 'maxQueriesPerIPPerHour' => 'maxQueriesPerIPPerHour', 'queryParameters' => 'queryParameters', 'referers' => 'referers', - 'validity' => 'validity' + 'validity' => 'validity', ]; /** @@ -110,7 +111,7 @@ public static function openAPIFormats() 'maxQueriesPerIPPerHour' => 'setMaxQueriesPerIPPerHour', 'queryParameters' => 'setQueryParameters', 'referers' => 'setReferers', - 'validity' => 'setValidity' + 'validity' => 'setValidity', ]; /** @@ -126,7 +127,7 @@ public static function openAPIFormats() 'maxQueriesPerIPPerHour' => 'getMaxQueriesPerIPPerHour', 'queryParameters' => 'getQueryParameters', 'referers' => 'getReferers', - 'validity' => 'getValidity' + 'validity' => 'getValidity', ]; /** @@ -247,6 +248,7 @@ public function listInvalidProperties() if ($this->container['acl'] === null) { $invalidProperties[] = "'acl' can't be null"; } + return $invalidProperties; } @@ -261,7 +263,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets acl * @@ -275,7 +276,7 @@ public function getAcl() /** * Sets acl * - * @param string[] $acl Set of permissions associated with the key. + * @param string[] $acl set of permissions associated with the key * * @return self */ @@ -380,7 +381,7 @@ public function getMaxQueriesPerIPPerHour() /** * Sets maxQueriesPerIPPerHour * - * @param int|null $maxQueriesPerIPPerHour Maximum number of API calls per hour allowed from a given IP address or a user token. + * @param int|null $maxQueriesPerIPPerHour maximum number of API calls per hour allowed from a given IP address or a user token * * @return self */ @@ -465,9 +466,9 @@ public function setValidity($validity) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -477,7 +478,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -506,7 +507,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -517,14 +518,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -551,4 +553,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/AssignUserIdObject.php b/clients/algoliasearch-client-php/lib/Model/AssignUserIdObject.php index d46ef38fc3..258696246c 100644 --- a/clients/algoliasearch-client-php/lib/Model/AssignUserIdObject.php +++ b/clients/algoliasearch-client-php/lib/Model/AssignUserIdObject.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * AssignUserIdObject Class Doc Comment * * @category Class * @description Assign userID object. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -32,7 +33,7 @@ class AssignUserIdObject implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'cluster' => 'string' + 'cluster' => 'string', ]; /** @@ -43,7 +44,7 @@ class AssignUserIdObject implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'cluster' => null + 'cluster' => null, ]; /** @@ -73,7 +74,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'cluster' => 'cluster' + 'cluster' => 'cluster', ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'cluster' => 'setCluster' + 'cluster' => 'setCluster', ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'cluster' => 'getCluster' + 'cluster' => 'getCluster', ]; /** @@ -135,7 +136,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -166,6 +166,7 @@ public function listInvalidProperties() if ($this->container['cluster'] === null) { $invalidProperties[] = "'cluster' can't be null"; } + return $invalidProperties; } @@ -180,7 +181,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets cluster * @@ -194,7 +194,7 @@ public function getCluster() /** * Sets cluster * - * @param string $cluster Name of the cluster. + * @param string $cluster name of the cluster * * @return self */ @@ -207,9 +207,9 @@ public function setCluster($cluster) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -219,7 +219,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -248,7 +248,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -259,14 +259,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -293,4 +294,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/AutomaticFacetFilter.php b/clients/algoliasearch-client-php/lib/Model/AutomaticFacetFilter.php index 9f4acf5062..e95f3c1f58 100644 --- a/clients/algoliasearch-client-php/lib/Model/AutomaticFacetFilter.php +++ b/clients/algoliasearch-client-php/lib/Model/AutomaticFacetFilter.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * AutomaticFacetFilter Class Doc Comment * * @category Class * @description Automatic facet Filter. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -34,7 +35,7 @@ class AutomaticFacetFilter implements ModelInterface, ArrayAccess, \JsonSerializ protected static $openAPITypes = [ 'facet' => 'string', 'score' => 'int', - 'disjunctive' => 'bool' + 'disjunctive' => 'bool', ]; /** @@ -47,7 +48,7 @@ class AutomaticFacetFilter implements ModelInterface, ArrayAccess, \JsonSerializ protected static $openAPIFormats = [ 'facet' => null, 'score' => null, - 'disjunctive' => null + 'disjunctive' => null, ]; /** @@ -79,7 +80,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'facet' => 'facet', 'score' => 'score', - 'disjunctive' => 'disjunctive' + 'disjunctive' => 'disjunctive', ]; /** @@ -90,7 +91,7 @@ public static function openAPIFormats() protected static $setters = [ 'facet' => 'setFacet', 'score' => 'setScore', - 'disjunctive' => 'setDisjunctive' + 'disjunctive' => 'setDisjunctive', ]; /** @@ -101,7 +102,7 @@ public static function openAPIFormats() protected static $getters = [ 'facet' => 'getFacet', 'score' => 'getScore', - 'disjunctive' => 'getDisjunctive' + 'disjunctive' => 'getDisjunctive', ]; /** @@ -145,7 +146,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -178,6 +178,7 @@ public function listInvalidProperties() if ($this->container['facet'] === null) { $invalidProperties[] = "'facet' can't be null"; } + return $invalidProperties; } @@ -192,7 +193,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets facet * @@ -254,7 +254,7 @@ public function getDisjunctive() /** * Sets disjunctive * - * @param bool|null $disjunctive Whether the filter is disjunctive (true) or conjunctive (false). + * @param bool|null $disjunctive whether the filter is disjunctive (true) or conjunctive (false) * * @return self */ @@ -267,9 +267,9 @@ public function setDisjunctive($disjunctive) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -279,7 +279,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -308,7 +308,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -319,14 +319,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -353,4 +354,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BaseBrowseResponse.php b/clients/algoliasearch-client-php/lib/Model/BaseBrowseResponse.php index fead53a789..39283cf771 100644 --- a/clients/algoliasearch-client-php/lib/Model/BaseBrowseResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/BaseBrowseResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BaseBrowseResponse Class Doc Comment @@ -31,7 +31,7 @@ class BaseBrowseResponse implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'cursor' => 'string' + 'cursor' => 'string', ]; /** @@ -42,7 +42,7 @@ class BaseBrowseResponse implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'cursor' => null + 'cursor' => null, ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'cursor' => 'cursor' + 'cursor' => 'cursor', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'cursor' => 'setCursor' + 'cursor' => 'setCursor', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'cursor' => 'getCursor' + 'cursor' => 'getCursor', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -165,6 +164,7 @@ public function listInvalidProperties() if ($this->container['cursor'] === null) { $invalidProperties[] = "'cursor' can't be null"; } + return $invalidProperties; } @@ -179,7 +179,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets cursor * @@ -206,9 +205,9 @@ public function setCursor($cursor) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -218,7 +217,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -247,7 +246,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -258,14 +257,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -292,4 +292,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BaseIndexSettings.php b/clients/algoliasearch-client-php/lib/Model/BaseIndexSettings.php index 80195a5625..4d67edd158 100644 --- a/clients/algoliasearch-client-php/lib/Model/BaseIndexSettings.php +++ b/clients/algoliasearch-client-php/lib/Model/BaseIndexSettings.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BaseIndexSettings Class Doc Comment @@ -42,7 +42,7 @@ class BaseIndexSettings implements ModelInterface, ArrayAccess, \JsonSerializabl 'disablePrefixOnAttributes' => 'string[]', 'allowCompressionOfIntegerArray' => 'bool', 'numericAttributesForFiltering' => 'string[]', - 'userData' => 'object' + 'userData' => 'object', ]; /** @@ -64,7 +64,7 @@ class BaseIndexSettings implements ModelInterface, ArrayAccess, \JsonSerializabl 'disablePrefixOnAttributes' => null, 'allowCompressionOfIntegerArray' => null, 'numericAttributesForFiltering' => null, - 'userData' => null + 'userData' => null, ]; /** @@ -105,7 +105,7 @@ public static function openAPIFormats() 'disablePrefixOnAttributes' => 'disablePrefixOnAttributes', 'allowCompressionOfIntegerArray' => 'allowCompressionOfIntegerArray', 'numericAttributesForFiltering' => 'numericAttributesForFiltering', - 'userData' => 'userData' + 'userData' => 'userData', ]; /** @@ -125,7 +125,7 @@ public static function openAPIFormats() 'disablePrefixOnAttributes' => 'setDisablePrefixOnAttributes', 'allowCompressionOfIntegerArray' => 'setAllowCompressionOfIntegerArray', 'numericAttributesForFiltering' => 'setNumericAttributesForFiltering', - 'userData' => 'setUserData' + 'userData' => 'setUserData', ]; /** @@ -145,7 +145,7 @@ public static function openAPIFormats() 'disablePrefixOnAttributes' => 'getDisablePrefixOnAttributes', 'allowCompressionOfIntegerArray' => 'getAllowCompressionOfIntegerArray', 'numericAttributesForFiltering' => 'getNumericAttributesForFiltering', - 'userData' => 'getUserData' + 'userData' => 'getUserData', ]; /** @@ -189,7 +189,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -242,7 +241,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets replicas * @@ -256,7 +254,7 @@ public function getReplicas() /** * Sets replicas * - * @param string[]|null $replicas Creates replicas, exact copies of an index. + * @param string[]|null $replicas creates replicas, exact copies of an index * * @return self */ @@ -280,7 +278,7 @@ public function getPaginationLimitedTo() /** * Sets paginationLimitedTo * - * @param int|null $paginationLimitedTo Set the maximum number of hits accessible via pagination. + * @param int|null $paginationLimitedTo set the maximum number of hits accessible via pagination * * @return self */ @@ -304,7 +302,7 @@ public function getDisableTypoToleranceOnWords() /** * Sets disableTypoToleranceOnWords * - * @param string[]|null $disableTypoToleranceOnWords A list of words for which you want to turn off typo tolerance. + * @param string[]|null $disableTypoToleranceOnWords a list of words for which you want to turn off typo tolerance * * @return self */ @@ -328,7 +326,7 @@ public function getAttributesToTransliterate() /** * Sets attributesToTransliterate * - * @param string[]|null $attributesToTransliterate Specify on which attributes to apply transliteration. + * @param string[]|null $attributesToTransliterate specify on which attributes to apply transliteration * * @return self */ @@ -352,7 +350,7 @@ public function getCamelCaseAttributes() /** * Sets camelCaseAttributes * - * @param string[]|null $camelCaseAttributes List of attributes on which to do a decomposition of camel case words. + * @param string[]|null $camelCaseAttributes list of attributes on which to do a decomposition of camel case words * * @return self */ @@ -376,7 +374,7 @@ public function getDecompoundedAttributes() /** * Sets decompoundedAttributes * - * @param object|null $decompoundedAttributes Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding. + * @param object|null $decompoundedAttributes specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding * * @return self */ @@ -400,7 +398,7 @@ public function getIndexLanguages() /** * Sets indexLanguages * - * @param string[]|null $indexLanguages Sets the languages at the index level for language-specific processing such as tokenization and normalization. + * @param string[]|null $indexLanguages sets the languages at the index level for language-specific processing such as tokenization and normalization * * @return self */ @@ -424,7 +422,7 @@ public function getFilterPromotes() /** * Sets filterPromotes * - * @param bool|null $filterPromotes Whether promoted results should match the filters of the current search, except for geographic filters. + * @param bool|null $filterPromotes whether promoted results should match the filters of the current search, except for geographic filters * * @return self */ @@ -448,7 +446,7 @@ public function getDisablePrefixOnAttributes() /** * Sets disablePrefixOnAttributes * - * @param string[]|null $disablePrefixOnAttributes List of attributes on which you want to disable prefix matching. + * @param string[]|null $disablePrefixOnAttributes list of attributes on which you want to disable prefix matching * * @return self */ @@ -472,7 +470,7 @@ public function getAllowCompressionOfIntegerArray() /** * Sets allowCompressionOfIntegerArray * - * @param bool|null $allowCompressionOfIntegerArray Enables compression of large integer arrays. + * @param bool|null $allowCompressionOfIntegerArray enables compression of large integer arrays * * @return self */ @@ -496,7 +494,7 @@ public function getNumericAttributesForFiltering() /** * Sets numericAttributesForFiltering * - * @param string[]|null $numericAttributesForFiltering List of numeric attributes that can be used as numerical filters. + * @param string[]|null $numericAttributesForFiltering list of numeric attributes that can be used as numerical filters * * @return self */ @@ -520,7 +518,7 @@ public function getUserData() /** * Sets userData * - * @param object|null $userData Lets you store custom data in your indices. + * @param object|null $userData lets you store custom data in your indices * * @return self */ @@ -533,9 +531,9 @@ public function setUserData($userData) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -545,7 +543,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -574,7 +572,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -585,14 +583,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -619,4 +618,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BaseSearchParams.php b/clients/algoliasearch-client-php/lib/Model/BaseSearchParams.php index bf573dc75a..93b1dd7be6 100644 --- a/clients/algoliasearch-client-php/lib/Model/BaseSearchParams.php +++ b/clients/algoliasearch-client-php/lib/Model/BaseSearchParams.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BaseSearchParams Class Doc Comment @@ -62,7 +62,7 @@ class BaseSearchParams implements ModelInterface, ArrayAccess, \JsonSerializable 'analyticsTags' => 'string[]', 'percentileComputation' => 'bool', 'enableABTest' => 'bool', - 'enableReRanking' => 'bool' + 'enableReRanking' => 'bool', ]; /** @@ -104,7 +104,7 @@ class BaseSearchParams implements ModelInterface, ArrayAccess, \JsonSerializable 'analyticsTags' => null, 'percentileComputation' => null, 'enableABTest' => null, - 'enableReRanking' => null + 'enableReRanking' => null, ]; /** @@ -165,7 +165,7 @@ public static function openAPIFormats() 'analyticsTags' => 'analyticsTags', 'percentileComputation' => 'percentileComputation', 'enableABTest' => 'enableABTest', - 'enableReRanking' => 'enableReRanking' + 'enableReRanking' => 'enableReRanking', ]; /** @@ -205,7 +205,7 @@ public static function openAPIFormats() 'analyticsTags' => 'setAnalyticsTags', 'percentileComputation' => 'setPercentileComputation', 'enableABTest' => 'setEnableABTest', - 'enableReRanking' => 'setEnableReRanking' + 'enableReRanking' => 'setEnableReRanking', ]; /** @@ -245,7 +245,7 @@ public static function openAPIFormats() 'analyticsTags' => 'getAnalyticsTags', 'percentileComputation' => 'getPercentileComputation', 'enableABTest' => 'getEnableABTest', - 'enableReRanking' => 'getEnableReRanking' + 'enableReRanking' => 'getEnableReRanking', ]; /** @@ -289,7 +289,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -374,7 +373,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets similarQuery * @@ -388,7 +386,7 @@ public function getSimilarQuery() /** * Sets similarQuery * - * @param string|null $similarQuery Overrides the query parameter and performs a more generic search that can be used to find \"similar\" results. + * @param string|null $similarQuery overrides the query parameter and performs a more generic search that can be used to find \"similar\" results * * @return self */ @@ -412,7 +410,7 @@ public function getFilters() /** * Sets filters * - * @param string|null $filters Filter the query with numeric, facet and/or tag filters. + * @param string|null $filters filter the query with numeric, facet and/or tag filters * * @return self */ @@ -436,7 +434,7 @@ public function getFacetFilters() /** * Sets facetFilters * - * @param string[]|null $facetFilters Filter hits by facet value. + * @param string[]|null $facetFilters filter hits by facet value * * @return self */ @@ -460,7 +458,7 @@ public function getOptionalFilters() /** * Sets optionalFilters * - * @param string[]|null $optionalFilters Create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter. + * @param string[]|null $optionalFilters create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter * * @return self */ @@ -484,7 +482,7 @@ public function getNumericFilters() /** * Sets numericFilters * - * @param string[]|null $numericFilters Filter on numeric attributes. + * @param string[]|null $numericFilters filter on numeric attributes * * @return self */ @@ -508,7 +506,7 @@ public function getTagFilters() /** * Sets tagFilters * - * @param string[]|null $tagFilters Filter hits by tags. + * @param string[]|null $tagFilters filter hits by tags * * @return self */ @@ -532,7 +530,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores * - * @param bool|null $sumOrFiltersScores Determines how to calculate the total score for filtering. + * @param bool|null $sumOrFiltersScores determines how to calculate the total score for filtering * * @return self */ @@ -556,7 +554,7 @@ public function getFacets() /** * Sets facets * - * @param string[]|null $facets Retrieve facets and their facet values. + * @param string[]|null $facets retrieve facets and their facet values * * @return self */ @@ -580,7 +578,7 @@ public function getMaxValuesPerFacet() /** * Sets maxValuesPerFacet * - * @param int|null $maxValuesPerFacet Maximum number of facet values to return for each facet during a regular search. + * @param int|null $maxValuesPerFacet maximum number of facet values to return for each facet during a regular search * * @return self */ @@ -604,7 +602,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct * - * @param bool|null $facetingAfterDistinct Force faceting to be applied after de-duplication (via the Distinct setting). + * @param bool|null $facetingAfterDistinct force faceting to be applied after de-duplication (via the Distinct setting) * * @return self */ @@ -628,7 +626,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy * - * @param string|null $sortFacetValuesBy Controls how facet values are fetched. + * @param string|null $sortFacetValuesBy controls how facet values are fetched * * @return self */ @@ -652,7 +650,7 @@ public function getPage() /** * Sets page * - * @param int|null $page Specify the page to retrieve. + * @param int|null $page specify the page to retrieve * * @return self */ @@ -676,7 +674,7 @@ public function getOffset() /** * Sets offset * - * @param int|null $offset Specify the offset of the first hit to return. + * @param int|null $offset specify the offset of the first hit to return * * @return self */ @@ -700,13 +698,12 @@ public function getLength() /** * Sets length * - * @param int|null $length Set the number of hits to retrieve (used only with offset). + * @param int|null $length set the number of hits to retrieve (used only with offset) * * @return self */ public function setLength($length) { - if (!is_null($length) && ($length > 1000)) { throw new \InvalidArgumentException('invalid value for $length when calling BaseSearchParams., must be smaller than or equal to 1000.'); } @@ -732,7 +729,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng * - * @param string|null $aroundLatLng Search for entries around a central geolocation, enabling a geo search within a circular area. + * @param string|null $aroundLatLng search for entries around a central geolocation, enabling a geo search within a circular area * * @return self */ @@ -756,7 +753,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP * - * @param bool|null $aroundLatLngViaIP Search for entries around a given location automatically computed from the requester's IP address. + * @param bool|null $aroundLatLngViaIP search for entries around a given location automatically computed from the requester's IP address * * @return self */ @@ -780,7 +777,7 @@ public function getAroundRadius() /** * Sets aroundRadius * - * @param OneOfIntegerString|null $aroundRadius Define the maximum radius for a geo search (in meters). + * @param OneOfIntegerString|null $aroundRadius define the maximum radius for a geo search (in meters) * * @return self */ @@ -804,7 +801,7 @@ public function getAroundPrecision() /** * Sets aroundPrecision * - * @param int|null $aroundPrecision Precision of geo search (in meters), to add grouping by geo location to the ranking formula. + * @param int|null $aroundPrecision precision of geo search (in meters), to add grouping by geo location to the ranking formula * * @return self */ @@ -828,13 +825,12 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius * - * @param int|null $minimumAroundRadius Minimum radius (in meters) used for a geo search when aroundRadius is not set. + * @param int|null $minimumAroundRadius minimum radius (in meters) used for a geo search when aroundRadius is not set * * @return self */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling BaseSearchParams., must be bigger than or equal to 1.'); } @@ -857,7 +853,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox * - * @param float[]|null $insideBoundingBox Search inside a rectangular area (in geo coordinates). + * @param float[]|null $insideBoundingBox search inside a rectangular area (in geo coordinates) * * @return self */ @@ -881,7 +877,7 @@ public function getInsidePolygon() /** * Sets insidePolygon * - * @param float[]|null $insidePolygon Search inside a polygon (in geo coordinates). + * @param float[]|null $insidePolygon search inside a polygon (in geo coordinates) * * @return self */ @@ -929,7 +925,7 @@ public function getRuleContexts() /** * Sets ruleContexts * - * @param string[]|null $ruleContexts Enables contextual rules. + * @param string[]|null $ruleContexts enables contextual rules * * @return self */ @@ -953,7 +949,7 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact * - * @param int|null $personalizationImpact Define the impact of the Personalization feature. + * @param int|null $personalizationImpact define the impact of the Personalization feature * * @return self */ @@ -977,7 +973,7 @@ public function getUserToken() /** * Sets userToken * - * @param string|null $userToken Associates a certain user token with the current search. + * @param string|null $userToken associates a certain user token with the current search * * @return self */ @@ -1001,7 +997,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo * - * @param bool|null $getRankingInfo Retrieve detailed ranking information. + * @param bool|null $getRankingInfo retrieve detailed ranking information * * @return self */ @@ -1025,7 +1021,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics * - * @param bool|null $clickAnalytics Enable the Click Analytics feature. + * @param bool|null $clickAnalytics enable the Click Analytics feature * * @return self */ @@ -1049,7 +1045,7 @@ public function getAnalytics() /** * Sets analytics * - * @param bool|null $analytics Whether the current query will be taken into account in the Analytics. + * @param bool|null $analytics whether the current query will be taken into account in the Analytics * * @return self */ @@ -1073,7 +1069,7 @@ public function getAnalyticsTags() /** * Sets analyticsTags * - * @param string[]|null $analyticsTags List of tags to apply to the query for analytics purposes. + * @param string[]|null $analyticsTags list of tags to apply to the query for analytics purposes * * @return self */ @@ -1097,7 +1093,7 @@ public function getPercentileComputation() /** * Sets percentileComputation * - * @param bool|null $percentileComputation Whether to include or exclude a query from the processing-time percentile computation. + * @param bool|null $percentileComputation whether to include or exclude a query from the processing-time percentile computation * * @return self */ @@ -1121,7 +1117,7 @@ public function getEnableABTest() /** * Sets enableABTest * - * @param bool|null $enableABTest Whether this search should participate in running AB tests. + * @param bool|null $enableABTest whether this search should participate in running AB tests * * @return self */ @@ -1145,7 +1141,7 @@ public function getEnableReRanking() /** * Sets enableReRanking * - * @param bool|null $enableReRanking Whether this search should use AI Re-Ranking. + * @param bool|null $enableReRanking whether this search should use AI Re-Ranking * * @return self */ @@ -1158,9 +1154,9 @@ public function setEnableReRanking($enableReRanking) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -1170,7 +1166,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -1199,7 +1195,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -1210,14 +1206,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -1244,4 +1241,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BaseSearchResponse.php b/clients/algoliasearch-client-php/lib/Model/BaseSearchResponse.php index 37b4705831..9c0e3eb811 100644 --- a/clients/algoliasearch-client-php/lib/Model/BaseSearchResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/BaseSearchResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BaseSearchResponse Class Doc Comment @@ -54,7 +54,7 @@ class BaseSearchResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'query' => 'string', 'queryAfterRemoval' => 'string', 'serverUsed' => 'string', - 'userData' => 'object' + 'userData' => 'object', ]; /** @@ -88,7 +88,7 @@ class BaseSearchResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'query' => null, 'queryAfterRemoval' => null, 'serverUsed' => null, - 'userData' => null + 'userData' => null, ]; /** @@ -141,7 +141,7 @@ public static function openAPIFormats() 'query' => 'query', 'queryAfterRemoval' => 'queryAfterRemoval', 'serverUsed' => 'serverUsed', - 'userData' => 'userData' + 'userData' => 'userData', ]; /** @@ -173,7 +173,7 @@ public static function openAPIFormats() 'query' => 'setQuery', 'queryAfterRemoval' => 'setQueryAfterRemoval', 'serverUsed' => 'setServerUsed', - 'userData' => 'setUserData' + 'userData' => 'setUserData', ]; /** @@ -205,7 +205,7 @@ public static function openAPIFormats() 'query' => 'getQuery', 'queryAfterRemoval' => 'getQueryAfterRemoval', 'serverUsed' => 'getServerUsed', - 'userData' => 'getUserData' + 'userData' => 'getUserData', ]; /** @@ -249,7 +249,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -300,7 +299,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if (!is_null($this->container['aroundLatLng']) && !preg_match("/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/", $this->container['aroundLatLng'])) { + if (!is_null($this->container['aroundLatLng']) && !preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $this->container['aroundLatLng'])) { $invalidProperties[] = "invalid value for 'aroundLatLng', must be conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."; } @@ -331,6 +330,7 @@ public function listInvalidProperties() if ($this->container['query'] === null) { $invalidProperties[] = "'query' can't be null"; } + return $invalidProperties; } @@ -345,7 +345,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets abTestID * @@ -359,7 +358,7 @@ public function getAbTestID() /** * Sets abTestID * - * @param int|null $abTestID If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID. + * @param int|null $abTestID if a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID * * @return self */ @@ -383,7 +382,7 @@ public function getAbTestVariantID() /** * Sets abTestVariantID * - * @param int|null $abTestVariantID If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used. + * @param int|null $abTestVariantID if a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used * * @return self */ @@ -407,14 +406,13 @@ public function getAroundLatLng() /** * Sets aroundLatLng * - * @param string|null $aroundLatLng The computed geo location. + * @param string|null $aroundLatLng the computed geo location * * @return self */ public function setAroundLatLng($aroundLatLng) { - - if (!is_null($aroundLatLng) && (!preg_match("/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/", $aroundLatLng))) { + if (!is_null($aroundLatLng) && (!preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $aroundLatLng))) { throw new \InvalidArgumentException("invalid value for $aroundLatLng when calling BaseSearchResponse., must conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."); } @@ -460,7 +458,7 @@ public function getExhaustiveFacetsCount() /** * Sets exhaustiveFacetsCount * - * @param bool|null $exhaustiveFacetsCount Whether the facet count is exhaustive or approximate. + * @param bool|null $exhaustiveFacetsCount whether the facet count is exhaustive or approximate * * @return self */ @@ -532,7 +530,7 @@ public function getFacets() /** * Sets facets * - * @param array>|null $facets A mapping of each facet name to the corresponding facet counts. + * @param array>|null $facets a mapping of each facet name to the corresponding facet counts * * @return self */ @@ -556,7 +554,7 @@ public function getFacetsStats() /** * Sets facetsStats * - * @param array|null $facetsStats Statistics for numerical facets. + * @param array|null $facetsStats statistics for numerical facets * * @return self */ @@ -580,7 +578,7 @@ public function getHitsPerPage() /** * Sets hitsPerPage * - * @param int $hitsPerPage Set the number of hits per page. + * @param int $hitsPerPage set the number of hits per page * * @return self */ @@ -604,7 +602,7 @@ public function getIndex() /** * Sets index * - * @param string|null $index Index name used for the query. + * @param string|null $index index name used for the query * * @return self */ @@ -652,7 +650,7 @@ public function getMessage() /** * Sets message * - * @param string|null $message Used to return warnings about the query. + * @param string|null $message used to return warnings about the query * * @return self */ @@ -676,7 +674,7 @@ public function getNbHits() /** * Sets nbHits * - * @param int $nbHits Number of hits that the search query matched. + * @param int $nbHits number of hits that the search query matched * * @return self */ @@ -748,7 +746,7 @@ public function getPage() /** * Sets page * - * @param int $page Specify the page to retrieve. + * @param int $page specify the page to retrieve * * @return self */ @@ -772,7 +770,7 @@ public function getParams() /** * Sets params * - * @param string $params A url-encoded string of all search parameters. + * @param string $params a url-encoded string of all search parameters * * @return self */ @@ -796,7 +794,7 @@ public function getParsedQuery() /** * Sets parsedQuery * - * @param string|null $parsedQuery The query string that will be searched, after normalization. + * @param string|null $parsedQuery the query string that will be searched, after normalization * * @return self */ @@ -820,7 +818,7 @@ public function getProcessingTimeMS() /** * Sets processingTimeMS * - * @param int $processingTimeMS Time the server took to process the request, in milliseconds. + * @param int $processingTimeMS time the server took to process the request, in milliseconds * * @return self */ @@ -844,7 +842,7 @@ public function getQuery() /** * Sets query * - * @param string $query The text to search in the index. + * @param string $query the text to search in the index * * @return self */ @@ -868,7 +866,7 @@ public function getQueryAfterRemoval() /** * Sets queryAfterRemoval * - * @param string|null $queryAfterRemoval A markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set. + * @param string|null $queryAfterRemoval a markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set * * @return self */ @@ -892,7 +890,7 @@ public function getServerUsed() /** * Sets serverUsed * - * @param string|null $serverUsed Actual host name of the server that processed the request. + * @param string|null $serverUsed actual host name of the server that processed the request * * @return self */ @@ -916,7 +914,7 @@ public function getUserData() /** * Sets userData * - * @param object|null $userData Lets you store custom data in your indices. + * @param object|null $userData lets you store custom data in your indices * * @return self */ @@ -929,9 +927,9 @@ public function setUserData($userData) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -941,7 +939,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -970,7 +968,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -981,14 +979,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -1015,4 +1014,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BaseSearchResponseFacetsStats.php b/clients/algoliasearch-client-php/lib/Model/BaseSearchResponseFacetsStats.php index 2d97e8e94b..5af39f3245 100644 --- a/clients/algoliasearch-client-php/lib/Model/BaseSearchResponseFacetsStats.php +++ b/clients/algoliasearch-client-php/lib/Model/BaseSearchResponseFacetsStats.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BaseSearchResponseFacetsStats Class Doc Comment @@ -34,7 +34,7 @@ class BaseSearchResponseFacetsStats implements ModelInterface, ArrayAccess, \Jso 'min' => 'int', 'max' => 'int', 'avg' => 'int', - 'sum' => 'int' + 'sum' => 'int', ]; /** @@ -48,7 +48,7 @@ class BaseSearchResponseFacetsStats implements ModelInterface, ArrayAccess, \Jso 'min' => null, 'max' => null, 'avg' => null, - 'sum' => null + 'sum' => null, ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() 'min' => 'min', 'max' => 'max', 'avg' => 'avg', - 'sum' => 'sum' + 'sum' => 'sum', ]; /** @@ -93,7 +93,7 @@ public static function openAPIFormats() 'min' => 'setMin', 'max' => 'setMax', 'avg' => 'setAvg', - 'sum' => 'setSum' + 'sum' => 'setSum', ]; /** @@ -105,7 +105,7 @@ public static function openAPIFormats() 'min' => 'getMin', 'max' => 'getMax', 'avg' => 'getAvg', - 'sum' => 'getSum' + 'sum' => 'getSum', ]; /** @@ -149,7 +149,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -194,7 +193,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets min * @@ -208,7 +206,7 @@ public function getMin() /** * Sets min * - * @param int|null $min The minimum value in the result set. + * @param int|null $min the minimum value in the result set * * @return self */ @@ -232,7 +230,7 @@ public function getMax() /** * Sets max * - * @param int|null $max The maximum value in the result set. + * @param int|null $max the maximum value in the result set * * @return self */ @@ -256,7 +254,7 @@ public function getAvg() /** * Sets avg * - * @param int|null $avg The average facet value in the result set. + * @param int|null $avg the average facet value in the result set * * @return self */ @@ -280,7 +278,7 @@ public function getSum() /** * Sets sum * - * @param int|null $sum The sum of all values in the result set. + * @param int|null $sum the sum of all values in the result set * * @return self */ @@ -293,9 +291,9 @@ public function setSum($sum) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -305,7 +303,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -334,7 +332,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -345,14 +343,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -379,4 +378,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BatchAssignUserIdsObject.php b/clients/algoliasearch-client-php/lib/Model/BatchAssignUserIdsObject.php index 43c76dd3dd..d556abcaf8 100644 --- a/clients/algoliasearch-client-php/lib/Model/BatchAssignUserIdsObject.php +++ b/clients/algoliasearch-client-php/lib/Model/BatchAssignUserIdsObject.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BatchAssignUserIdsObject Class Doc Comment * * @category Class * @description Assign userID object. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -33,7 +34,7 @@ class BatchAssignUserIdsObject implements ModelInterface, ArrayAccess, \JsonSeri */ protected static $openAPITypes = [ 'cluster' => 'string', - 'users' => 'string[]' + 'users' => 'string[]', ]; /** @@ -45,7 +46,7 @@ class BatchAssignUserIdsObject implements ModelInterface, ArrayAccess, \JsonSeri */ protected static $openAPIFormats = [ 'cluster' => null, - 'users' => null + 'users' => null, ]; /** @@ -76,7 +77,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'cluster' => 'cluster', - 'users' => 'users' + 'users' => 'users', ]; /** @@ -86,7 +87,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'cluster' => 'setCluster', - 'users' => 'setUsers' + 'users' => 'setUsers', ]; /** @@ -96,7 +97,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'cluster' => 'getCluster', - 'users' => 'getUsers' + 'users' => 'getUsers', ]; /** @@ -140,7 +141,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -175,6 +175,7 @@ public function listInvalidProperties() if ($this->container['users'] === null) { $invalidProperties[] = "'users' can't be null"; } + return $invalidProperties; } @@ -189,7 +190,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets cluster * @@ -203,7 +203,7 @@ public function getCluster() /** * Sets cluster * - * @param string $cluster Name of the cluster. + * @param string $cluster name of the cluster * * @return self */ @@ -240,9 +240,9 @@ public function setUsers($users) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -252,7 +252,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -281,7 +281,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -292,14 +292,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -326,4 +327,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BatchDictionaryEntries.php b/clients/algoliasearch-client-php/lib/Model/BatchDictionaryEntries.php index 8c5a853c0e..809dabd239 100644 --- a/clients/algoliasearch-client-php/lib/Model/BatchDictionaryEntries.php +++ b/clients/algoliasearch-client-php/lib/Model/BatchDictionaryEntries.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BatchDictionaryEntries Class Doc Comment * * @category Class * @description The `batchDictionaryEntries` requests. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -33,7 +34,7 @@ class BatchDictionaryEntries implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPITypes = [ 'clearExistingDictionaryEntries' => 'bool', - 'requests' => '\Algolia\AlgoliaSearch\Model\BatchDictionaryEntriesRequest[]' + 'requests' => '\Algolia\AlgoliaSearch\Model\BatchDictionaryEntriesRequest[]', ]; /** @@ -45,7 +46,7 @@ class BatchDictionaryEntries implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPIFormats = [ 'clearExistingDictionaryEntries' => null, - 'requests' => null + 'requests' => null, ]; /** @@ -76,7 +77,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'clearExistingDictionaryEntries' => 'clearExistingDictionaryEntries', - 'requests' => 'requests' + 'requests' => 'requests', ]; /** @@ -86,7 +87,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'clearExistingDictionaryEntries' => 'setClearExistingDictionaryEntries', - 'requests' => 'setRequests' + 'requests' => 'setRequests', ]; /** @@ -96,7 +97,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'clearExistingDictionaryEntries' => 'getClearExistingDictionaryEntries', - 'requests' => 'getRequests' + 'requests' => 'getRequests', ]; /** @@ -140,7 +141,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -172,6 +172,7 @@ public function listInvalidProperties() if ($this->container['requests'] === null) { $invalidProperties[] = "'requests' can't be null"; } + return $invalidProperties; } @@ -186,7 +187,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets clearExistingDictionaryEntries * @@ -200,7 +200,7 @@ public function getClearExistingDictionaryEntries() /** * Sets clearExistingDictionaryEntries * - * @param bool|null $clearExistingDictionaryEntries When `true`, start the batch by removing all the custom entries from the dictionary. + * @param bool|null $clearExistingDictionaryEntries when `true`, start the batch by removing all the custom entries from the dictionary * * @return self */ @@ -237,9 +237,9 @@ public function setRequests($requests) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -249,7 +249,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -278,7 +278,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -289,14 +289,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -323,4 +324,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BatchDictionaryEntriesRequest.php b/clients/algoliasearch-client-php/lib/Model/BatchDictionaryEntriesRequest.php index 073e38595f..945c27dea7 100644 --- a/clients/algoliasearch-client-php/lib/Model/BatchDictionaryEntriesRequest.php +++ b/clients/algoliasearch-client-php/lib/Model/BatchDictionaryEntriesRequest.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BatchDictionaryEntriesRequest Class Doc Comment @@ -32,7 +32,7 @@ class BatchDictionaryEntriesRequest implements ModelInterface, ArrayAccess, \Jso */ protected static $openAPITypes = [ 'action' => 'string', - 'body' => '\Algolia\AlgoliaSearch\Model\DictionaryEntry' + 'body' => '\Algolia\AlgoliaSearch\Model\DictionaryEntry', ]; /** @@ -44,7 +44,7 @@ class BatchDictionaryEntriesRequest implements ModelInterface, ArrayAccess, \Jso */ protected static $openAPIFormats = [ 'action' => null, - 'body' => null + 'body' => null, ]; /** @@ -75,7 +75,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'action' => 'action', - 'body' => 'body' + 'body' => 'body', ]; /** @@ -85,7 +85,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'action' => 'setAction', - 'body' => 'setBody' + 'body' => 'setBody', ]; /** @@ -95,7 +95,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'action' => 'getAction', - 'body' => 'getBody' + 'body' => 'getBody', ]; /** @@ -198,6 +198,7 @@ public function listInvalidProperties() if ($this->container['body'] === null) { $invalidProperties[] = "'body' can't be null"; } + return $invalidProperties; } @@ -212,7 +213,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets action * @@ -226,7 +226,7 @@ public function getAction() /** * Sets action * - * @param string $action Actions to perform. + * @param string $action actions to perform * * @return self */ @@ -273,9 +273,9 @@ public function setBody($body) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -285,7 +285,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -314,7 +314,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -325,14 +325,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -359,4 +360,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BatchObject.php b/clients/algoliasearch-client-php/lib/Model/BatchObject.php index 815e85b5cb..69068c27fe 100644 --- a/clients/algoliasearch-client-php/lib/Model/BatchObject.php +++ b/clients/algoliasearch-client-php/lib/Model/BatchObject.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BatchObject Class Doc Comment * * @category Class * @description The `batch` requests. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -32,7 +33,7 @@ class BatchObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'requests' => '\Algolia\AlgoliaSearch\Model\Operation[]' + 'requests' => '\Algolia\AlgoliaSearch\Model\Operation[]', ]; /** @@ -43,7 +44,7 @@ class BatchObject implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'requests' => null + 'requests' => null, ]; /** @@ -73,7 +74,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'requests' => 'requests' + 'requests' => 'requests', ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'requests' => 'setRequests' + 'requests' => 'setRequests', ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'requests' => 'getRequests' + 'requests' => 'getRequests', ]; /** @@ -135,7 +136,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -177,7 +177,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets requests * @@ -204,9 +203,9 @@ public function setRequests($requests) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -216,7 +215,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -245,7 +244,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -256,14 +255,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -290,4 +290,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BatchResponse.php b/clients/algoliasearch-client-php/lib/Model/BatchResponse.php index ad20982c93..13b488d920 100644 --- a/clients/algoliasearch-client-php/lib/Model/BatchResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/BatchResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BatchResponse Class Doc Comment @@ -32,7 +32,7 @@ class BatchResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'taskID' => 'int', - 'objectIDs' => 'string[]' + 'objectIDs' => 'string[]', ]; /** @@ -44,7 +44,7 @@ class BatchResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'taskID' => null, - 'objectIDs' => null + 'objectIDs' => null, ]; /** @@ -75,7 +75,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'taskID' => 'taskID', - 'objectIDs' => 'objectIDs' + 'objectIDs' => 'objectIDs', ]; /** @@ -85,7 +85,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'taskID' => 'setTaskID', - 'objectIDs' => 'setObjectIDs' + 'objectIDs' => 'setObjectIDs', ]; /** @@ -95,7 +95,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'taskID' => 'getTaskID', - 'objectIDs' => 'getObjectIDs' + 'objectIDs' => 'getObjectIDs', ]; /** @@ -139,7 +139,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -182,7 +181,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets taskID * @@ -196,7 +194,7 @@ public function getTaskID() /** * Sets taskID * - * @param int|null $taskID taskID of the indexing task to wait for. + * @param int|null $taskID taskID of the indexing task to wait for * * @return self */ @@ -220,7 +218,7 @@ public function getObjectIDs() /** * Sets objectIDs * - * @param string[]|null $objectIDs List of objectID. + * @param string[]|null $objectIDs list of objectID * * @return self */ @@ -233,9 +231,9 @@ public function setObjectIDs($objectIDs) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -245,7 +243,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -274,7 +272,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -285,14 +283,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -319,4 +318,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BatchWriteObject.php b/clients/algoliasearch-client-php/lib/Model/BatchWriteObject.php index 896d0c3b8f..a0cbdc98fd 100644 --- a/clients/algoliasearch-client-php/lib/Model/BatchWriteObject.php +++ b/clients/algoliasearch-client-php/lib/Model/BatchWriteObject.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BatchWriteObject Class Doc Comment * * @category Class * @description The `batch` requests. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -32,7 +33,7 @@ class BatchWriteObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'requests' => '\Algolia\AlgoliaSearch\Model\Operation[]' + 'requests' => '\Algolia\AlgoliaSearch\Model\Operation[]', ]; /** @@ -43,7 +44,7 @@ class BatchWriteObject implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'requests' => null + 'requests' => null, ]; /** @@ -73,7 +74,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'requests' => 'requests' + 'requests' => 'requests', ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'requests' => 'setRequests' + 'requests' => 'setRequests', ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'requests' => 'getRequests' + 'requests' => 'getRequests', ]; /** @@ -135,7 +136,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -177,7 +177,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets requests * @@ -204,9 +203,9 @@ public function setRequests($requests) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -216,7 +215,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -245,7 +244,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -256,14 +255,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -290,4 +290,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BrowseRequest.php b/clients/algoliasearch-client-php/lib/Model/BrowseRequest.php index 8c2728944a..5c53d672b9 100644 --- a/clients/algoliasearch-client-php/lib/Model/BrowseRequest.php +++ b/clients/algoliasearch-client-php/lib/Model/BrowseRequest.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BrowseRequest Class Doc Comment @@ -32,7 +32,7 @@ class BrowseRequest implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'params' => 'string', - 'cursor' => 'string' + 'cursor' => 'string', ]; /** @@ -44,7 +44,7 @@ class BrowseRequest implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'params' => null, - 'cursor' => null + 'cursor' => null, ]; /** @@ -75,7 +75,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'params' => 'params', - 'cursor' => 'cursor' + 'cursor' => 'cursor', ]; /** @@ -85,7 +85,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'params' => 'setParams', - 'cursor' => 'setCursor' + 'cursor' => 'setCursor', ]; /** @@ -95,7 +95,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'params' => 'getParams', - 'cursor' => 'getCursor' + 'cursor' => 'getCursor', ]; /** @@ -139,7 +139,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -182,7 +181,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets params * @@ -196,7 +194,7 @@ public function getParams() /** * Sets params * - * @param string|null $params Search parameters as URL-encoded query string. + * @param string|null $params search parameters as URL-encoded query string * * @return self */ @@ -233,9 +231,9 @@ public function setCursor($cursor) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -245,7 +243,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -274,7 +272,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -285,14 +283,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -319,4 +318,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BrowseResponse.php b/clients/algoliasearch-client-php/lib/Model/BrowseResponse.php index 389fa30b65..fd2be587ff 100644 --- a/clients/algoliasearch-client-php/lib/Model/BrowseResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/BrowseResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BrowseResponse Class Doc Comment @@ -56,7 +56,7 @@ class BrowseResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'serverUsed' => 'string', 'userData' => 'object', 'hits' => '\Algolia\AlgoliaSearch\Model\Record[]', - 'cursor' => 'string' + 'cursor' => 'string', ]; /** @@ -92,7 +92,7 @@ class BrowseResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'serverUsed' => null, 'userData' => null, 'hits' => null, - 'cursor' => null + 'cursor' => null, ]; /** @@ -147,7 +147,7 @@ public static function openAPIFormats() 'serverUsed' => 'serverUsed', 'userData' => 'userData', 'hits' => 'hits', - 'cursor' => 'cursor' + 'cursor' => 'cursor', ]; /** @@ -181,7 +181,7 @@ public static function openAPIFormats() 'serverUsed' => 'setServerUsed', 'userData' => 'setUserData', 'hits' => 'setHits', - 'cursor' => 'setCursor' + 'cursor' => 'setCursor', ]; /** @@ -215,7 +215,7 @@ public static function openAPIFormats() 'serverUsed' => 'getServerUsed', 'userData' => 'getUserData', 'hits' => 'getHits', - 'cursor' => 'getCursor' + 'cursor' => 'getCursor', ]; /** @@ -259,7 +259,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -312,7 +311,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if (!is_null($this->container['aroundLatLng']) && !preg_match("/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/", $this->container['aroundLatLng'])) { + if (!is_null($this->container['aroundLatLng']) && !preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $this->container['aroundLatLng'])) { $invalidProperties[] = "invalid value for 'aroundLatLng', must be conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."; } @@ -349,6 +348,7 @@ public function listInvalidProperties() if ($this->container['cursor'] === null) { $invalidProperties[] = "'cursor' can't be null"; } + return $invalidProperties; } @@ -363,7 +363,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets abTestID * @@ -377,7 +376,7 @@ public function getAbTestID() /** * Sets abTestID * - * @param int|null $abTestID If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID. + * @param int|null $abTestID if a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID * * @return self */ @@ -401,7 +400,7 @@ public function getAbTestVariantID() /** * Sets abTestVariantID * - * @param int|null $abTestVariantID If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used. + * @param int|null $abTestVariantID if a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used * * @return self */ @@ -425,14 +424,13 @@ public function getAroundLatLng() /** * Sets aroundLatLng * - * @param string|null $aroundLatLng The computed geo location. + * @param string|null $aroundLatLng the computed geo location * * @return self */ public function setAroundLatLng($aroundLatLng) { - - if (!is_null($aroundLatLng) && (!preg_match("/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/", $aroundLatLng))) { + if (!is_null($aroundLatLng) && (!preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $aroundLatLng))) { throw new \InvalidArgumentException("invalid value for $aroundLatLng when calling BrowseResponse., must conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."); } @@ -478,7 +476,7 @@ public function getExhaustiveFacetsCount() /** * Sets exhaustiveFacetsCount * - * @param bool|null $exhaustiveFacetsCount Whether the facet count is exhaustive or approximate. + * @param bool|null $exhaustiveFacetsCount whether the facet count is exhaustive or approximate * * @return self */ @@ -550,7 +548,7 @@ public function getFacets() /** * Sets facets * - * @param array>|null $facets A mapping of each facet name to the corresponding facet counts. + * @param array>|null $facets a mapping of each facet name to the corresponding facet counts * * @return self */ @@ -574,7 +572,7 @@ public function getFacetsStats() /** * Sets facetsStats * - * @param array|null $facetsStats Statistics for numerical facets. + * @param array|null $facetsStats statistics for numerical facets * * @return self */ @@ -598,7 +596,7 @@ public function getHitsPerPage() /** * Sets hitsPerPage * - * @param int $hitsPerPage Set the number of hits per page. + * @param int $hitsPerPage set the number of hits per page * * @return self */ @@ -622,7 +620,7 @@ public function getIndex() /** * Sets index * - * @param string|null $index Index name used for the query. + * @param string|null $index index name used for the query * * @return self */ @@ -670,7 +668,7 @@ public function getMessage() /** * Sets message * - * @param string|null $message Used to return warnings about the query. + * @param string|null $message used to return warnings about the query * * @return self */ @@ -694,7 +692,7 @@ public function getNbHits() /** * Sets nbHits * - * @param int $nbHits Number of hits that the search query matched. + * @param int $nbHits number of hits that the search query matched * * @return self */ @@ -766,7 +764,7 @@ public function getPage() /** * Sets page * - * @param int $page Specify the page to retrieve. + * @param int $page specify the page to retrieve * * @return self */ @@ -790,7 +788,7 @@ public function getParams() /** * Sets params * - * @param string $params A url-encoded string of all search parameters. + * @param string $params a url-encoded string of all search parameters * * @return self */ @@ -814,7 +812,7 @@ public function getParsedQuery() /** * Sets parsedQuery * - * @param string|null $parsedQuery The query string that will be searched, after normalization. + * @param string|null $parsedQuery the query string that will be searched, after normalization * * @return self */ @@ -838,7 +836,7 @@ public function getProcessingTimeMS() /** * Sets processingTimeMS * - * @param int $processingTimeMS Time the server took to process the request, in milliseconds. + * @param int $processingTimeMS time the server took to process the request, in milliseconds * * @return self */ @@ -862,7 +860,7 @@ public function getQuery() /** * Sets query * - * @param string $query The text to search in the index. + * @param string $query the text to search in the index * * @return self */ @@ -886,7 +884,7 @@ public function getQueryAfterRemoval() /** * Sets queryAfterRemoval * - * @param string|null $queryAfterRemoval A markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set. + * @param string|null $queryAfterRemoval a markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set * * @return self */ @@ -910,7 +908,7 @@ public function getServerUsed() /** * Sets serverUsed * - * @param string|null $serverUsed Actual host name of the server that processed the request. + * @param string|null $serverUsed actual host name of the server that processed the request * * @return self */ @@ -934,7 +932,7 @@ public function getUserData() /** * Sets userData * - * @param object|null $userData Lets you store custom data in your indices. + * @param object|null $userData lets you store custom data in your indices * * @return self */ @@ -995,9 +993,9 @@ public function setCursor($cursor) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -1007,7 +1005,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -1036,7 +1034,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -1047,14 +1045,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -1081,4 +1080,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/BuildInOperation.php b/clients/algoliasearch-client-php/lib/Model/BuildInOperation.php index 3812d64acb..70680634bc 100644 --- a/clients/algoliasearch-client-php/lib/Model/BuildInOperation.php +++ b/clients/algoliasearch-client-php/lib/Model/BuildInOperation.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * BuildInOperation Class Doc Comment * * @category Class * @description To update an attribute without pushing the entire record, you can use these built-in operations. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -33,7 +34,7 @@ class BuildInOperation implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'operation' => 'string', - 'value' => 'string' + 'value' => 'string', ]; /** @@ -45,7 +46,7 @@ class BuildInOperation implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'operation' => null, - 'value' => null + 'value' => null, ]; /** @@ -76,7 +77,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'operation' => '_operation', - 'value' => 'value' + 'value' => 'value', ]; /** @@ -86,7 +87,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'operation' => 'setOperation', - 'value' => 'setValue' + 'value' => 'setValue', ]; /** @@ -96,7 +97,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'operation' => 'getOperation', - 'value' => 'getValue' + 'value' => 'getValue', ]; /** @@ -209,6 +210,7 @@ public function listInvalidProperties() if ($this->container['value'] === null) { $invalidProperties[] = "'value' can't be null"; } + return $invalidProperties; } @@ -223,7 +225,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets operation * @@ -237,7 +238,7 @@ public function getOperation() /** * Sets operation * - * @param string $operation The operation to apply on the attribute. + * @param string $operation the operation to apply on the attribute * * @return self */ @@ -271,7 +272,7 @@ public function getValue() /** * Sets value * - * @param string $value the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove. + * @param string $value the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove * * @return self */ @@ -284,9 +285,9 @@ public function setValue($value) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -296,7 +297,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -325,7 +326,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -336,14 +337,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -370,4 +372,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/Condition.php b/clients/algoliasearch-client-php/lib/Model/Condition.php index 56abe62cb6..21687ba4c1 100644 --- a/clients/algoliasearch-client-php/lib/Model/Condition.php +++ b/clients/algoliasearch-client-php/lib/Model/Condition.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * Condition Class Doc Comment @@ -34,7 +34,7 @@ class Condition implements ModelInterface, ArrayAccess, \JsonSerializable 'pattern' => 'string', 'anchoring' => '\Algolia\AlgoliaSearch\Model\Anchoring', 'alternatives' => 'bool', - 'context' => 'string' + 'context' => 'string', ]; /** @@ -48,7 +48,7 @@ class Condition implements ModelInterface, ArrayAccess, \JsonSerializable 'pattern' => null, 'anchoring' => null, 'alternatives' => null, - 'context' => null + 'context' => null, ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() 'pattern' => 'pattern', 'anchoring' => 'anchoring', 'alternatives' => 'alternatives', - 'context' => 'context' + 'context' => 'context', ]; /** @@ -93,7 +93,7 @@ public static function openAPIFormats() 'pattern' => 'setPattern', 'anchoring' => 'setAnchoring', 'alternatives' => 'setAlternatives', - 'context' => 'setContext' + 'context' => 'setContext', ]; /** @@ -105,7 +105,7 @@ public static function openAPIFormats() 'pattern' => 'getPattern', 'anchoring' => 'getAnchoring', 'alternatives' => 'getAlternatives', - 'context' => 'getContext' + 'context' => 'getContext', ]; /** @@ -149,7 +149,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -194,7 +193,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets pattern * @@ -256,7 +254,7 @@ public function getAlternatives() /** * Sets alternatives * - * @param bool|null $alternatives Whether the pattern matches on plurals, synonyms, and typos. + * @param bool|null $alternatives whether the pattern matches on plurals, synonyms, and typos * * @return self */ @@ -280,7 +278,7 @@ public function getContext() /** * Sets context * - * @param string|null $context Rule context format: [A-Za-z0-9_-]+). + * @param string|null $context rule context format: [A-Za-z0-9_-]+) * * @return self */ @@ -293,9 +291,9 @@ public function setContext($context) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -305,7 +303,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -334,7 +332,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -345,14 +343,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -379,4 +378,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/Consequence.php b/clients/algoliasearch-client-php/lib/Model/Consequence.php index 5399db7de5..36f7608c55 100644 --- a/clients/algoliasearch-client-php/lib/Model/Consequence.php +++ b/clients/algoliasearch-client-php/lib/Model/Consequence.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * Consequence Class Doc Comment * * @category Class * @description Consequence of the Rule. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -36,7 +37,7 @@ class Consequence implements ModelInterface, ArrayAccess, \JsonSerializable 'promote' => '\Algolia\AlgoliaSearch\Model\Promote[]', 'filterPromotes' => 'bool', 'hide' => '\Algolia\AlgoliaSearch\Model\ConsequenceHide[]', - 'userData' => 'object' + 'userData' => 'object', ]; /** @@ -51,7 +52,7 @@ class Consequence implements ModelInterface, ArrayAccess, \JsonSerializable 'promote' => null, 'filterPromotes' => null, 'hide' => null, - 'userData' => null + 'userData' => null, ]; /** @@ -85,7 +86,7 @@ public static function openAPIFormats() 'promote' => 'promote', 'filterPromotes' => 'filterPromotes', 'hide' => 'hide', - 'userData' => 'userData' + 'userData' => 'userData', ]; /** @@ -98,7 +99,7 @@ public static function openAPIFormats() 'promote' => 'setPromote', 'filterPromotes' => 'setFilterPromotes', 'hide' => 'setHide', - 'userData' => 'setUserData' + 'userData' => 'setUserData', ]; /** @@ -111,7 +112,7 @@ public static function openAPIFormats() 'promote' => 'getPromote', 'filterPromotes' => 'getFilterPromotes', 'hide' => 'getHide', - 'userData' => 'getUserData' + 'userData' => 'getUserData', ]; /** @@ -155,7 +156,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -201,7 +201,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets params * @@ -239,7 +238,7 @@ public function getPromote() /** * Sets promote * - * @param \Algolia\AlgoliaSearch\Model\Promote[]|null $promote Objects to promote as hits. + * @param \Algolia\AlgoliaSearch\Model\Promote[]|null $promote objects to promote as hits * * @return self */ @@ -324,9 +323,9 @@ public function setUserData($userData) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -336,7 +335,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -365,7 +364,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -376,14 +375,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -410,4 +410,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/ConsequenceHide.php b/clients/algoliasearch-client-php/lib/Model/ConsequenceHide.php index 35fcc49b7b..439670db5c 100644 --- a/clients/algoliasearch-client-php/lib/Model/ConsequenceHide.php +++ b/clients/algoliasearch-client-php/lib/Model/ConsequenceHide.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * ConsequenceHide Class Doc Comment * * @category Class * @description Unique identifier of the object to hide. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -32,7 +33,7 @@ class ConsequenceHide implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'objectID' => 'string' + 'objectID' => 'string', ]; /** @@ -43,7 +44,7 @@ class ConsequenceHide implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'objectID' => null + 'objectID' => null, ]; /** @@ -73,7 +74,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'objectID' => 'objectID' + 'objectID' => 'objectID', ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'objectID' => 'setObjectID' + 'objectID' => 'setObjectID', ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'objectID' => 'getObjectID' + 'objectID' => 'getObjectID', ]; /** @@ -135,7 +136,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -166,6 +166,7 @@ public function listInvalidProperties() if ($this->container['objectID'] === null) { $invalidProperties[] = "'objectID' can't be null"; } + return $invalidProperties; } @@ -180,7 +181,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets objectID * @@ -194,7 +194,7 @@ public function getObjectID() /** * Sets objectID * - * @param string $objectID Unique identifier of the object. + * @param string $objectID unique identifier of the object * * @return self */ @@ -207,9 +207,9 @@ public function setObjectID($objectID) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -219,7 +219,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -248,7 +248,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -259,14 +259,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -293,4 +294,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/ConsequenceParams.php b/clients/algoliasearch-client-php/lib/Model/ConsequenceParams.php index 1d45a92a8a..43312a1303 100644 --- a/clients/algoliasearch-client-php/lib/Model/ConsequenceParams.php +++ b/clients/algoliasearch-client-php/lib/Model/ConsequenceParams.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * ConsequenceParams Class Doc Comment @@ -109,7 +109,7 @@ class ConsequenceParams implements ModelInterface, ArrayAccess, \JsonSerializabl 'responseFields' => 'string[]', 'maxFacetHits' => 'int', 'attributeCriteriaComputedByMinProximity' => 'bool', - 'renderingContent' => 'object' + 'renderingContent' => 'object', ]; /** @@ -198,7 +198,7 @@ class ConsequenceParams implements ModelInterface, ArrayAccess, \JsonSerializabl 'responseFields' => null, 'maxFacetHits' => null, 'attributeCriteriaComputedByMinProximity' => null, - 'renderingContent' => null + 'renderingContent' => null, ]; /** @@ -306,7 +306,7 @@ public static function openAPIFormats() 'responseFields' => 'responseFields', 'maxFacetHits' => 'maxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'attributeCriteriaComputedByMinProximity', - 'renderingContent' => 'renderingContent' + 'renderingContent' => 'renderingContent', ]; /** @@ -393,7 +393,7 @@ public static function openAPIFormats() 'responseFields' => 'setResponseFields', 'maxFacetHits' => 'setMaxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'setAttributeCriteriaComputedByMinProximity', - 'renderingContent' => 'setRenderingContent' + 'renderingContent' => 'setRenderingContent', ]; /** @@ -480,7 +480,7 @@ public static function openAPIFormats() 'responseFields' => 'getResponseFields', 'maxFacetHits' => 'getMaxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'getAttributeCriteriaComputedByMinProximity', - 'renderingContent' => 'getRenderingContent' + 'renderingContent' => 'getRenderingContent', ]; /** @@ -816,7 +816,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets query * @@ -830,7 +829,7 @@ public function getQuery() /** * Sets query * - * @param string|null $query Query string. + * @param string|null $query query string * * @return self */ @@ -854,7 +853,7 @@ public function getAutomaticFacetFilters() /** * Sets automaticFacetFilters * - * @param \Algolia\AlgoliaSearch\Model\AutomaticFacetFilter[]|null $automaticFacetFilters Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + * @param \Algolia\AlgoliaSearch\Model\AutomaticFacetFilter[]|null $automaticFacetFilters names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern * * @return self */ @@ -878,7 +877,7 @@ public function getAutomaticOptionalFacetFilters() /** * Sets automaticOptionalFacetFilters * - * @param \Algolia\AlgoliaSearch\Model\AutomaticFacetFilter[]|null $automaticOptionalFacetFilters Same syntax as automaticFacetFilters, but the engine treats the filters as optional. + * @param \Algolia\AlgoliaSearch\Model\AutomaticFacetFilter[]|null $automaticOptionalFacetFilters same syntax as automaticFacetFilters, but the engine treats the filters as optional * * @return self */ @@ -902,7 +901,7 @@ public function getSimilarQuery() /** * Sets similarQuery * - * @param string|null $similarQuery Overrides the query parameter and performs a more generic search that can be used to find \"similar\" results. + * @param string|null $similarQuery overrides the query parameter and performs a more generic search that can be used to find \"similar\" results * * @return self */ @@ -926,7 +925,7 @@ public function getFilters() /** * Sets filters * - * @param string|null $filters Filter the query with numeric, facet and/or tag filters. + * @param string|null $filters filter the query with numeric, facet and/or tag filters * * @return self */ @@ -950,7 +949,7 @@ public function getFacetFilters() /** * Sets facetFilters * - * @param string[]|null $facetFilters Filter hits by facet value. + * @param string[]|null $facetFilters filter hits by facet value * * @return self */ @@ -974,7 +973,7 @@ public function getOptionalFilters() /** * Sets optionalFilters * - * @param string[]|null $optionalFilters Create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter. + * @param string[]|null $optionalFilters create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter * * @return self */ @@ -998,7 +997,7 @@ public function getNumericFilters() /** * Sets numericFilters * - * @param string[]|null $numericFilters Filter on numeric attributes. + * @param string[]|null $numericFilters filter on numeric attributes * * @return self */ @@ -1022,7 +1021,7 @@ public function getTagFilters() /** * Sets tagFilters * - * @param string[]|null $tagFilters Filter hits by tags. + * @param string[]|null $tagFilters filter hits by tags * * @return self */ @@ -1046,7 +1045,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores * - * @param bool|null $sumOrFiltersScores Determines how to calculate the total score for filtering. + * @param bool|null $sumOrFiltersScores determines how to calculate the total score for filtering * * @return self */ @@ -1070,7 +1069,7 @@ public function getFacets() /** * Sets facets * - * @param string[]|null $facets Retrieve facets and their facet values. + * @param string[]|null $facets retrieve facets and their facet values * * @return self */ @@ -1094,7 +1093,7 @@ public function getMaxValuesPerFacet() /** * Sets maxValuesPerFacet * - * @param int|null $maxValuesPerFacet Maximum number of facet values to return for each facet during a regular search. + * @param int|null $maxValuesPerFacet maximum number of facet values to return for each facet during a regular search * * @return self */ @@ -1118,7 +1117,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct * - * @param bool|null $facetingAfterDistinct Force faceting to be applied after de-duplication (via the Distinct setting). + * @param bool|null $facetingAfterDistinct force faceting to be applied after de-duplication (via the Distinct setting) * * @return self */ @@ -1142,7 +1141,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy * - * @param string|null $sortFacetValuesBy Controls how facet values are fetched. + * @param string|null $sortFacetValuesBy controls how facet values are fetched * * @return self */ @@ -1166,7 +1165,7 @@ public function getPage() /** * Sets page * - * @param int|null $page Specify the page to retrieve. + * @param int|null $page specify the page to retrieve * * @return self */ @@ -1190,7 +1189,7 @@ public function getOffset() /** * Sets offset * - * @param int|null $offset Specify the offset of the first hit to return. + * @param int|null $offset specify the offset of the first hit to return * * @return self */ @@ -1214,13 +1213,12 @@ public function getLength() /** * Sets length * - * @param int|null $length Set the number of hits to retrieve (used only with offset). + * @param int|null $length set the number of hits to retrieve (used only with offset) * * @return self */ public function setLength($length) { - if (!is_null($length) && ($length > 1000)) { throw new \InvalidArgumentException('invalid value for $length when calling ConsequenceParams., must be smaller than or equal to 1000.'); } @@ -1246,7 +1244,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng * - * @param string|null $aroundLatLng Search for entries around a central geolocation, enabling a geo search within a circular area. + * @param string|null $aroundLatLng search for entries around a central geolocation, enabling a geo search within a circular area * * @return self */ @@ -1270,7 +1268,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP * - * @param bool|null $aroundLatLngViaIP Search for entries around a given location automatically computed from the requester's IP address. + * @param bool|null $aroundLatLngViaIP search for entries around a given location automatically computed from the requester's IP address * * @return self */ @@ -1294,7 +1292,7 @@ public function getAroundRadius() /** * Sets aroundRadius * - * @param OneOfIntegerString|null $aroundRadius Define the maximum radius for a geo search (in meters). + * @param OneOfIntegerString|null $aroundRadius define the maximum radius for a geo search (in meters) * * @return self */ @@ -1318,7 +1316,7 @@ public function getAroundPrecision() /** * Sets aroundPrecision * - * @param int|null $aroundPrecision Precision of geo search (in meters), to add grouping by geo location to the ranking formula. + * @param int|null $aroundPrecision precision of geo search (in meters), to add grouping by geo location to the ranking formula * * @return self */ @@ -1342,13 +1340,12 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius * - * @param int|null $minimumAroundRadius Minimum radius (in meters) used for a geo search when aroundRadius is not set. + * @param int|null $minimumAroundRadius minimum radius (in meters) used for a geo search when aroundRadius is not set * * @return self */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling ConsequenceParams., must be bigger than or equal to 1.'); } @@ -1371,7 +1368,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox * - * @param float[]|null $insideBoundingBox Search inside a rectangular area (in geo coordinates). + * @param float[]|null $insideBoundingBox search inside a rectangular area (in geo coordinates) * * @return self */ @@ -1395,7 +1392,7 @@ public function getInsidePolygon() /** * Sets insidePolygon * - * @param float[]|null $insidePolygon Search inside a polygon (in geo coordinates). + * @param float[]|null $insidePolygon search inside a polygon (in geo coordinates) * * @return self */ @@ -1443,7 +1440,7 @@ public function getRuleContexts() /** * Sets ruleContexts * - * @param string[]|null $ruleContexts Enables contextual rules. + * @param string[]|null $ruleContexts enables contextual rules * * @return self */ @@ -1467,7 +1464,7 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact * - * @param int|null $personalizationImpact Define the impact of the Personalization feature. + * @param int|null $personalizationImpact define the impact of the Personalization feature * * @return self */ @@ -1491,7 +1488,7 @@ public function getUserToken() /** * Sets userToken * - * @param string|null $userToken Associates a certain user token with the current search. + * @param string|null $userToken associates a certain user token with the current search * * @return self */ @@ -1515,7 +1512,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo * - * @param bool|null $getRankingInfo Retrieve detailed ranking information. + * @param bool|null $getRankingInfo retrieve detailed ranking information * * @return self */ @@ -1539,7 +1536,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics * - * @param bool|null $clickAnalytics Enable the Click Analytics feature. + * @param bool|null $clickAnalytics enable the Click Analytics feature * * @return self */ @@ -1563,7 +1560,7 @@ public function getAnalytics() /** * Sets analytics * - * @param bool|null $analytics Whether the current query will be taken into account in the Analytics. + * @param bool|null $analytics whether the current query will be taken into account in the Analytics * * @return self */ @@ -1587,7 +1584,7 @@ public function getAnalyticsTags() /** * Sets analyticsTags * - * @param string[]|null $analyticsTags List of tags to apply to the query for analytics purposes. + * @param string[]|null $analyticsTags list of tags to apply to the query for analytics purposes * * @return self */ @@ -1611,7 +1608,7 @@ public function getPercentileComputation() /** * Sets percentileComputation * - * @param bool|null $percentileComputation Whether to include or exclude a query from the processing-time percentile computation. + * @param bool|null $percentileComputation whether to include or exclude a query from the processing-time percentile computation * * @return self */ @@ -1635,7 +1632,7 @@ public function getEnableABTest() /** * Sets enableABTest * - * @param bool|null $enableABTest Whether this search should participate in running AB tests. + * @param bool|null $enableABTest whether this search should participate in running AB tests * * @return self */ @@ -1659,7 +1656,7 @@ public function getEnableReRanking() /** * Sets enableReRanking * - * @param bool|null $enableReRanking Whether this search should use AI Re-Ranking. + * @param bool|null $enableReRanking whether this search should use AI Re-Ranking * * @return self */ @@ -1683,7 +1680,7 @@ public function getSearchableAttributes() /** * Sets searchableAttributes * - * @param string[]|null $searchableAttributes The complete list of attributes used for searching. + * @param string[]|null $searchableAttributes the complete list of attributes used for searching * * @return self */ @@ -1707,7 +1704,7 @@ public function getAttributesForFaceting() /** * Sets attributesForFaceting * - * @param string[]|null $attributesForFaceting The complete list of attributes that will be used for faceting. + * @param string[]|null $attributesForFaceting the complete list of attributes that will be used for faceting * * @return self */ @@ -1731,7 +1728,7 @@ public function getUnretrievableAttributes() /** * Sets unretrievableAttributes * - * @param string[]|null $unretrievableAttributes List of attributes that can't be retrieved at query time. + * @param string[]|null $unretrievableAttributes list of attributes that can't be retrieved at query time * * @return self */ @@ -1755,7 +1752,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve * - * @param string[]|null $attributesToRetrieve This parameter controls which attributes to retrieve and which not to retrieve. + * @param string[]|null $attributesToRetrieve this parameter controls which attributes to retrieve and which not to retrieve * * @return self */ @@ -1779,7 +1776,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes * - * @param string[]|null $restrictSearchableAttributes Restricts a given query to look in only a subset of your searchable attributes. + * @param string[]|null $restrictSearchableAttributes restricts a given query to look in only a subset of your searchable attributes * * @return self */ @@ -1803,7 +1800,7 @@ public function getRanking() /** * Sets ranking * - * @param string[]|null $ranking Controls how Algolia should sort your results. + * @param string[]|null $ranking controls how Algolia should sort your results * * @return self */ @@ -1827,7 +1824,7 @@ public function getCustomRanking() /** * Sets customRanking * - * @param string[]|null $customRanking Specifies the custom ranking criterion. + * @param string[]|null $customRanking specifies the custom ranking criterion * * @return self */ @@ -1851,7 +1848,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness * - * @param int|null $relevancyStrictness Controls the relevancy threshold below which less relevant results aren't included in the results. + * @param int|null $relevancyStrictness controls the relevancy threshold below which less relevant results aren't included in the results * * @return self */ @@ -1875,7 +1872,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight * - * @param string[]|null $attributesToHighlight List of attributes to highlight. + * @param string[]|null $attributesToHighlight list of attributes to highlight * * @return self */ @@ -1899,7 +1896,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet * - * @param string[]|null $attributesToSnippet List of attributes to snippet, with an optional maximum number of words to snippet. + * @param string[]|null $attributesToSnippet list of attributes to snippet, with an optional maximum number of words to snippet * * @return self */ @@ -1923,7 +1920,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag * - * @param string|null $highlightPreTag The HTML string to insert before the highlighted parts in all highlight and snippet results. + * @param string|null $highlightPreTag the HTML string to insert before the highlighted parts in all highlight and snippet results * * @return self */ @@ -1947,7 +1944,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag * - * @param string|null $highlightPostTag The HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param string|null $highlightPostTag the HTML string to insert after the highlighted parts in all highlight and snippet results * * @return self */ @@ -1971,7 +1968,7 @@ public function getSnippetEllipsisText() /** * Sets snippetEllipsisText * - * @param string|null $snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. + * @param string|null $snippetEllipsisText string used as an ellipsis indicator when a snippet is truncated * * @return self */ @@ -1995,7 +1992,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays * - * @param bool|null $restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param bool|null $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query * * @return self */ @@ -2019,7 +2016,7 @@ public function getHitsPerPage() /** * Sets hitsPerPage * - * @param int|null $hitsPerPage Set the number of hits per page. + * @param int|null $hitsPerPage set the number of hits per page * * @return self */ @@ -2043,7 +2040,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo * - * @param int|null $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with 1 typo. + * @param int|null $minWordSizefor1Typo minimum number of characters a word in the query string must contain to accept matches with 1 typo * * @return self */ @@ -2067,7 +2064,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos * - * @param int|null $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with 2 typos. + * @param int|null $minWordSizefor2Typos minimum number of characters a word in the query string must contain to accept matches with 2 typos * * @return self */ @@ -2091,7 +2088,7 @@ public function getTypoTolerance() /** * Sets typoTolerance * - * @param string|null $typoTolerance Controls whether typo tolerance is enabled and how it is applied. + * @param string|null $typoTolerance controls whether typo tolerance is enabled and how it is applied * * @return self */ @@ -2125,7 +2122,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens * - * @param bool|null $allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * @param bool|null $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string * * @return self */ @@ -2149,7 +2146,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes * - * @param string[]|null $disableTypoToleranceOnAttributes List of attributes on which you want to disable typo tolerance. + * @param string[]|null $disableTypoToleranceOnAttributes list of attributes on which you want to disable typo tolerance * * @return self */ @@ -2173,7 +2170,7 @@ public function getSeparatorsToIndex() /** * Sets separatorsToIndex * - * @param string|null $separatorsToIndex Control which separators are indexed. + * @param string|null $separatorsToIndex control which separators are indexed * * @return self */ @@ -2197,7 +2194,7 @@ public function getIgnorePlurals() /** * Sets ignorePlurals * - * @param string|null $ignorePlurals Treats singular, plurals, and other forms of declensions as matching terms. + * @param string|null $ignorePlurals treats singular, plurals, and other forms of declensions as matching terms * * @return self */ @@ -2221,7 +2218,7 @@ public function getRemoveStopWords() /** * Sets removeStopWords * - * @param string|null $removeStopWords Removes stop (common) words from the query before executing it. + * @param string|null $removeStopWords removes stop (common) words from the query before executing it * * @return self */ @@ -2245,7 +2242,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters * - * @param string|null $keepDiacriticsOnCharacters List of characters that the engine shouldn't automatically normalize. + * @param string|null $keepDiacriticsOnCharacters list of characters that the engine shouldn't automatically normalize * * @return self */ @@ -2269,7 +2266,7 @@ public function getQueryLanguages() /** * Sets queryLanguages * - * @param string[]|null $queryLanguages Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection. + * @param string[]|null $queryLanguages sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection * * @return self */ @@ -2293,7 +2290,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery * - * @param bool|null $decompoundQuery Splits compound words into their composing atoms in the query. + * @param bool|null $decompoundQuery splits compound words into their composing atoms in the query * * @return self */ @@ -2317,7 +2314,7 @@ public function getEnableRules() /** * Sets enableRules * - * @param bool|null $enableRules Whether Rules should be globally enabled. + * @param bool|null $enableRules whether Rules should be globally enabled * * @return self */ @@ -2341,7 +2338,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization * - * @param bool|null $enablePersonalization Enable the Personalization feature. + * @param bool|null $enablePersonalization enable the Personalization feature * * @return self */ @@ -2365,7 +2362,7 @@ public function getQueryType() /** * Sets queryType * - * @param string|null $queryType Controls if and how query words are interpreted as prefixes. + * @param string|null $queryType controls if and how query words are interpreted as prefixes * * @return self */ @@ -2399,7 +2396,7 @@ public function getRemoveWordsIfNoResults() /** * Sets removeWordsIfNoResults * - * @param string|null $removeWordsIfNoResults Selects a strategy to remove words from the query when it doesn't match any hits. + * @param string|null $removeWordsIfNoResults selects a strategy to remove words from the query when it doesn't match any hits * * @return self */ @@ -2433,7 +2430,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax * - * @param bool|null $advancedSyntax Enables the advanced query syntax. + * @param bool|null $advancedSyntax enables the advanced query syntax * * @return self */ @@ -2457,7 +2454,7 @@ public function getOptionalWords() /** * Sets optionalWords * - * @param string[]|null $optionalWords A list of words that should be considered as optional when found in the query. + * @param string[]|null $optionalWords a list of words that should be considered as optional when found in the query * * @return self */ @@ -2481,7 +2478,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes * - * @param string[]|null $disableExactOnAttributes List of attributes on which you want to disable the exact ranking criterion. + * @param string[]|null $disableExactOnAttributes list of attributes on which you want to disable the exact ranking criterion * * @return self */ @@ -2505,7 +2502,7 @@ public function getExactOnSingleWordQuery() /** * Sets exactOnSingleWordQuery * - * @param string|null $exactOnSingleWordQuery Controls how the exact ranking criterion is computed when the query contains only one word. + * @param string|null $exactOnSingleWordQuery controls how the exact ranking criterion is computed when the query contains only one word * * @return self */ @@ -2539,7 +2536,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact * - * @param string[]|null $alternativesAsExact List of alternatives that should be considered an exact match by the exact ranking criterion. + * @param string[]|null $alternativesAsExact list of alternatives that should be considered an exact match by the exact ranking criterion * * @return self */ @@ -2572,7 +2569,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures * - * @param string[]|null $advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when ‘advancedSyntax' is enabled. + * @param string[]|null $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when ‘advancedSyntax' is enabled * * @return self */ @@ -2605,13 +2602,12 @@ public function getDistinct() /** * Sets distinct * - * @param int|null $distinct Enables de-duplication or grouping of results. + * @param int|null $distinct enables de-duplication or grouping of results * * @return self */ public function setDistinct($distinct) { - if (!is_null($distinct) && ($distinct > 4)) { throw new \InvalidArgumentException('invalid value for $distinct when calling ConsequenceParams., must be smaller than or equal to 4.'); } @@ -2637,7 +2633,7 @@ public function getSynonyms() /** * Sets synonyms * - * @param bool|null $synonyms Whether to take into account an index's synonyms for a particular search. + * @param bool|null $synonyms whether to take into account an index's synonyms for a particular search * * @return self */ @@ -2661,7 +2657,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight * - * @param bool|null $replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * @param bool|null $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself * * @return self */ @@ -2685,13 +2681,12 @@ public function getMinProximity() /** * Sets minProximity * - * @param int|null $minProximity Precision of the proximity ranking criterion. + * @param int|null $minProximity precision of the proximity ranking criterion * * @return self */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { throw new \InvalidArgumentException('invalid value for $minProximity when calling ConsequenceParams., must be smaller than or equal to 7.'); } @@ -2747,7 +2742,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling ConsequenceParams., must be smaller than or equal to 100.'); } @@ -2770,7 +2764,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity * - * @param bool|null $attributeCriteriaComputedByMinProximity When attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage. + * @param bool|null $attributeCriteriaComputedByMinProximity when attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage * * @return self */ @@ -2807,9 +2801,9 @@ public function setRenderingContent($renderingContent) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -2819,7 +2813,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -2848,7 +2842,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -2859,14 +2853,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -2893,4 +2888,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/CreatedAtObject.php b/clients/algoliasearch-client-php/lib/Model/CreatedAtObject.php index 0aa84a34c1..25a3783669 100644 --- a/clients/algoliasearch-client-php/lib/Model/CreatedAtObject.php +++ b/clients/algoliasearch-client-php/lib/Model/CreatedAtObject.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * CreatedAtObject Class Doc Comment @@ -31,7 +31,7 @@ class CreatedAtObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'createdAt' => '\DateTime' + 'createdAt' => '\DateTime', ]; /** @@ -42,7 +42,7 @@ class CreatedAtObject implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'createdAt' => 'date-time' + 'createdAt' => 'date-time', ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'createdAt' => 'createdAt' + 'createdAt' => 'createdAt', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'createdAt' => 'setCreatedAt' + 'createdAt' => 'setCreatedAt', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'createdAt' => 'getCreatedAt' + 'createdAt' => 'getCreatedAt', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -165,6 +164,7 @@ public function listInvalidProperties() if ($this->container['createdAt'] === null) { $invalidProperties[] = "'createdAt' can't be null"; } + return $invalidProperties; } @@ -179,7 +179,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets createdAt * @@ -193,7 +192,7 @@ public function getCreatedAt() /** * Sets createdAt * - * @param \DateTime $createdAt Date of creation (ISO-8601 format). + * @param \DateTime $createdAt date of creation (ISO-8601 format) * * @return self */ @@ -206,9 +205,9 @@ public function setCreatedAt($createdAt) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -218,7 +217,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -247,7 +246,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -258,14 +257,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -292,4 +292,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/CreatedAtResponse.php b/clients/algoliasearch-client-php/lib/Model/CreatedAtResponse.php index 315a5ae358..518f5e1dd9 100644 --- a/clients/algoliasearch-client-php/lib/Model/CreatedAtResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/CreatedAtResponse.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * CreatedAtResponse Class Doc Comment * * @category Class * @description The response with a createdAt timestamp. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -32,7 +33,7 @@ class CreatedAtResponse implements ModelInterface, ArrayAccess, \JsonSerializabl * @var string[] */ protected static $openAPITypes = [ - 'createdAt' => '\DateTime' + 'createdAt' => '\DateTime', ]; /** @@ -43,7 +44,7 @@ class CreatedAtResponse implements ModelInterface, ArrayAccess, \JsonSerializabl * @psalm-var array */ protected static $openAPIFormats = [ - 'createdAt' => 'date-time' + 'createdAt' => 'date-time', ]; /** @@ -73,7 +74,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'createdAt' => 'createdAt' + 'createdAt' => 'createdAt', ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'createdAt' => 'setCreatedAt' + 'createdAt' => 'setCreatedAt', ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'createdAt' => 'getCreatedAt' + 'createdAt' => 'getCreatedAt', ]; /** @@ -135,7 +136,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -166,6 +166,7 @@ public function listInvalidProperties() if ($this->container['createdAt'] === null) { $invalidProperties[] = "'createdAt' can't be null"; } + return $invalidProperties; } @@ -180,7 +181,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets createdAt * @@ -194,7 +194,7 @@ public function getCreatedAt() /** * Sets createdAt * - * @param \DateTime $createdAt Date of creation (ISO-8601 format). + * @param \DateTime $createdAt date of creation (ISO-8601 format) * * @return self */ @@ -207,9 +207,9 @@ public function setCreatedAt($createdAt) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -219,7 +219,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -248,7 +248,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -259,14 +259,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -293,4 +294,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/DeleteApiKeyResponse.php b/clients/algoliasearch-client-php/lib/Model/DeleteApiKeyResponse.php index 91a0261797..49799d84d4 100644 --- a/clients/algoliasearch-client-php/lib/Model/DeleteApiKeyResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/DeleteApiKeyResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * DeleteApiKeyResponse Class Doc Comment @@ -31,7 +31,7 @@ class DeleteApiKeyResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ - 'deletedAt' => '\DateTime' + 'deletedAt' => '\DateTime', ]; /** @@ -42,7 +42,7 @@ class DeleteApiKeyResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ - 'deletedAt' => 'date-time' + 'deletedAt' => 'date-time', ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'deletedAt' => 'deletedAt' + 'deletedAt' => 'deletedAt', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'deletedAt' => 'setDeletedAt' + 'deletedAt' => 'setDeletedAt', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'deletedAt' => 'getDeletedAt' + 'deletedAt' => 'getDeletedAt', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -165,6 +164,7 @@ public function listInvalidProperties() if ($this->container['deletedAt'] === null) { $invalidProperties[] = "'deletedAt' can't be null"; } + return $invalidProperties; } @@ -179,7 +179,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets deletedAt * @@ -193,7 +192,7 @@ public function getDeletedAt() /** * Sets deletedAt * - * @param \DateTime $deletedAt Date of deletion (ISO-8601 format). + * @param \DateTime $deletedAt date of deletion (ISO-8601 format) * * @return self */ @@ -206,9 +205,9 @@ public function setDeletedAt($deletedAt) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -218,7 +217,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -247,7 +246,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -258,14 +257,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -292,4 +292,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/DeleteSourceResponse.php b/clients/algoliasearch-client-php/lib/Model/DeleteSourceResponse.php index 0d93123442..ad6f17652f 100644 --- a/clients/algoliasearch-client-php/lib/Model/DeleteSourceResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/DeleteSourceResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * DeleteSourceResponse Class Doc Comment @@ -31,7 +31,7 @@ class DeleteSourceResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ - 'deletedAt' => '\DateTime' + 'deletedAt' => '\DateTime', ]; /** @@ -42,7 +42,7 @@ class DeleteSourceResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ - 'deletedAt' => 'date-time' + 'deletedAt' => 'date-time', ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'deletedAt' => 'deletedAt' + 'deletedAt' => 'deletedAt', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'deletedAt' => 'setDeletedAt' + 'deletedAt' => 'setDeletedAt', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'deletedAt' => 'getDeletedAt' + 'deletedAt' => 'getDeletedAt', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -165,6 +164,7 @@ public function listInvalidProperties() if ($this->container['deletedAt'] === null) { $invalidProperties[] = "'deletedAt' can't be null"; } + return $invalidProperties; } @@ -179,7 +179,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets deletedAt * @@ -193,7 +192,7 @@ public function getDeletedAt() /** * Sets deletedAt * - * @param \DateTime $deletedAt Date of deletion (ISO-8601 format). + * @param \DateTime $deletedAt date of deletion (ISO-8601 format) * * @return self */ @@ -206,9 +205,9 @@ public function setDeletedAt($deletedAt) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -218,7 +217,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -247,7 +246,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -258,14 +257,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -292,4 +292,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/DeletedAtResponse.php b/clients/algoliasearch-client-php/lib/Model/DeletedAtResponse.php index 7877e7405a..1101441536 100644 --- a/clients/algoliasearch-client-php/lib/Model/DeletedAtResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/DeletedAtResponse.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * DeletedAtResponse Class Doc Comment * * @category Class * @description The response with a taskID and a deletedAt timestamp. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -33,7 +34,7 @@ class DeletedAtResponse implements ModelInterface, ArrayAccess, \JsonSerializabl */ protected static $openAPITypes = [ 'taskID' => 'int', - 'deletedAt' => '\DateTime' + 'deletedAt' => '\DateTime', ]; /** @@ -45,7 +46,7 @@ class DeletedAtResponse implements ModelInterface, ArrayAccess, \JsonSerializabl */ protected static $openAPIFormats = [ 'taskID' => null, - 'deletedAt' => 'date-time' + 'deletedAt' => 'date-time', ]; /** @@ -76,7 +77,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'taskID' => 'taskID', - 'deletedAt' => 'deletedAt' + 'deletedAt' => 'deletedAt', ]; /** @@ -86,7 +87,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'taskID' => 'setTaskID', - 'deletedAt' => 'setDeletedAt' + 'deletedAt' => 'setDeletedAt', ]; /** @@ -96,7 +97,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'taskID' => 'getTaskID', - 'deletedAt' => 'getDeletedAt' + 'deletedAt' => 'getDeletedAt', ]; /** @@ -140,7 +141,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -175,6 +175,7 @@ public function listInvalidProperties() if ($this->container['deletedAt'] === null) { $invalidProperties[] = "'deletedAt' can't be null"; } + return $invalidProperties; } @@ -189,7 +190,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets taskID * @@ -203,7 +203,7 @@ public function getTaskID() /** * Sets taskID * - * @param int $taskID taskID of the indexing task to wait for. + * @param int $taskID taskID of the indexing task to wait for * * @return self */ @@ -227,7 +227,7 @@ public function getDeletedAt() /** * Sets deletedAt * - * @param \DateTime $deletedAt Date of deletion (ISO-8601 format). + * @param \DateTime $deletedAt date of deletion (ISO-8601 format) * * @return self */ @@ -240,9 +240,9 @@ public function setDeletedAt($deletedAt) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -252,7 +252,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -281,7 +281,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -292,14 +292,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -326,4 +327,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/DictionaryEntry.php b/clients/algoliasearch-client-php/lib/Model/DictionaryEntry.php index 5f82ce427d..bd1d2403d8 100644 --- a/clients/algoliasearch-client-php/lib/Model/DictionaryEntry.php +++ b/clients/algoliasearch-client-php/lib/Model/DictionaryEntry.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * DictionaryEntry Class Doc Comment * * @category Class * @description A dictionary entry. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -37,7 +38,7 @@ class DictionaryEntry implements ModelInterface, ArrayAccess, \JsonSerializable 'word' => 'string', 'words' => 'string[]', 'decomposition' => 'string[]', - 'state' => 'string' + 'state' => 'string', ]; /** @@ -53,7 +54,7 @@ class DictionaryEntry implements ModelInterface, ArrayAccess, \JsonSerializable 'word' => null, 'words' => null, 'decomposition' => null, - 'state' => null + 'state' => null, ]; /** @@ -88,7 +89,7 @@ public static function openAPIFormats() 'word' => 'word', 'words' => 'words', 'decomposition' => 'decomposition', - 'state' => 'state' + 'state' => 'state', ]; /** @@ -102,7 +103,7 @@ public static function openAPIFormats() 'word' => 'setWord', 'words' => 'setWords', 'decomposition' => 'setDecomposition', - 'state' => 'setState' + 'state' => 'setState', ]; /** @@ -116,7 +117,7 @@ public static function openAPIFormats() 'word' => 'getWord', 'words' => 'getWords', 'decomposition' => 'getDecomposition', - 'state' => 'getState' + 'state' => 'getState', ]; /** @@ -237,7 +238,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets objectID * @@ -251,7 +251,7 @@ public function getObjectID() /** * Sets objectID * - * @param string $objectID Unique identifier of the object. + * @param string $objectID unique identifier of the object * * @return self */ @@ -299,7 +299,7 @@ public function getWord() /** * Sets word * - * @param string|null $word The word of the dictionary entry. + * @param string|null $word the word of the dictionary entry * * @return self */ @@ -323,7 +323,7 @@ public function getWords() /** * Sets words * - * @param string[]|null $words The words of the dictionary entry. + * @param string[]|null $words the words of the dictionary entry * * @return self */ @@ -347,7 +347,7 @@ public function getDecomposition() /** * Sets decomposition * - * @param string[]|null $decomposition A decomposition of the word of the dictionary entry. + * @param string[]|null $decomposition a decomposition of the word of the dictionary entry * * @return self */ @@ -371,7 +371,7 @@ public function getState() /** * Sets state * - * @param string|null $state The state of the dictionary entry. + * @param string|null $state the state of the dictionary entry * * @return self */ @@ -394,9 +394,9 @@ public function setState($state) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -406,7 +406,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -435,7 +435,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -446,14 +446,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -480,4 +481,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/DictionaryLanguage.php b/clients/algoliasearch-client-php/lib/Model/DictionaryLanguage.php index fca61ce2e7..48dc0a82eb 100644 --- a/clients/algoliasearch-client-php/lib/Model/DictionaryLanguage.php +++ b/clients/algoliasearch-client-php/lib/Model/DictionaryLanguage.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * DictionaryLanguage Class Doc Comment * * @category Class * @description Custom entries for a dictionary + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -32,7 +33,7 @@ class DictionaryLanguage implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'nbCustomEntires' => 'int' + 'nbCustomEntires' => 'int', ]; /** @@ -43,7 +44,7 @@ class DictionaryLanguage implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'nbCustomEntires' => null + 'nbCustomEntires' => null, ]; /** @@ -73,7 +74,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'nbCustomEntires' => 'nbCustomEntires' + 'nbCustomEntires' => 'nbCustomEntires', ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'nbCustomEntires' => 'setNbCustomEntires' + 'nbCustomEntires' => 'setNbCustomEntires', ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'nbCustomEntires' => 'getNbCustomEntires' + 'nbCustomEntires' => 'getNbCustomEntires', ]; /** @@ -135,7 +136,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -177,7 +177,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets nbCustomEntires * @@ -204,9 +203,9 @@ public function setNbCustomEntires($nbCustomEntires) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -216,7 +215,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -245,7 +244,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -256,14 +255,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -290,4 +290,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/DictionarySettingsRequest.php b/clients/algoliasearch-client-php/lib/Model/DictionarySettingsRequest.php index 598f8285e6..3a1a076d6e 100644 --- a/clients/algoliasearch-client-php/lib/Model/DictionarySettingsRequest.php +++ b/clients/algoliasearch-client-php/lib/Model/DictionarySettingsRequest.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * DictionarySettingsRequest Class Doc Comment * * @category Class * @description Disable the builtin Algolia entries for a type of dictionary per language. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -32,7 +33,7 @@ class DictionarySettingsRequest implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $openAPITypes = [ - 'disableStandardEntries' => '\Algolia\AlgoliaSearch\Model\StandardEntries' + 'disableStandardEntries' => '\Algolia\AlgoliaSearch\Model\StandardEntries', ]; /** @@ -43,7 +44,7 @@ class DictionarySettingsRequest implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ - 'disableStandardEntries' => null + 'disableStandardEntries' => null, ]; /** @@ -73,7 +74,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'disableStandardEntries' => 'disableStandardEntries' + 'disableStandardEntries' => 'disableStandardEntries', ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'disableStandardEntries' => 'setDisableStandardEntries' + 'disableStandardEntries' => 'setDisableStandardEntries', ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'disableStandardEntries' => 'getDisableStandardEntries' + 'disableStandardEntries' => 'getDisableStandardEntries', ]; /** @@ -135,7 +136,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -166,6 +166,7 @@ public function listInvalidProperties() if ($this->container['disableStandardEntries'] === null) { $invalidProperties[] = "'disableStandardEntries' can't be null"; } + return $invalidProperties; } @@ -180,7 +181,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets disableStandardEntries * @@ -207,9 +207,9 @@ public function setDisableStandardEntries($disableStandardEntries) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -219,7 +219,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -248,7 +248,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -259,14 +259,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -293,4 +294,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/ErrorBase.php b/clients/algoliasearch-client-php/lib/Model/ErrorBase.php index 53696972f2..1bbea7821b 100644 --- a/clients/algoliasearch-client-php/lib/Model/ErrorBase.php +++ b/clients/algoliasearch-client-php/lib/Model/ErrorBase.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * ErrorBase Class Doc Comment * * @category Class * @description Error. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -32,7 +33,7 @@ class ErrorBase implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string' + 'message' => 'string', ]; /** @@ -43,7 +44,7 @@ class ErrorBase implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null + 'message' => null, ]; /** @@ -73,7 +74,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message' + 'message' => 'message', ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage' + 'message' => 'setMessage', ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage' + 'message' => 'getMessage', ]; /** @@ -135,7 +136,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -177,7 +177,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets message * @@ -204,9 +203,9 @@ public function setMessage($message) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -216,7 +215,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -245,7 +244,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -256,14 +255,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -290,4 +290,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/GetDictionarySettingsResponse.php b/clients/algoliasearch-client-php/lib/Model/GetDictionarySettingsResponse.php index d946c1d7b9..3a5bdc91d9 100644 --- a/clients/algoliasearch-client-php/lib/Model/GetDictionarySettingsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/GetDictionarySettingsResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * GetDictionarySettingsResponse Class Doc Comment @@ -31,7 +31,7 @@ class GetDictionarySettingsResponse implements ModelInterface, ArrayAccess, \Jso * @var string[] */ protected static $openAPITypes = [ - 'disableStandardEntries' => '\Algolia\AlgoliaSearch\Model\StandardEntries' + 'disableStandardEntries' => '\Algolia\AlgoliaSearch\Model\StandardEntries', ]; /** @@ -42,7 +42,7 @@ class GetDictionarySettingsResponse implements ModelInterface, ArrayAccess, \Jso * @psalm-var array */ protected static $openAPIFormats = [ - 'disableStandardEntries' => null + 'disableStandardEntries' => null, ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'disableStandardEntries' => 'disableStandardEntries' + 'disableStandardEntries' => 'disableStandardEntries', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'disableStandardEntries' => 'setDisableStandardEntries' + 'disableStandardEntries' => 'setDisableStandardEntries', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'disableStandardEntries' => 'getDisableStandardEntries' + 'disableStandardEntries' => 'getDisableStandardEntries', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -165,6 +164,7 @@ public function listInvalidProperties() if ($this->container['disableStandardEntries'] === null) { $invalidProperties[] = "'disableStandardEntries' can't be null"; } + return $invalidProperties; } @@ -179,7 +179,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets disableStandardEntries * @@ -206,9 +205,9 @@ public function setDisableStandardEntries($disableStandardEntries) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -218,7 +217,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -247,7 +246,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -258,14 +257,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -292,4 +292,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/GetLogsResponse.php b/clients/algoliasearch-client-php/lib/Model/GetLogsResponse.php index c2e0033e7d..ce4a52628a 100644 --- a/clients/algoliasearch-client-php/lib/Model/GetLogsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/GetLogsResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * GetLogsResponse Class Doc Comment @@ -31,7 +31,7 @@ class GetLogsResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'logs' => '\Algolia\AlgoliaSearch\Model\GetLogsResponseLogs[]' + 'logs' => '\Algolia\AlgoliaSearch\Model\GetLogsResponseLogs[]', ]; /** @@ -42,7 +42,7 @@ class GetLogsResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'logs' => null + 'logs' => null, ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'logs' => 'logs' + 'logs' => 'logs', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'logs' => 'setLogs' + 'logs' => 'setLogs', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'logs' => 'getLogs' + 'logs' => 'getLogs', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -165,6 +164,7 @@ public function listInvalidProperties() if ($this->container['logs'] === null) { $invalidProperties[] = "'logs' can't be null"; } + return $invalidProperties; } @@ -179,7 +179,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets logs * @@ -206,9 +205,9 @@ public function setLogs($logs) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -218,7 +217,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -247,7 +246,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -258,14 +257,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -292,4 +292,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/GetLogsResponseInnerQueries.php b/clients/algoliasearch-client-php/lib/Model/GetLogsResponseInnerQueries.php index a895461a73..8fef10989e 100644 --- a/clients/algoliasearch-client-php/lib/Model/GetLogsResponseInnerQueries.php +++ b/clients/algoliasearch-client-php/lib/Model/GetLogsResponseInnerQueries.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * GetLogsResponseInnerQueries Class Doc Comment @@ -33,7 +33,7 @@ class GetLogsResponseInnerQueries implements ModelInterface, ArrayAccess, \JsonS protected static $openAPITypes = [ 'indexName' => 'string', 'userToken' => 'string', - 'queryId' => 'string' + 'queryId' => 'string', ]; /** @@ -46,7 +46,7 @@ class GetLogsResponseInnerQueries implements ModelInterface, ArrayAccess, \JsonS protected static $openAPIFormats = [ 'indexName' => null, 'userToken' => null, - 'queryId' => null + 'queryId' => null, ]; /** @@ -78,7 +78,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'indexName' => 'index_name', 'userToken' => 'user_token', - 'queryId' => 'query_id' + 'queryId' => 'query_id', ]; /** @@ -89,7 +89,7 @@ public static function openAPIFormats() protected static $setters = [ 'indexName' => 'setIndexName', 'userToken' => 'setUserToken', - 'queryId' => 'setQueryId' + 'queryId' => 'setQueryId', ]; /** @@ -100,7 +100,7 @@ public static function openAPIFormats() protected static $getters = [ 'indexName' => 'getIndexName', 'userToken' => 'getUserToken', - 'queryId' => 'getQueryId' + 'queryId' => 'getQueryId', ]; /** @@ -144,7 +144,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -188,7 +187,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets indexName * @@ -202,7 +200,7 @@ public function getIndexName() /** * Sets indexName * - * @param string|null $indexName Index targeted by the query. + * @param string|null $indexName index targeted by the query * * @return self */ @@ -226,7 +224,7 @@ public function getUserToken() /** * Sets userToken * - * @param string|null $userToken User identifier. + * @param string|null $userToken user identifier * * @return self */ @@ -250,7 +248,7 @@ public function getQueryId() /** * Sets queryId * - * @param string|null $queryId QueryID for the given query. + * @param string|null $queryId queryID for the given query * * @return self */ @@ -263,9 +261,9 @@ public function setQueryId($queryId) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -275,7 +273,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -304,7 +302,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -315,14 +313,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -349,4 +348,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/GetLogsResponseLogs.php b/clients/algoliasearch-client-php/lib/Model/GetLogsResponseLogs.php index 1c30d989b3..a8ff63bf14 100644 --- a/clients/algoliasearch-client-php/lib/Model/GetLogsResponseLogs.php +++ b/clients/algoliasearch-client-php/lib/Model/GetLogsResponseLogs.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * GetLogsResponseLogs Class Doc Comment @@ -45,7 +45,7 @@ class GetLogsResponseLogs implements ModelInterface, ArrayAccess, \JsonSerializa 'index' => 'string', 'queryParams' => 'string', 'queryNbHits' => 'string', - 'innerQueries' => '\Algolia\AlgoliaSearch\Model\GetLogsResponseInnerQueries[]' + 'innerQueries' => '\Algolia\AlgoliaSearch\Model\GetLogsResponseInnerQueries[]', ]; /** @@ -70,7 +70,7 @@ class GetLogsResponseLogs implements ModelInterface, ArrayAccess, \JsonSerializa 'index' => null, 'queryParams' => null, 'queryNbHits' => null, - 'innerQueries' => null + 'innerQueries' => null, ]; /** @@ -114,7 +114,7 @@ public static function openAPIFormats() 'index' => 'index', 'queryParams' => 'query_params', 'queryNbHits' => 'query_nb_hits', - 'innerQueries' => 'inner_queries' + 'innerQueries' => 'inner_queries', ]; /** @@ -137,7 +137,7 @@ public static function openAPIFormats() 'index' => 'setIndex', 'queryParams' => 'setQueryParams', 'queryNbHits' => 'setQueryNbHits', - 'innerQueries' => 'setInnerQueries' + 'innerQueries' => 'setInnerQueries', ]; /** @@ -160,7 +160,7 @@ public static function openAPIFormats() 'index' => 'getIndex', 'queryParams' => 'getQueryParams', 'queryNbHits' => 'getQueryNbHits', - 'innerQueries' => 'getInnerQueries' + 'innerQueries' => 'getInnerQueries', ]; /** @@ -204,7 +204,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -279,6 +278,7 @@ public function listInvalidProperties() if ($this->container['processingTimeMs'] === null) { $invalidProperties[] = "'processingTimeMs' can't be null"; } + return $invalidProperties; } @@ -293,7 +293,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets timestamp * @@ -307,7 +306,7 @@ public function getTimestamp() /** * Sets timestamp * - * @param string $timestamp Timestamp in ISO-8601 format. + * @param string $timestamp timestamp in ISO-8601 format * * @return self */ @@ -331,7 +330,7 @@ public function getMethod() /** * Sets method * - * @param string $method HTTP method of the perfomed request. + * @param string $method HTTP method of the perfomed request * * @return self */ @@ -355,7 +354,7 @@ public function getAnswerCode() /** * Sets answerCode * - * @param string $answerCode HTTP response code. + * @param string $answerCode HTTP response code * * @return self */ @@ -427,7 +426,7 @@ public function getUrl() /** * Sets url * - * @param string $url Request URL. + * @param string $url request URL * * @return self */ @@ -451,7 +450,7 @@ public function getIp() /** * Sets ip * - * @param string $ip IP of the client which perfomed the request. + * @param string $ip IP of the client which perfomed the request * * @return self */ @@ -475,7 +474,7 @@ public function getQueryHeaders() /** * Sets queryHeaders * - * @param string $queryHeaders Request Headers (API Key is obfuscated). + * @param string $queryHeaders request Headers (API Key is obfuscated) * * @return self */ @@ -499,7 +498,7 @@ public function getSha1() /** * Sets sha1 * - * @param string $sha1 SHA1 signature of the log entry. + * @param string $sha1 SHA1 signature of the log entry * * @return self */ @@ -523,7 +522,7 @@ public function getNbApiCalls() /** * Sets nbApiCalls * - * @param string $nbApiCalls Number of API calls. + * @param string $nbApiCalls number of API calls * * @return self */ @@ -571,7 +570,7 @@ public function getIndex() /** * Sets index * - * @param string|null $index Index targeted by the query. + * @param string|null $index index targeted by the query * * @return self */ @@ -595,7 +594,7 @@ public function getQueryParams() /** * Sets queryParams * - * @param string|null $queryParams Query parameters sent with the request. + * @param string|null $queryParams query parameters sent with the request * * @return self */ @@ -619,7 +618,7 @@ public function getQueryNbHits() /** * Sets queryNbHits * - * @param string|null $queryNbHits Number of hits returned for the query. + * @param string|null $queryNbHits number of hits returned for the query * * @return self */ @@ -643,7 +642,7 @@ public function getInnerQueries() /** * Sets innerQueries * - * @param \Algolia\AlgoliaSearch\Model\GetLogsResponseInnerQueries[]|null $innerQueries Array of all performed queries for the given request. + * @param \Algolia\AlgoliaSearch\Model\GetLogsResponseInnerQueries[]|null $innerQueries array of all performed queries for the given request * * @return self */ @@ -656,9 +655,9 @@ public function setInnerQueries($innerQueries) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -668,7 +667,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -697,7 +696,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -708,14 +707,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -742,4 +742,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/GetObjectsObject.php b/clients/algoliasearch-client-php/lib/Model/GetObjectsObject.php index 7e4184184d..4db95782ef 100644 --- a/clients/algoliasearch-client-php/lib/Model/GetObjectsObject.php +++ b/clients/algoliasearch-client-php/lib/Model/GetObjectsObject.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * GetObjectsObject Class Doc Comment * * @category Class * @description The `getObjects` requests. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -32,7 +33,7 @@ class GetObjectsObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'requests' => '\Algolia\AlgoliaSearch\Model\MultipleGetObjectsObject[]' + 'requests' => '\Algolia\AlgoliaSearch\Model\MultipleGetObjectsObject[]', ]; /** @@ -43,7 +44,7 @@ class GetObjectsObject implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'requests' => null + 'requests' => null, ]; /** @@ -73,7 +74,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'requests' => 'requests' + 'requests' => 'requests', ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'requests' => 'setRequests' + 'requests' => 'setRequests', ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'requests' => 'getRequests' + 'requests' => 'getRequests', ]; /** @@ -135,7 +136,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -177,7 +177,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets requests * @@ -204,9 +203,9 @@ public function setRequests($requests) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -216,7 +215,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -245,7 +244,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -256,14 +255,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -290,4 +290,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/GetObjectsResponse.php b/clients/algoliasearch-client-php/lib/Model/GetObjectsResponse.php index 3e54417691..27c7531669 100644 --- a/clients/algoliasearch-client-php/lib/Model/GetObjectsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/GetObjectsResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * GetObjectsResponse Class Doc Comment @@ -31,7 +31,7 @@ class GetObjectsResponse implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'results' => 'object[]' + 'results' => 'object[]', ]; /** @@ -42,7 +42,7 @@ class GetObjectsResponse implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null + 'results' => null, ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results' + 'results' => 'results', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults' + 'results' => 'setResults', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults' + 'results' => 'getResults', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -176,7 +175,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets results * @@ -190,7 +188,7 @@ public function getResults() /** * Sets results * - * @param object[]|null $results List of results fetched. + * @param object[]|null $results list of results fetched * * @return self */ @@ -203,9 +201,9 @@ public function setResults($results) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -215,7 +213,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -244,7 +242,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -255,14 +253,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -289,4 +288,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/GetTaskResponse.php b/clients/algoliasearch-client-php/lib/Model/GetTaskResponse.php index 5f11816c35..b46ddac49f 100644 --- a/clients/algoliasearch-client-php/lib/Model/GetTaskResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/GetTaskResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * GetTaskResponse Class Doc Comment @@ -31,7 +31,7 @@ class GetTaskResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string' + 'status' => 'string', ]; /** @@ -42,7 +42,7 @@ class GetTaskResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null + 'status' => null, ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status' + 'status' => 'status', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus' + 'status' => 'setStatus', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus' + 'status' => 'getStatus', ]; /** @@ -203,7 +203,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets status * @@ -240,9 +239,9 @@ public function setStatus($status) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -252,7 +251,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -281,7 +280,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -292,14 +291,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -326,4 +326,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/GetTopUserIdsResponse.php b/clients/algoliasearch-client-php/lib/Model/GetTopUserIdsResponse.php index 138d5abf2f..fd18eb3cea 100644 --- a/clients/algoliasearch-client-php/lib/Model/GetTopUserIdsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/GetTopUserIdsResponse.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * GetTopUserIdsResponse Class Doc Comment * * @category Class * @description Array of userIDs and clusters. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -32,7 +33,7 @@ class GetTopUserIdsResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'topUsers' => 'array[]' + 'topUsers' => 'array[]', ]; /** @@ -43,7 +44,7 @@ class GetTopUserIdsResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ - 'topUsers' => null + 'topUsers' => null, ]; /** @@ -73,7 +74,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'topUsers' => 'topUsers' + 'topUsers' => 'topUsers', ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'topUsers' => 'setTopUsers' + 'topUsers' => 'setTopUsers', ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'topUsers' => 'getTopUsers' + 'topUsers' => 'getTopUsers', ]; /** @@ -135,7 +136,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -166,6 +166,7 @@ public function listInvalidProperties() if ($this->container['topUsers'] === null) { $invalidProperties[] = "'topUsers' can't be null"; } + return $invalidProperties; } @@ -180,7 +181,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets topUsers * @@ -194,7 +194,7 @@ public function getTopUsers() /** * Sets topUsers * - * @param array[] $topUsers Mapping of cluster names to top users. + * @param array[] $topUsers Mapping of cluster names to top users * * @return self */ @@ -207,9 +207,9 @@ public function setTopUsers($topUsers) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -219,7 +219,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -248,7 +248,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -259,14 +259,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -293,4 +294,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/HighlightResult.php b/clients/algoliasearch-client-php/lib/Model/HighlightResult.php index 129b4740ed..2fb9d53ddb 100644 --- a/clients/algoliasearch-client-php/lib/Model/HighlightResult.php +++ b/clients/algoliasearch-client-php/lib/Model/HighlightResult.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * HighlightResult Class Doc Comment * * @category Class * @description Highlighted attributes. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -35,7 +36,7 @@ class HighlightResult implements ModelInterface, ArrayAccess, \JsonSerializable 'value' => 'string', 'matchLevel' => 'string', 'matchedWords' => 'string[]', - 'fullyHighlighted' => 'bool' + 'fullyHighlighted' => 'bool', ]; /** @@ -49,7 +50,7 @@ class HighlightResult implements ModelInterface, ArrayAccess, \JsonSerializable 'value' => null, 'matchLevel' => null, 'matchedWords' => null, - 'fullyHighlighted' => null + 'fullyHighlighted' => null, ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() 'value' => 'value', 'matchLevel' => 'matchLevel', 'matchedWords' => 'matchedWords', - 'fullyHighlighted' => 'fullyHighlighted' + 'fullyHighlighted' => 'fullyHighlighted', ]; /** @@ -94,7 +95,7 @@ public static function openAPIFormats() 'value' => 'setValue', 'matchLevel' => 'setMatchLevel', 'matchedWords' => 'setMatchedWords', - 'fullyHighlighted' => 'setFullyHighlighted' + 'fullyHighlighted' => 'setFullyHighlighted', ]; /** @@ -106,7 +107,7 @@ public static function openAPIFormats() 'value' => 'getValue', 'matchLevel' => 'getMatchLevel', 'matchedWords' => 'getMatchedWords', - 'fullyHighlighted' => 'getFullyHighlighted' + 'fullyHighlighted' => 'getFullyHighlighted', ]; /** @@ -221,7 +222,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets value * @@ -235,7 +235,7 @@ public function getValue() /** * Sets value * - * @param string|null $value Markup text with occurrences highlighted. + * @param string|null $value markup text with occurrences highlighted * * @return self */ @@ -259,7 +259,7 @@ public function getMatchLevel() /** * Sets matchLevel * - * @param string|null $matchLevel Indicates how well the attribute matched the search query. + * @param string|null $matchLevel indicates how well the attribute matched the search query * * @return self */ @@ -293,7 +293,7 @@ public function getMatchedWords() /** * Sets matchedWords * - * @param string[]|null $matchedWords List of words from the query that matched the object. + * @param string[]|null $matchedWords list of words from the query that matched the object * * @return self */ @@ -317,7 +317,7 @@ public function getFullyHighlighted() /** * Sets fullyHighlighted * - * @param bool|null $fullyHighlighted Whether the entire attribute value is highlighted. + * @param bool|null $fullyHighlighted whether the entire attribute value is highlighted * * @return self */ @@ -330,9 +330,9 @@ public function setFullyHighlighted($fullyHighlighted) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -342,7 +342,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -371,7 +371,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -382,14 +382,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -416,4 +417,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/Index.php b/clients/algoliasearch-client-php/lib/Model/Index.php index 03a2871dcd..94651a0e9b 100644 --- a/clients/algoliasearch-client-php/lib/Model/Index.php +++ b/clients/algoliasearch-client-php/lib/Model/Index.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * Index Class Doc Comment @@ -41,7 +41,7 @@ class Index implements ModelInterface, ArrayAccess, \JsonSerializable 'numberOfPendingTask' => 'int', 'pendingTask' => 'bool', 'primary' => 'string', - 'replicas' => 'string[]' + 'replicas' => 'string[]', ]; /** @@ -62,7 +62,7 @@ class Index implements ModelInterface, ArrayAccess, \JsonSerializable 'numberOfPendingTask' => null, 'pendingTask' => null, 'primary' => null, - 'replicas' => null + 'replicas' => null, ]; /** @@ -102,7 +102,7 @@ public static function openAPIFormats() 'numberOfPendingTask' => 'numberOfPendingTask', 'pendingTask' => 'pendingTask', 'primary' => 'primary', - 'replicas' => 'replicas' + 'replicas' => 'replicas', ]; /** @@ -121,7 +121,7 @@ public static function openAPIFormats() 'numberOfPendingTask' => 'setNumberOfPendingTask', 'pendingTask' => 'setPendingTask', 'primary' => 'setPrimary', - 'replicas' => 'setReplicas' + 'replicas' => 'setReplicas', ]; /** @@ -140,7 +140,7 @@ public static function openAPIFormats() 'numberOfPendingTask' => 'getNumberOfPendingTask', 'pendingTask' => 'getPendingTask', 'primary' => 'getPrimary', - 'replicas' => 'getReplicas' + 'replicas' => 'getReplicas', ]; /** @@ -184,7 +184,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -246,6 +245,7 @@ public function listInvalidProperties() if ($this->container['pendingTask'] === null) { $invalidProperties[] = "'pendingTask' can't be null"; } + return $invalidProperties; } @@ -260,7 +260,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets name * @@ -274,7 +273,7 @@ public function getName() /** * Sets name * - * @param string $name Index name. + * @param string $name index name * * @return self */ @@ -322,7 +321,7 @@ public function getUpdatedAt() /** * Sets updatedAt * - * @param \DateTime $updatedAt Date of last update (ISO-8601 format). + * @param \DateTime $updatedAt date of last update (ISO-8601 format) * * @return self */ @@ -346,7 +345,7 @@ public function getEntries() /** * Sets entries * - * @param int $entries Number of records contained in the index. + * @param int $entries number of records contained in the index * * @return self */ @@ -370,7 +369,7 @@ public function getDataSize() /** * Sets dataSize * - * @param int $dataSize Number of bytes of the index in minified format. + * @param int $dataSize number of bytes of the index in minified format * * @return self */ @@ -394,7 +393,7 @@ public function getFileSize() /** * Sets fileSize * - * @param int $fileSize Number of bytes of the index binary file. + * @param int $fileSize number of bytes of the index binary file * * @return self */ @@ -527,9 +526,9 @@ public function setReplicas($replicas) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -539,7 +538,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -568,7 +567,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -579,14 +578,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -613,4 +613,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/IndexSettings.php b/clients/algoliasearch-client-php/lib/Model/IndexSettings.php index 01ea27278c..66c7494b07 100644 --- a/clients/algoliasearch-client-php/lib/Model/IndexSettings.php +++ b/clients/algoliasearch-client-php/lib/Model/IndexSettings.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * IndexSettings Class Doc Comment * * @category Class * @description The Algolia index settings. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -87,7 +88,7 @@ class IndexSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'responseFields' => 'string[]', 'maxFacetHits' => 'int', 'attributeCriteriaComputedByMinProximity' => 'bool', - 'renderingContent' => 'object' + 'renderingContent' => 'object', ]; /** @@ -153,7 +154,7 @@ class IndexSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'responseFields' => null, 'maxFacetHits' => null, 'attributeCriteriaComputedByMinProximity' => null, - 'renderingContent' => null + 'renderingContent' => null, ]; /** @@ -238,7 +239,7 @@ public static function openAPIFormats() 'responseFields' => 'responseFields', 'maxFacetHits' => 'maxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'attributeCriteriaComputedByMinProximity', - 'renderingContent' => 'renderingContent' + 'renderingContent' => 'renderingContent', ]; /** @@ -302,7 +303,7 @@ public static function openAPIFormats() 'responseFields' => 'setResponseFields', 'maxFacetHits' => 'setMaxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'setAttributeCriteriaComputedByMinProximity', - 'renderingContent' => 'setRenderingContent' + 'renderingContent' => 'setRenderingContent', ]; /** @@ -366,7 +367,7 @@ public static function openAPIFormats() 'responseFields' => 'getResponseFields', 'maxFacetHits' => 'getMaxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'getAttributeCriteriaComputedByMinProximity', - 'renderingContent' => 'getRenderingContent' + 'renderingContent' => 'getRenderingContent', ]; /** @@ -667,7 +668,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets replicas * @@ -681,7 +681,7 @@ public function getReplicas() /** * Sets replicas * - * @param string[]|null $replicas Creates replicas, exact copies of an index. + * @param string[]|null $replicas creates replicas, exact copies of an index * * @return self */ @@ -705,7 +705,7 @@ public function getPaginationLimitedTo() /** * Sets paginationLimitedTo * - * @param int|null $paginationLimitedTo Set the maximum number of hits accessible via pagination. + * @param int|null $paginationLimitedTo set the maximum number of hits accessible via pagination * * @return self */ @@ -729,7 +729,7 @@ public function getDisableTypoToleranceOnWords() /** * Sets disableTypoToleranceOnWords * - * @param string[]|null $disableTypoToleranceOnWords A list of words for which you want to turn off typo tolerance. + * @param string[]|null $disableTypoToleranceOnWords a list of words for which you want to turn off typo tolerance * * @return self */ @@ -753,7 +753,7 @@ public function getAttributesToTransliterate() /** * Sets attributesToTransliterate * - * @param string[]|null $attributesToTransliterate Specify on which attributes to apply transliteration. + * @param string[]|null $attributesToTransliterate specify on which attributes to apply transliteration * * @return self */ @@ -777,7 +777,7 @@ public function getCamelCaseAttributes() /** * Sets camelCaseAttributes * - * @param string[]|null $camelCaseAttributes List of attributes on which to do a decomposition of camel case words. + * @param string[]|null $camelCaseAttributes list of attributes on which to do a decomposition of camel case words * * @return self */ @@ -801,7 +801,7 @@ public function getDecompoundedAttributes() /** * Sets decompoundedAttributes * - * @param object|null $decompoundedAttributes Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding. + * @param object|null $decompoundedAttributes specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding * * @return self */ @@ -825,7 +825,7 @@ public function getIndexLanguages() /** * Sets indexLanguages * - * @param string[]|null $indexLanguages Sets the languages at the index level for language-specific processing such as tokenization and normalization. + * @param string[]|null $indexLanguages sets the languages at the index level for language-specific processing such as tokenization and normalization * * @return self */ @@ -849,7 +849,7 @@ public function getFilterPromotes() /** * Sets filterPromotes * - * @param bool|null $filterPromotes Whether promoted results should match the filters of the current search, except for geographic filters. + * @param bool|null $filterPromotes whether promoted results should match the filters of the current search, except for geographic filters * * @return self */ @@ -873,7 +873,7 @@ public function getDisablePrefixOnAttributes() /** * Sets disablePrefixOnAttributes * - * @param string[]|null $disablePrefixOnAttributes List of attributes on which you want to disable prefix matching. + * @param string[]|null $disablePrefixOnAttributes list of attributes on which you want to disable prefix matching * * @return self */ @@ -897,7 +897,7 @@ public function getAllowCompressionOfIntegerArray() /** * Sets allowCompressionOfIntegerArray * - * @param bool|null $allowCompressionOfIntegerArray Enables compression of large integer arrays. + * @param bool|null $allowCompressionOfIntegerArray enables compression of large integer arrays * * @return self */ @@ -921,7 +921,7 @@ public function getNumericAttributesForFiltering() /** * Sets numericAttributesForFiltering * - * @param string[]|null $numericAttributesForFiltering List of numeric attributes that can be used as numerical filters. + * @param string[]|null $numericAttributesForFiltering list of numeric attributes that can be used as numerical filters * * @return self */ @@ -945,7 +945,7 @@ public function getUserData() /** * Sets userData * - * @param object|null $userData Lets you store custom data in your indices. + * @param object|null $userData lets you store custom data in your indices * * @return self */ @@ -969,7 +969,7 @@ public function getSearchableAttributes() /** * Sets searchableAttributes * - * @param string[]|null $searchableAttributes The complete list of attributes used for searching. + * @param string[]|null $searchableAttributes the complete list of attributes used for searching * * @return self */ @@ -993,7 +993,7 @@ public function getAttributesForFaceting() /** * Sets attributesForFaceting * - * @param string[]|null $attributesForFaceting The complete list of attributes that will be used for faceting. + * @param string[]|null $attributesForFaceting the complete list of attributes that will be used for faceting * * @return self */ @@ -1017,7 +1017,7 @@ public function getUnretrievableAttributes() /** * Sets unretrievableAttributes * - * @param string[]|null $unretrievableAttributes List of attributes that can't be retrieved at query time. + * @param string[]|null $unretrievableAttributes list of attributes that can't be retrieved at query time * * @return self */ @@ -1041,7 +1041,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve * - * @param string[]|null $attributesToRetrieve This parameter controls which attributes to retrieve and which not to retrieve. + * @param string[]|null $attributesToRetrieve this parameter controls which attributes to retrieve and which not to retrieve * * @return self */ @@ -1065,7 +1065,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes * - * @param string[]|null $restrictSearchableAttributes Restricts a given query to look in only a subset of your searchable attributes. + * @param string[]|null $restrictSearchableAttributes restricts a given query to look in only a subset of your searchable attributes * * @return self */ @@ -1089,7 +1089,7 @@ public function getRanking() /** * Sets ranking * - * @param string[]|null $ranking Controls how Algolia should sort your results. + * @param string[]|null $ranking controls how Algolia should sort your results * * @return self */ @@ -1113,7 +1113,7 @@ public function getCustomRanking() /** * Sets customRanking * - * @param string[]|null $customRanking Specifies the custom ranking criterion. + * @param string[]|null $customRanking specifies the custom ranking criterion * * @return self */ @@ -1137,7 +1137,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness * - * @param int|null $relevancyStrictness Controls the relevancy threshold below which less relevant results aren't included in the results. + * @param int|null $relevancyStrictness controls the relevancy threshold below which less relevant results aren't included in the results * * @return self */ @@ -1161,7 +1161,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight * - * @param string[]|null $attributesToHighlight List of attributes to highlight. + * @param string[]|null $attributesToHighlight list of attributes to highlight * * @return self */ @@ -1185,7 +1185,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet * - * @param string[]|null $attributesToSnippet List of attributes to snippet, with an optional maximum number of words to snippet. + * @param string[]|null $attributesToSnippet list of attributes to snippet, with an optional maximum number of words to snippet * * @return self */ @@ -1209,7 +1209,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag * - * @param string|null $highlightPreTag The HTML string to insert before the highlighted parts in all highlight and snippet results. + * @param string|null $highlightPreTag the HTML string to insert before the highlighted parts in all highlight and snippet results * * @return self */ @@ -1233,7 +1233,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag * - * @param string|null $highlightPostTag The HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param string|null $highlightPostTag the HTML string to insert after the highlighted parts in all highlight and snippet results * * @return self */ @@ -1257,7 +1257,7 @@ public function getSnippetEllipsisText() /** * Sets snippetEllipsisText * - * @param string|null $snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. + * @param string|null $snippetEllipsisText string used as an ellipsis indicator when a snippet is truncated * * @return self */ @@ -1281,7 +1281,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays * - * @param bool|null $restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param bool|null $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query * * @return self */ @@ -1305,7 +1305,7 @@ public function getHitsPerPage() /** * Sets hitsPerPage * - * @param int|null $hitsPerPage Set the number of hits per page. + * @param int|null $hitsPerPage set the number of hits per page * * @return self */ @@ -1329,7 +1329,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo * - * @param int|null $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with 1 typo. + * @param int|null $minWordSizefor1Typo minimum number of characters a word in the query string must contain to accept matches with 1 typo * * @return self */ @@ -1353,7 +1353,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos * - * @param int|null $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with 2 typos. + * @param int|null $minWordSizefor2Typos minimum number of characters a word in the query string must contain to accept matches with 2 typos * * @return self */ @@ -1377,7 +1377,7 @@ public function getTypoTolerance() /** * Sets typoTolerance * - * @param string|null $typoTolerance Controls whether typo tolerance is enabled and how it is applied. + * @param string|null $typoTolerance controls whether typo tolerance is enabled and how it is applied * * @return self */ @@ -1411,7 +1411,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens * - * @param bool|null $allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * @param bool|null $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string * * @return self */ @@ -1435,7 +1435,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes * - * @param string[]|null $disableTypoToleranceOnAttributes List of attributes on which you want to disable typo tolerance. + * @param string[]|null $disableTypoToleranceOnAttributes list of attributes on which you want to disable typo tolerance * * @return self */ @@ -1459,7 +1459,7 @@ public function getSeparatorsToIndex() /** * Sets separatorsToIndex * - * @param string|null $separatorsToIndex Control which separators are indexed. + * @param string|null $separatorsToIndex control which separators are indexed * * @return self */ @@ -1483,7 +1483,7 @@ public function getIgnorePlurals() /** * Sets ignorePlurals * - * @param string|null $ignorePlurals Treats singular, plurals, and other forms of declensions as matching terms. + * @param string|null $ignorePlurals treats singular, plurals, and other forms of declensions as matching terms * * @return self */ @@ -1507,7 +1507,7 @@ public function getRemoveStopWords() /** * Sets removeStopWords * - * @param string|null $removeStopWords Removes stop (common) words from the query before executing it. + * @param string|null $removeStopWords removes stop (common) words from the query before executing it * * @return self */ @@ -1531,7 +1531,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters * - * @param string|null $keepDiacriticsOnCharacters List of characters that the engine shouldn't automatically normalize. + * @param string|null $keepDiacriticsOnCharacters list of characters that the engine shouldn't automatically normalize * * @return self */ @@ -1555,7 +1555,7 @@ public function getQueryLanguages() /** * Sets queryLanguages * - * @param string[]|null $queryLanguages Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection. + * @param string[]|null $queryLanguages sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection * * @return self */ @@ -1579,7 +1579,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery * - * @param bool|null $decompoundQuery Splits compound words into their composing atoms in the query. + * @param bool|null $decompoundQuery splits compound words into their composing atoms in the query * * @return self */ @@ -1603,7 +1603,7 @@ public function getEnableRules() /** * Sets enableRules * - * @param bool|null $enableRules Whether Rules should be globally enabled. + * @param bool|null $enableRules whether Rules should be globally enabled * * @return self */ @@ -1627,7 +1627,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization * - * @param bool|null $enablePersonalization Enable the Personalization feature. + * @param bool|null $enablePersonalization enable the Personalization feature * * @return self */ @@ -1651,7 +1651,7 @@ public function getQueryType() /** * Sets queryType * - * @param string|null $queryType Controls if and how query words are interpreted as prefixes. + * @param string|null $queryType controls if and how query words are interpreted as prefixes * * @return self */ @@ -1685,7 +1685,7 @@ public function getRemoveWordsIfNoResults() /** * Sets removeWordsIfNoResults * - * @param string|null $removeWordsIfNoResults Selects a strategy to remove words from the query when it doesn't match any hits. + * @param string|null $removeWordsIfNoResults selects a strategy to remove words from the query when it doesn't match any hits * * @return self */ @@ -1719,7 +1719,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax * - * @param bool|null $advancedSyntax Enables the advanced query syntax. + * @param bool|null $advancedSyntax enables the advanced query syntax * * @return self */ @@ -1743,7 +1743,7 @@ public function getOptionalWords() /** * Sets optionalWords * - * @param string[]|null $optionalWords A list of words that should be considered as optional when found in the query. + * @param string[]|null $optionalWords a list of words that should be considered as optional when found in the query * * @return self */ @@ -1767,7 +1767,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes * - * @param string[]|null $disableExactOnAttributes List of attributes on which you want to disable the exact ranking criterion. + * @param string[]|null $disableExactOnAttributes list of attributes on which you want to disable the exact ranking criterion * * @return self */ @@ -1791,7 +1791,7 @@ public function getExactOnSingleWordQuery() /** * Sets exactOnSingleWordQuery * - * @param string|null $exactOnSingleWordQuery Controls how the exact ranking criterion is computed when the query contains only one word. + * @param string|null $exactOnSingleWordQuery controls how the exact ranking criterion is computed when the query contains only one word * * @return self */ @@ -1825,7 +1825,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact * - * @param string[]|null $alternativesAsExact List of alternatives that should be considered an exact match by the exact ranking criterion. + * @param string[]|null $alternativesAsExact list of alternatives that should be considered an exact match by the exact ranking criterion * * @return self */ @@ -1858,7 +1858,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures * - * @param string[]|null $advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when ‘advancedSyntax' is enabled. + * @param string[]|null $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when ‘advancedSyntax' is enabled * * @return self */ @@ -1891,13 +1891,12 @@ public function getDistinct() /** * Sets distinct * - * @param int|null $distinct Enables de-duplication or grouping of results. + * @param int|null $distinct enables de-duplication or grouping of results * * @return self */ public function setDistinct($distinct) { - if (!is_null($distinct) && ($distinct > 4)) { throw new \InvalidArgumentException('invalid value for $distinct when calling IndexSettings., must be smaller than or equal to 4.'); } @@ -1923,7 +1922,7 @@ public function getSynonyms() /** * Sets synonyms * - * @param bool|null $synonyms Whether to take into account an index's synonyms for a particular search. + * @param bool|null $synonyms whether to take into account an index's synonyms for a particular search * * @return self */ @@ -1947,7 +1946,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight * - * @param bool|null $replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * @param bool|null $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself * * @return self */ @@ -1971,13 +1970,12 @@ public function getMinProximity() /** * Sets minProximity * - * @param int|null $minProximity Precision of the proximity ranking criterion. + * @param int|null $minProximity precision of the proximity ranking criterion * * @return self */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { throw new \InvalidArgumentException('invalid value for $minProximity when calling IndexSettings., must be smaller than or equal to 7.'); } @@ -2033,7 +2031,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling IndexSettings., must be smaller than or equal to 100.'); } @@ -2056,7 +2053,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity * - * @param bool|null $attributeCriteriaComputedByMinProximity When attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage. + * @param bool|null $attributeCriteriaComputedByMinProximity when attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage * * @return self */ @@ -2093,9 +2090,9 @@ public function setRenderingContent($renderingContent) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -2105,7 +2102,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -2134,7 +2131,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -2145,14 +2142,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -2179,4 +2177,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/IndexSettingsAsSearchParams.php b/clients/algoliasearch-client-php/lib/Model/IndexSettingsAsSearchParams.php index 1672b402c3..a8431235b8 100644 --- a/clients/algoliasearch-client-php/lib/Model/IndexSettingsAsSearchParams.php +++ b/clients/algoliasearch-client-php/lib/Model/IndexSettingsAsSearchParams.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * IndexSettingsAsSearchParams Class Doc Comment @@ -74,7 +74,7 @@ class IndexSettingsAsSearchParams implements ModelInterface, ArrayAccess, \JsonS 'responseFields' => 'string[]', 'maxFacetHits' => 'int', 'attributeCriteriaComputedByMinProximity' => 'bool', - 'renderingContent' => 'object' + 'renderingContent' => 'object', ]; /** @@ -128,7 +128,7 @@ class IndexSettingsAsSearchParams implements ModelInterface, ArrayAccess, \JsonS 'responseFields' => null, 'maxFacetHits' => null, 'attributeCriteriaComputedByMinProximity' => null, - 'renderingContent' => null + 'renderingContent' => null, ]; /** @@ -201,7 +201,7 @@ public static function openAPIFormats() 'responseFields' => 'responseFields', 'maxFacetHits' => 'maxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'attributeCriteriaComputedByMinProximity', - 'renderingContent' => 'renderingContent' + 'renderingContent' => 'renderingContent', ]; /** @@ -253,7 +253,7 @@ public static function openAPIFormats() 'responseFields' => 'setResponseFields', 'maxFacetHits' => 'setMaxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'setAttributeCriteriaComputedByMinProximity', - 'renderingContent' => 'setRenderingContent' + 'renderingContent' => 'setRenderingContent', ]; /** @@ -305,7 +305,7 @@ public static function openAPIFormats() 'responseFields' => 'getResponseFields', 'maxFacetHits' => 'getMaxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'getAttributeCriteriaComputedByMinProximity', - 'renderingContent' => 'getRenderingContent' + 'renderingContent' => 'getRenderingContent', ]; /** @@ -594,7 +594,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets searchableAttributes * @@ -608,7 +607,7 @@ public function getSearchableAttributes() /** * Sets searchableAttributes * - * @param string[]|null $searchableAttributes The complete list of attributes used for searching. + * @param string[]|null $searchableAttributes the complete list of attributes used for searching * * @return self */ @@ -632,7 +631,7 @@ public function getAttributesForFaceting() /** * Sets attributesForFaceting * - * @param string[]|null $attributesForFaceting The complete list of attributes that will be used for faceting. + * @param string[]|null $attributesForFaceting the complete list of attributes that will be used for faceting * * @return self */ @@ -656,7 +655,7 @@ public function getUnretrievableAttributes() /** * Sets unretrievableAttributes * - * @param string[]|null $unretrievableAttributes List of attributes that can't be retrieved at query time. + * @param string[]|null $unretrievableAttributes list of attributes that can't be retrieved at query time * * @return self */ @@ -680,7 +679,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve * - * @param string[]|null $attributesToRetrieve This parameter controls which attributes to retrieve and which not to retrieve. + * @param string[]|null $attributesToRetrieve this parameter controls which attributes to retrieve and which not to retrieve * * @return self */ @@ -704,7 +703,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes * - * @param string[]|null $restrictSearchableAttributes Restricts a given query to look in only a subset of your searchable attributes. + * @param string[]|null $restrictSearchableAttributes restricts a given query to look in only a subset of your searchable attributes * * @return self */ @@ -728,7 +727,7 @@ public function getRanking() /** * Sets ranking * - * @param string[]|null $ranking Controls how Algolia should sort your results. + * @param string[]|null $ranking controls how Algolia should sort your results * * @return self */ @@ -752,7 +751,7 @@ public function getCustomRanking() /** * Sets customRanking * - * @param string[]|null $customRanking Specifies the custom ranking criterion. + * @param string[]|null $customRanking specifies the custom ranking criterion * * @return self */ @@ -776,7 +775,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness * - * @param int|null $relevancyStrictness Controls the relevancy threshold below which less relevant results aren't included in the results. + * @param int|null $relevancyStrictness controls the relevancy threshold below which less relevant results aren't included in the results * * @return self */ @@ -800,7 +799,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight * - * @param string[]|null $attributesToHighlight List of attributes to highlight. + * @param string[]|null $attributesToHighlight list of attributes to highlight * * @return self */ @@ -824,7 +823,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet * - * @param string[]|null $attributesToSnippet List of attributes to snippet, with an optional maximum number of words to snippet. + * @param string[]|null $attributesToSnippet list of attributes to snippet, with an optional maximum number of words to snippet * * @return self */ @@ -848,7 +847,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag * - * @param string|null $highlightPreTag The HTML string to insert before the highlighted parts in all highlight and snippet results. + * @param string|null $highlightPreTag the HTML string to insert before the highlighted parts in all highlight and snippet results * * @return self */ @@ -872,7 +871,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag * - * @param string|null $highlightPostTag The HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param string|null $highlightPostTag the HTML string to insert after the highlighted parts in all highlight and snippet results * * @return self */ @@ -896,7 +895,7 @@ public function getSnippetEllipsisText() /** * Sets snippetEllipsisText * - * @param string|null $snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. + * @param string|null $snippetEllipsisText string used as an ellipsis indicator when a snippet is truncated * * @return self */ @@ -920,7 +919,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays * - * @param bool|null $restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param bool|null $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query * * @return self */ @@ -944,7 +943,7 @@ public function getHitsPerPage() /** * Sets hitsPerPage * - * @param int|null $hitsPerPage Set the number of hits per page. + * @param int|null $hitsPerPage set the number of hits per page * * @return self */ @@ -968,7 +967,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo * - * @param int|null $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with 1 typo. + * @param int|null $minWordSizefor1Typo minimum number of characters a word in the query string must contain to accept matches with 1 typo * * @return self */ @@ -992,7 +991,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos * - * @param int|null $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with 2 typos. + * @param int|null $minWordSizefor2Typos minimum number of characters a word in the query string must contain to accept matches with 2 typos * * @return self */ @@ -1016,7 +1015,7 @@ public function getTypoTolerance() /** * Sets typoTolerance * - * @param string|null $typoTolerance Controls whether typo tolerance is enabled and how it is applied. + * @param string|null $typoTolerance controls whether typo tolerance is enabled and how it is applied * * @return self */ @@ -1050,7 +1049,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens * - * @param bool|null $allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * @param bool|null $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string * * @return self */ @@ -1074,7 +1073,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes * - * @param string[]|null $disableTypoToleranceOnAttributes List of attributes on which you want to disable typo tolerance. + * @param string[]|null $disableTypoToleranceOnAttributes list of attributes on which you want to disable typo tolerance * * @return self */ @@ -1098,7 +1097,7 @@ public function getSeparatorsToIndex() /** * Sets separatorsToIndex * - * @param string|null $separatorsToIndex Control which separators are indexed. + * @param string|null $separatorsToIndex control which separators are indexed * * @return self */ @@ -1122,7 +1121,7 @@ public function getIgnorePlurals() /** * Sets ignorePlurals * - * @param string|null $ignorePlurals Treats singular, plurals, and other forms of declensions as matching terms. + * @param string|null $ignorePlurals treats singular, plurals, and other forms of declensions as matching terms * * @return self */ @@ -1146,7 +1145,7 @@ public function getRemoveStopWords() /** * Sets removeStopWords * - * @param string|null $removeStopWords Removes stop (common) words from the query before executing it. + * @param string|null $removeStopWords removes stop (common) words from the query before executing it * * @return self */ @@ -1170,7 +1169,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters * - * @param string|null $keepDiacriticsOnCharacters List of characters that the engine shouldn't automatically normalize. + * @param string|null $keepDiacriticsOnCharacters list of characters that the engine shouldn't automatically normalize * * @return self */ @@ -1194,7 +1193,7 @@ public function getQueryLanguages() /** * Sets queryLanguages * - * @param string[]|null $queryLanguages Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection. + * @param string[]|null $queryLanguages sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection * * @return self */ @@ -1218,7 +1217,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery * - * @param bool|null $decompoundQuery Splits compound words into their composing atoms in the query. + * @param bool|null $decompoundQuery splits compound words into their composing atoms in the query * * @return self */ @@ -1242,7 +1241,7 @@ public function getEnableRules() /** * Sets enableRules * - * @param bool|null $enableRules Whether Rules should be globally enabled. + * @param bool|null $enableRules whether Rules should be globally enabled * * @return self */ @@ -1266,7 +1265,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization * - * @param bool|null $enablePersonalization Enable the Personalization feature. + * @param bool|null $enablePersonalization enable the Personalization feature * * @return self */ @@ -1290,7 +1289,7 @@ public function getQueryType() /** * Sets queryType * - * @param string|null $queryType Controls if and how query words are interpreted as prefixes. + * @param string|null $queryType controls if and how query words are interpreted as prefixes * * @return self */ @@ -1324,7 +1323,7 @@ public function getRemoveWordsIfNoResults() /** * Sets removeWordsIfNoResults * - * @param string|null $removeWordsIfNoResults Selects a strategy to remove words from the query when it doesn't match any hits. + * @param string|null $removeWordsIfNoResults selects a strategy to remove words from the query when it doesn't match any hits * * @return self */ @@ -1358,7 +1357,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax * - * @param bool|null $advancedSyntax Enables the advanced query syntax. + * @param bool|null $advancedSyntax enables the advanced query syntax * * @return self */ @@ -1382,7 +1381,7 @@ public function getOptionalWords() /** * Sets optionalWords * - * @param string[]|null $optionalWords A list of words that should be considered as optional when found in the query. + * @param string[]|null $optionalWords a list of words that should be considered as optional when found in the query * * @return self */ @@ -1406,7 +1405,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes * - * @param string[]|null $disableExactOnAttributes List of attributes on which you want to disable the exact ranking criterion. + * @param string[]|null $disableExactOnAttributes list of attributes on which you want to disable the exact ranking criterion * * @return self */ @@ -1430,7 +1429,7 @@ public function getExactOnSingleWordQuery() /** * Sets exactOnSingleWordQuery * - * @param string|null $exactOnSingleWordQuery Controls how the exact ranking criterion is computed when the query contains only one word. + * @param string|null $exactOnSingleWordQuery controls how the exact ranking criterion is computed when the query contains only one word * * @return self */ @@ -1464,7 +1463,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact * - * @param string[]|null $alternativesAsExact List of alternatives that should be considered an exact match by the exact ranking criterion. + * @param string[]|null $alternativesAsExact list of alternatives that should be considered an exact match by the exact ranking criterion * * @return self */ @@ -1497,7 +1496,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures * - * @param string[]|null $advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when ‘advancedSyntax' is enabled. + * @param string[]|null $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when ‘advancedSyntax' is enabled * * @return self */ @@ -1530,13 +1529,12 @@ public function getDistinct() /** * Sets distinct * - * @param int|null $distinct Enables de-duplication or grouping of results. + * @param int|null $distinct enables de-duplication or grouping of results * * @return self */ public function setDistinct($distinct) { - if (!is_null($distinct) && ($distinct > 4)) { throw new \InvalidArgumentException('invalid value for $distinct when calling IndexSettingsAsSearchParams., must be smaller than or equal to 4.'); } @@ -1562,7 +1560,7 @@ public function getSynonyms() /** * Sets synonyms * - * @param bool|null $synonyms Whether to take into account an index's synonyms for a particular search. + * @param bool|null $synonyms whether to take into account an index's synonyms for a particular search * * @return self */ @@ -1586,7 +1584,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight * - * @param bool|null $replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * @param bool|null $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself * * @return self */ @@ -1610,13 +1608,12 @@ public function getMinProximity() /** * Sets minProximity * - * @param int|null $minProximity Precision of the proximity ranking criterion. + * @param int|null $minProximity precision of the proximity ranking criterion * * @return self */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { throw new \InvalidArgumentException('invalid value for $minProximity when calling IndexSettingsAsSearchParams., must be smaller than or equal to 7.'); } @@ -1672,7 +1669,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling IndexSettingsAsSearchParams., must be smaller than or equal to 100.'); } @@ -1695,7 +1691,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity * - * @param bool|null $attributeCriteriaComputedByMinProximity When attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage. + * @param bool|null $attributeCriteriaComputedByMinProximity when attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage * * @return self */ @@ -1732,9 +1728,9 @@ public function setRenderingContent($renderingContent) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -1744,7 +1740,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -1773,7 +1769,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -1784,14 +1780,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -1818,4 +1815,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/KeyObject.php b/clients/algoliasearch-client-php/lib/Model/KeyObject.php index 68429a2485..14b8aa70a7 100644 --- a/clients/algoliasearch-client-php/lib/Model/KeyObject.php +++ b/clients/algoliasearch-client-php/lib/Model/KeyObject.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * KeyObject Class Doc Comment @@ -39,7 +39,7 @@ class KeyObject implements ModelInterface, ArrayAccess, \JsonSerializable 'queryParameters' => 'string', 'referers' => 'string[]', 'validity' => 'int', - 'createdAt' => '\DateTime' + 'createdAt' => '\DateTime', ]; /** @@ -58,7 +58,7 @@ class KeyObject implements ModelInterface, ArrayAccess, \JsonSerializable 'queryParameters' => null, 'referers' => null, 'validity' => null, - 'createdAt' => 'date-time' + 'createdAt' => 'date-time', ]; /** @@ -96,7 +96,7 @@ public static function openAPIFormats() 'queryParameters' => 'queryParameters', 'referers' => 'referers', 'validity' => 'validity', - 'createdAt' => 'createdAt' + 'createdAt' => 'createdAt', ]; /** @@ -113,7 +113,7 @@ public static function openAPIFormats() 'queryParameters' => 'setQueryParameters', 'referers' => 'setReferers', 'validity' => 'setValidity', - 'createdAt' => 'setCreatedAt' + 'createdAt' => 'setCreatedAt', ]; /** @@ -130,7 +130,7 @@ public static function openAPIFormats() 'queryParameters' => 'getQueryParameters', 'referers' => 'getReferers', 'validity' => 'getValidity', - 'createdAt' => 'getCreatedAt' + 'createdAt' => 'getCreatedAt', ]; /** @@ -255,6 +255,7 @@ public function listInvalidProperties() if ($this->container['createdAt'] === null) { $invalidProperties[] = "'createdAt' can't be null"; } + return $invalidProperties; } @@ -269,7 +270,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets acl * @@ -283,7 +283,7 @@ public function getAcl() /** * Sets acl * - * @param string[] $acl Set of permissions associated with the key. + * @param string[] $acl set of permissions associated with the key * * @return self */ @@ -388,7 +388,7 @@ public function getMaxQueriesPerIPPerHour() /** * Sets maxQueriesPerIPPerHour * - * @param int|null $maxQueriesPerIPPerHour Maximum number of API calls per hour allowed from a given IP address or a user token. + * @param int|null $maxQueriesPerIPPerHour maximum number of API calls per hour allowed from a given IP address or a user token * * @return self */ @@ -484,7 +484,7 @@ public function getCreatedAt() /** * Sets createdAt * - * @param \DateTime $createdAt Date of creation (ISO-8601 format). + * @param \DateTime $createdAt date of creation (ISO-8601 format) * * @return self */ @@ -497,9 +497,9 @@ public function setCreatedAt($createdAt) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -509,7 +509,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -538,7 +538,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -549,14 +549,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -583,4 +584,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/Languages.php b/clients/algoliasearch-client-php/lib/Model/Languages.php index 373bef4ce2..22624b2f6f 100644 --- a/clients/algoliasearch-client-php/lib/Model/Languages.php +++ b/clients/algoliasearch-client-php/lib/Model/Languages.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * Languages Class Doc Comment * * @category Class * @description A dictionary language. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -34,7 +35,7 @@ class Languages implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'plurals' => '\Algolia\AlgoliaSearch\Model\DictionaryLanguage', 'stopwords' => '\Algolia\AlgoliaSearch\Model\DictionaryLanguage', - 'compounds' => '\Algolia\AlgoliaSearch\Model\DictionaryLanguage' + 'compounds' => '\Algolia\AlgoliaSearch\Model\DictionaryLanguage', ]; /** @@ -47,7 +48,7 @@ class Languages implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'plurals' => null, 'stopwords' => null, - 'compounds' => null + 'compounds' => null, ]; /** @@ -79,7 +80,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'plurals' => 'plurals', 'stopwords' => 'stopwords', - 'compounds' => 'compounds' + 'compounds' => 'compounds', ]; /** @@ -90,7 +91,7 @@ public static function openAPIFormats() protected static $setters = [ 'plurals' => 'setPlurals', 'stopwords' => 'setStopwords', - 'compounds' => 'setCompounds' + 'compounds' => 'setCompounds', ]; /** @@ -101,7 +102,7 @@ public static function openAPIFormats() protected static $getters = [ 'plurals' => 'getPlurals', 'stopwords' => 'getStopwords', - 'compounds' => 'getCompounds' + 'compounds' => 'getCompounds', ]; /** @@ -145,7 +146,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -184,6 +184,7 @@ public function listInvalidProperties() if ($this->container['compounds'] === null) { $invalidProperties[] = "'compounds' can't be null"; } + return $invalidProperties; } @@ -198,7 +199,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets plurals * @@ -273,9 +273,9 @@ public function setCompounds($compounds) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -285,7 +285,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -314,7 +314,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -325,14 +325,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -359,4 +360,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/ListApiKeysResponse.php b/clients/algoliasearch-client-php/lib/Model/ListApiKeysResponse.php index 6ffa69ff60..3bc9ce390c 100644 --- a/clients/algoliasearch-client-php/lib/Model/ListApiKeysResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/ListApiKeysResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * ListApiKeysResponse Class Doc Comment @@ -31,7 +31,7 @@ class ListApiKeysResponse implements ModelInterface, ArrayAccess, \JsonSerializa * @var string[] */ protected static $openAPITypes = [ - 'keys' => '\Algolia\AlgoliaSearch\Model\KeyObject[]' + 'keys' => '\Algolia\AlgoliaSearch\Model\KeyObject[]', ]; /** @@ -42,7 +42,7 @@ class ListApiKeysResponse implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $openAPIFormats = [ - 'keys' => null + 'keys' => null, ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'keys' => 'keys' + 'keys' => 'keys', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'keys' => 'setKeys' + 'keys' => 'setKeys', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'keys' => 'getKeys' + 'keys' => 'getKeys', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -165,6 +164,7 @@ public function listInvalidProperties() if ($this->container['keys'] === null) { $invalidProperties[] = "'keys' can't be null"; } + return $invalidProperties; } @@ -179,7 +179,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets keys * @@ -193,7 +192,7 @@ public function getKeys() /** * Sets keys * - * @param \Algolia\AlgoliaSearch\Model\KeyObject[] $keys List of api keys. + * @param \Algolia\AlgoliaSearch\Model\KeyObject[] $keys list of api keys * * @return self */ @@ -206,9 +205,9 @@ public function setKeys($keys) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -218,7 +217,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -247,7 +246,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -258,14 +257,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -292,4 +292,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/ListClustersResponse.php b/clients/algoliasearch-client-php/lib/Model/ListClustersResponse.php index da37124416..9f47847915 100644 --- a/clients/algoliasearch-client-php/lib/Model/ListClustersResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/ListClustersResponse.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * ListClustersResponse Class Doc Comment * * @category Class * @description Array of clusters. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -32,7 +33,7 @@ class ListClustersResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ - 'topUsers' => 'string[]' + 'topUsers' => 'string[]', ]; /** @@ -43,7 +44,7 @@ class ListClustersResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ - 'topUsers' => null + 'topUsers' => null, ]; /** @@ -73,7 +74,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'topUsers' => 'topUsers' + 'topUsers' => 'topUsers', ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'topUsers' => 'setTopUsers' + 'topUsers' => 'setTopUsers', ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'topUsers' => 'getTopUsers' + 'topUsers' => 'getTopUsers', ]; /** @@ -135,7 +136,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -166,6 +166,7 @@ public function listInvalidProperties() if ($this->container['topUsers'] === null) { $invalidProperties[] = "'topUsers' can't be null"; } + return $invalidProperties; } @@ -180,7 +181,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets topUsers * @@ -194,7 +194,7 @@ public function getTopUsers() /** * Sets topUsers * - * @param string[] $topUsers Mapping of cluster names to top users. + * @param string[] $topUsers mapping of cluster names to top users * * @return self */ @@ -207,9 +207,9 @@ public function setTopUsers($topUsers) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -219,7 +219,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -248,7 +248,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -259,14 +259,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -293,4 +294,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/ListIndicesResponse.php b/clients/algoliasearch-client-php/lib/Model/ListIndicesResponse.php index 2177f69f96..b6cc55b479 100644 --- a/clients/algoliasearch-client-php/lib/Model/ListIndicesResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/ListIndicesResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * ListIndicesResponse Class Doc Comment @@ -32,7 +32,7 @@ class ListIndicesResponse implements ModelInterface, ArrayAccess, \JsonSerializa */ protected static $openAPITypes = [ 'items' => '\Algolia\AlgoliaSearch\Model\Index[]', - 'nbPages' => 'int' + 'nbPages' => 'int', ]; /** @@ -44,7 +44,7 @@ class ListIndicesResponse implements ModelInterface, ArrayAccess, \JsonSerializa */ protected static $openAPIFormats = [ 'items' => null, - 'nbPages' => null + 'nbPages' => null, ]; /** @@ -75,7 +75,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'items' => 'items', - 'nbPages' => 'nbPages' + 'nbPages' => 'nbPages', ]; /** @@ -85,7 +85,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'items' => 'setItems', - 'nbPages' => 'setNbPages' + 'nbPages' => 'setNbPages', ]; /** @@ -95,7 +95,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'items' => 'getItems', - 'nbPages' => 'getNbPages' + 'nbPages' => 'getNbPages', ]; /** @@ -139,7 +139,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -182,7 +181,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets items * @@ -196,7 +194,7 @@ public function getItems() /** * Sets items * - * @param \Algolia\AlgoliaSearch\Model\Index[]|null $items List of the fetched indices. + * @param \Algolia\AlgoliaSearch\Model\Index[]|null $items list of the fetched indices * * @return self */ @@ -220,7 +218,7 @@ public function getNbPages() /** * Sets nbPages * - * @param int|null $nbPages Number of pages. + * @param int|null $nbPages number of pages * * @return self */ @@ -233,9 +231,9 @@ public function setNbPages($nbPages) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -245,7 +243,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -274,7 +272,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -285,14 +283,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -319,4 +318,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/ListUserIdsResponse.php b/clients/algoliasearch-client-php/lib/Model/ListUserIdsResponse.php index 64b26c1d72..d26bb071df 100644 --- a/clients/algoliasearch-client-php/lib/Model/ListUserIdsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/ListUserIdsResponse.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * ListUserIdsResponse Class Doc Comment * * @category Class * @description UserIDs data. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -32,7 +33,7 @@ class ListUserIdsResponse implements ModelInterface, ArrayAccess, \JsonSerializa * @var string[] */ protected static $openAPITypes = [ - 'userIDs' => '\Algolia\AlgoliaSearch\Model\UserId[]' + 'userIDs' => '\Algolia\AlgoliaSearch\Model\UserId[]', ]; /** @@ -43,7 +44,7 @@ class ListUserIdsResponse implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $openAPIFormats = [ - 'userIDs' => null + 'userIDs' => null, ]; /** @@ -73,7 +74,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'userIDs' => 'userIDs' + 'userIDs' => 'userIDs', ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'userIDs' => 'setUserIDs' + 'userIDs' => 'setUserIDs', ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'userIDs' => 'getUserIDs' + 'userIDs' => 'getUserIDs', ]; /** @@ -135,7 +136,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -166,6 +166,7 @@ public function listInvalidProperties() if ($this->container['userIDs'] === null) { $invalidProperties[] = "'userIDs' can't be null"; } + return $invalidProperties; } @@ -180,7 +181,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets userIDs * @@ -194,7 +194,7 @@ public function getUserIDs() /** * Sets userIDs * - * @param \Algolia\AlgoliaSearch\Model\UserId[] $userIDs List of userIDs. + * @param \Algolia\AlgoliaSearch\Model\UserId[] $userIDs list of userIDs * * @return self */ @@ -207,9 +207,9 @@ public function setUserIDs($userIDs) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -219,7 +219,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -248,7 +248,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -259,14 +259,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -293,4 +294,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/MultipleBatchResponse.php b/clients/algoliasearch-client-php/lib/Model/MultipleBatchResponse.php index 605c71b9d8..9ae0fcc264 100644 --- a/clients/algoliasearch-client-php/lib/Model/MultipleBatchResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/MultipleBatchResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * MultipleBatchResponse Class Doc Comment @@ -32,7 +32,7 @@ class MultipleBatchResponse implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPITypes = [ 'taskID' => 'object', - 'objectIDs' => 'string[]' + 'objectIDs' => 'string[]', ]; /** @@ -44,7 +44,7 @@ class MultipleBatchResponse implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPIFormats = [ 'taskID' => null, - 'objectIDs' => null + 'objectIDs' => null, ]; /** @@ -75,7 +75,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'taskID' => 'taskID', - 'objectIDs' => 'objectIDs' + 'objectIDs' => 'objectIDs', ]; /** @@ -85,7 +85,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'taskID' => 'setTaskID', - 'objectIDs' => 'setObjectIDs' + 'objectIDs' => 'setObjectIDs', ]; /** @@ -95,7 +95,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'taskID' => 'getTaskID', - 'objectIDs' => 'getObjectIDs' + 'objectIDs' => 'getObjectIDs', ]; /** @@ -139,7 +139,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -182,7 +181,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets taskID * @@ -196,7 +194,7 @@ public function getTaskID() /** * Sets taskID * - * @param object|null $taskID List of tasksIDs per index. + * @param object|null $taskID list of tasksIDs per index * * @return self */ @@ -220,7 +218,7 @@ public function getObjectIDs() /** * Sets objectIDs * - * @param string[]|null $objectIDs List of objectID. + * @param string[]|null $objectIDs list of objectID * * @return self */ @@ -233,9 +231,9 @@ public function setObjectIDs($objectIDs) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -245,7 +243,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -274,7 +272,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -285,14 +283,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -319,4 +318,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/MultipleGetObjectsObject.php b/clients/algoliasearch-client-php/lib/Model/MultipleGetObjectsObject.php index ab47ce8284..c7aa0dff1b 100644 --- a/clients/algoliasearch-client-php/lib/Model/MultipleGetObjectsObject.php +++ b/clients/algoliasearch-client-php/lib/Model/MultipleGetObjectsObject.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * MultipleGetObjectsObject Class Doc Comment * * @category Class * @description GetObject operation on an index. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -34,7 +35,7 @@ class MultipleGetObjectsObject implements ModelInterface, ArrayAccess, \JsonSeri protected static $openAPITypes = [ 'attributesToRetrieve' => 'string[]', 'objectID' => 'string', - 'indexName' => 'string' + 'indexName' => 'string', ]; /** @@ -47,7 +48,7 @@ class MultipleGetObjectsObject implements ModelInterface, ArrayAccess, \JsonSeri protected static $openAPIFormats = [ 'attributesToRetrieve' => null, 'objectID' => null, - 'indexName' => null + 'indexName' => null, ]; /** @@ -79,7 +80,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'attributesToRetrieve' => 'attributesToRetrieve', 'objectID' => 'objectID', - 'indexName' => 'indexName' + 'indexName' => 'indexName', ]; /** @@ -90,7 +91,7 @@ public static function openAPIFormats() protected static $setters = [ 'attributesToRetrieve' => 'setAttributesToRetrieve', 'objectID' => 'setObjectID', - 'indexName' => 'setIndexName' + 'indexName' => 'setIndexName', ]; /** @@ -101,7 +102,7 @@ public static function openAPIFormats() protected static $getters = [ 'attributesToRetrieve' => 'getAttributesToRetrieve', 'objectID' => 'getObjectID', - 'indexName' => 'getIndexName' + 'indexName' => 'getIndexName', ]; /** @@ -145,7 +146,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -181,6 +181,7 @@ public function listInvalidProperties() if ($this->container['indexName'] === null) { $invalidProperties[] = "'indexName' can't be null"; } + return $invalidProperties; } @@ -195,7 +196,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets attributesToRetrieve * @@ -233,7 +233,7 @@ public function getObjectID() /** * Sets objectID * - * @param string $objectID ID of the object within that index. + * @param string $objectID ID of the object within that index * * @return self */ @@ -257,7 +257,7 @@ public function getIndexName() /** * Sets indexName * - * @param string $indexName name of the index containing the object. + * @param string $indexName name of the index containing the object * * @return self */ @@ -270,9 +270,9 @@ public function setIndexName($indexName) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -282,7 +282,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -311,7 +311,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -322,14 +322,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -356,4 +357,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/MultipleQueries.php b/clients/algoliasearch-client-php/lib/Model/MultipleQueries.php index f29705e627..65afdbdc7c 100644 --- a/clients/algoliasearch-client-php/lib/Model/MultipleQueries.php +++ b/clients/algoliasearch-client-php/lib/Model/MultipleQueries.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * MultipleQueries Class Doc Comment @@ -35,7 +35,7 @@ class MultipleQueries implements ModelInterface, ArrayAccess, \JsonSerializable 'query' => 'string', 'type' => 'string', 'facet' => 'string', - 'params' => 'string' + 'params' => 'string', ]; /** @@ -50,7 +50,7 @@ class MultipleQueries implements ModelInterface, ArrayAccess, \JsonSerializable 'query' => null, 'type' => null, 'facet' => null, - 'params' => null + 'params' => null, ]; /** @@ -84,7 +84,7 @@ public static function openAPIFormats() 'query' => 'query', 'type' => 'type', 'facet' => 'facet', - 'params' => 'params' + 'params' => 'params', ]; /** @@ -97,7 +97,7 @@ public static function openAPIFormats() 'query' => 'setQuery', 'type' => 'setType', 'facet' => 'setFacet', - 'params' => 'setParams' + 'params' => 'setParams', ]; /** @@ -110,7 +110,7 @@ public static function openAPIFormats() 'query' => 'getQuery', 'type' => 'getType', 'facet' => 'getFacet', - 'params' => 'getParams' + 'params' => 'getParams', ]; /** @@ -227,7 +227,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets indexName * @@ -241,7 +240,7 @@ public function getIndexName() /** * Sets indexName * - * @param string $indexName The Algolia index name. + * @param string $indexName the Algolia index name * * @return self */ @@ -265,7 +264,7 @@ public function getQuery() /** * Sets query * - * @param string|null $query The text to search in the index. + * @param string|null $query the text to search in the index * * @return self */ @@ -289,7 +288,7 @@ public function getType() /** * Sets type * - * @param string|null $type Perform a search query with `default`, will search for facet values if `facet` is given. + * @param string|null $type perform a search query with `default`, will search for facet values if `facet` is given * * @return self */ @@ -323,7 +322,7 @@ public function getFacet() /** * Sets facet * - * @param string|null $facet The `facet` name. + * @param string|null $facet the `facet` name * * @return self */ @@ -347,7 +346,7 @@ public function getParams() /** * Sets params * - * @param string|null $params A query string of search parameters. + * @param string|null $params a query string of search parameters * * @return self */ @@ -360,9 +359,9 @@ public function setParams($params) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -372,7 +371,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -401,7 +400,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -412,14 +411,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -446,4 +446,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/MultipleQueriesObject.php b/clients/algoliasearch-client-php/lib/Model/MultipleQueriesObject.php index 448a05f979..221f62ee03 100644 --- a/clients/algoliasearch-client-php/lib/Model/MultipleQueriesObject.php +++ b/clients/algoliasearch-client-php/lib/Model/MultipleQueriesObject.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * MultipleQueriesObject Class Doc Comment @@ -32,7 +32,7 @@ class MultipleQueriesObject implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPITypes = [ 'requests' => '\Algolia\AlgoliaSearch\Model\MultipleQueries[]', - 'strategy' => 'string' + 'strategy' => 'string', ]; /** @@ -44,7 +44,7 @@ class MultipleQueriesObject implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPIFormats = [ 'requests' => null, - 'strategy' => null + 'strategy' => null, ]; /** @@ -75,7 +75,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'requests' => 'requests', - 'strategy' => 'strategy' + 'strategy' => 'strategy', ]; /** @@ -85,7 +85,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'requests' => 'setRequests', - 'strategy' => 'setStrategy' + 'strategy' => 'setStrategy', ]; /** @@ -95,7 +95,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'requests' => 'getRequests', - 'strategy' => 'getStrategy' + 'strategy' => 'getStrategy', ]; /** @@ -209,7 +209,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets requests * @@ -270,9 +269,9 @@ public function setStrategy($strategy) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -282,7 +281,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -311,7 +310,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -322,14 +321,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -356,4 +356,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/MultipleQueriesResponse.php b/clients/algoliasearch-client-php/lib/Model/MultipleQueriesResponse.php index a5109a497d..8e9892d174 100644 --- a/clients/algoliasearch-client-php/lib/Model/MultipleQueriesResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/MultipleQueriesResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * MultipleQueriesResponse Class Doc Comment @@ -31,7 +31,7 @@ class MultipleQueriesResponse implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $openAPITypes = [ - 'results' => '\Algolia\AlgoliaSearch\Model\SearchResponse[]' + 'results' => '\Algolia\AlgoliaSearch\Model\SearchResponse[]', ]; /** @@ -42,7 +42,7 @@ class MultipleQueriesResponse implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null + 'results' => null, ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results' + 'results' => 'results', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults' + 'results' => 'setResults', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults' + 'results' => 'getResults', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -176,7 +175,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets results * @@ -203,9 +201,9 @@ public function setResults($results) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -215,7 +213,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -244,7 +242,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -255,14 +253,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -289,4 +288,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/Operation.php b/clients/algoliasearch-client-php/lib/Model/Operation.php index 8683c73b1b..93b42c78d4 100644 --- a/clients/algoliasearch-client-php/lib/Model/Operation.php +++ b/clients/algoliasearch-client-php/lib/Model/Operation.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * Operation Class Doc Comment @@ -33,7 +33,7 @@ class Operation implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'action' => '\Algolia\AlgoliaSearch\Model\Action', 'body' => 'object', - 'indexName' => 'string' + 'indexName' => 'string', ]; /** @@ -46,7 +46,7 @@ class Operation implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'action' => null, 'body' => null, - 'indexName' => null + 'indexName' => null, ]; /** @@ -78,7 +78,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'action' => 'action', 'body' => 'body', - 'indexName' => 'indexName' + 'indexName' => 'indexName', ]; /** @@ -89,7 +89,7 @@ public static function openAPIFormats() protected static $setters = [ 'action' => 'setAction', 'body' => 'setBody', - 'indexName' => 'setIndexName' + 'indexName' => 'setIndexName', ]; /** @@ -100,7 +100,7 @@ public static function openAPIFormats() protected static $getters = [ 'action' => 'getAction', 'body' => 'getBody', - 'indexName' => 'getIndexName' + 'indexName' => 'getIndexName', ]; /** @@ -144,7 +144,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -188,7 +187,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets action * @@ -226,7 +224,7 @@ public function getBody() /** * Sets body * - * @param object|null $body arguments to the operation (depends on the type of the operation). + * @param object|null $body arguments to the operation (depends on the type of the operation) * * @return self */ @@ -250,7 +248,7 @@ public function getIndexName() /** * Sets indexName * - * @param string|null $indexName Index to target for this operation. + * @param string|null $indexName index to target for this operation * * @return self */ @@ -263,9 +261,9 @@ public function setIndexName($indexName) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -275,7 +273,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -304,7 +302,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -315,14 +313,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -349,4 +348,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/OperationIndexObject.php b/clients/algoliasearch-client-php/lib/Model/OperationIndexObject.php index 6ce1064869..4b9696fb5e 100644 --- a/clients/algoliasearch-client-php/lib/Model/OperationIndexObject.php +++ b/clients/algoliasearch-client-php/lib/Model/OperationIndexObject.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * OperationIndexObject Class Doc Comment @@ -33,7 +33,7 @@ class OperationIndexObject implements ModelInterface, ArrayAccess, \JsonSerializ protected static $openAPITypes = [ 'operation' => 'string', 'destination' => 'string', - 'scope' => 'string[]' + 'scope' => 'string[]', ]; /** @@ -46,7 +46,7 @@ class OperationIndexObject implements ModelInterface, ArrayAccess, \JsonSerializ protected static $openAPIFormats = [ 'operation' => null, 'destination' => null, - 'scope' => null + 'scope' => null, ]; /** @@ -78,7 +78,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'operation' => 'operation', 'destination' => 'destination', - 'scope' => 'scope' + 'scope' => 'scope', ]; /** @@ -89,7 +89,7 @@ public static function openAPIFormats() protected static $setters = [ 'operation' => 'setOperation', 'destination' => 'setDestination', - 'scope' => 'setScope' + 'scope' => 'setScope', ]; /** @@ -100,7 +100,7 @@ public static function openAPIFormats() protected static $getters = [ 'operation' => 'getOperation', 'destination' => 'getDestination', - 'scope' => 'getScope' + 'scope' => 'getScope', ]; /** @@ -221,6 +221,7 @@ public function listInvalidProperties() if ($this->container['destination'] === null) { $invalidProperties[] = "'destination' can't be null"; } + return $invalidProperties; } @@ -235,7 +236,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets operation * @@ -249,7 +249,7 @@ public function getOperation() /** * Sets operation * - * @param string $operation Type of operation to perform (move or copy). + * @param string $operation type of operation to perform (move or copy) * * @return self */ @@ -283,7 +283,7 @@ public function getDestination() /** * Sets destination * - * @param string $destination The Algolia index name. + * @param string $destination the Algolia index name * * @return self */ @@ -329,9 +329,9 @@ public function setScope($scope) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -341,7 +341,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -370,7 +370,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -381,14 +381,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -415,4 +416,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/Params.php b/clients/algoliasearch-client-php/lib/Model/Params.php index 91841228dc..f177d67d17 100644 --- a/clients/algoliasearch-client-php/lib/Model/Params.php +++ b/clients/algoliasearch-client-php/lib/Model/Params.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * Params Class Doc Comment * * @category Class * @description Additional search parameters. Any valid search parameter is allowed. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -34,7 +35,7 @@ class Params implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'query' => 'string', 'automaticFacetFilters' => '\Algolia\AlgoliaSearch\Model\AutomaticFacetFilter[]', - 'automaticOptionalFacetFilters' => '\Algolia\AlgoliaSearch\Model\AutomaticFacetFilter[]' + 'automaticOptionalFacetFilters' => '\Algolia\AlgoliaSearch\Model\AutomaticFacetFilter[]', ]; /** @@ -47,7 +48,7 @@ class Params implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'query' => null, 'automaticFacetFilters' => null, - 'automaticOptionalFacetFilters' => null + 'automaticOptionalFacetFilters' => null, ]; /** @@ -79,7 +80,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'query' => 'query', 'automaticFacetFilters' => 'automaticFacetFilters', - 'automaticOptionalFacetFilters' => 'automaticOptionalFacetFilters' + 'automaticOptionalFacetFilters' => 'automaticOptionalFacetFilters', ]; /** @@ -90,7 +91,7 @@ public static function openAPIFormats() protected static $setters = [ 'query' => 'setQuery', 'automaticFacetFilters' => 'setAutomaticFacetFilters', - 'automaticOptionalFacetFilters' => 'setAutomaticOptionalFacetFilters' + 'automaticOptionalFacetFilters' => 'setAutomaticOptionalFacetFilters', ]; /** @@ -101,7 +102,7 @@ public static function openAPIFormats() protected static $getters = [ 'query' => 'getQuery', 'automaticFacetFilters' => 'getAutomaticFacetFilters', - 'automaticOptionalFacetFilters' => 'getAutomaticOptionalFacetFilters' + 'automaticOptionalFacetFilters' => 'getAutomaticOptionalFacetFilters', ]; /** @@ -145,7 +146,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -189,7 +189,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets query * @@ -203,7 +202,7 @@ public function getQuery() /** * Sets query * - * @param string|null $query Query string. + * @param string|null $query query string * * @return self */ @@ -227,7 +226,7 @@ public function getAutomaticFacetFilters() /** * Sets automaticFacetFilters * - * @param \Algolia\AlgoliaSearch\Model\AutomaticFacetFilter[]|null $automaticFacetFilters Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + * @param \Algolia\AlgoliaSearch\Model\AutomaticFacetFilter[]|null $automaticFacetFilters names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern * * @return self */ @@ -251,7 +250,7 @@ public function getAutomaticOptionalFacetFilters() /** * Sets automaticOptionalFacetFilters * - * @param \Algolia\AlgoliaSearch\Model\AutomaticFacetFilter[]|null $automaticOptionalFacetFilters Same syntax as automaticFacetFilters, but the engine treats the filters as optional. + * @param \Algolia\AlgoliaSearch\Model\AutomaticFacetFilter[]|null $automaticOptionalFacetFilters same syntax as automaticFacetFilters, but the engine treats the filters as optional * * @return self */ @@ -264,9 +263,9 @@ public function setAutomaticOptionalFacetFilters($automaticOptionalFacetFilters) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -276,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -305,7 +304,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -316,14 +315,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -350,4 +350,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/Promote.php b/clients/algoliasearch-client-php/lib/Model/Promote.php index 14718b1d2c..27b86fae58 100644 --- a/clients/algoliasearch-client-php/lib/Model/Promote.php +++ b/clients/algoliasearch-client-php/lib/Model/Promote.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * Promote Class Doc Comment * * @category Class * @description Object to promote as hits. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -34,7 +35,7 @@ class Promote implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'objectID' => 'string', 'objectIDs' => 'string[]', - 'position' => 'int' + 'position' => 'int', ]; /** @@ -47,7 +48,7 @@ class Promote implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'objectID' => null, 'objectIDs' => null, - 'position' => null + 'position' => null, ]; /** @@ -79,7 +80,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'objectID' => 'objectID', 'objectIDs' => 'objectIDs', - 'position' => 'position' + 'position' => 'position', ]; /** @@ -90,7 +91,7 @@ public static function openAPIFormats() protected static $setters = [ 'objectID' => 'setObjectID', 'objectIDs' => 'setObjectIDs', - 'position' => 'setPosition' + 'position' => 'setPosition', ]; /** @@ -101,7 +102,7 @@ public static function openAPIFormats() protected static $getters = [ 'objectID' => 'getObjectID', 'objectIDs' => 'getObjectIDs', - 'position' => 'getPosition' + 'position' => 'getPosition', ]; /** @@ -145,7 +146,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -178,6 +178,7 @@ public function listInvalidProperties() if ($this->container['position'] === null) { $invalidProperties[] = "'position' can't be null"; } + return $invalidProperties; } @@ -192,7 +193,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets objectID * @@ -206,7 +206,7 @@ public function getObjectID() /** * Sets objectID * - * @param string|null $objectID Unique identifier of the object to promote. + * @param string|null $objectID unique identifier of the object to promote * * @return self */ @@ -230,7 +230,7 @@ public function getObjectIDs() /** * Sets objectIDs * - * @param string[]|null $objectIDs Array of unique identifiers of the objects to promote. + * @param string[]|null $objectIDs array of unique identifiers of the objects to promote * * @return self */ @@ -267,9 +267,9 @@ public function setPosition($position) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -279,7 +279,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -308,7 +308,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -319,14 +319,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -353,4 +354,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/RankingInfo.php b/clients/algoliasearch-client-php/lib/Model/RankingInfo.php index 03196a4eb5..0818d4c0a0 100644 --- a/clients/algoliasearch-client-php/lib/Model/RankingInfo.php +++ b/clients/algoliasearch-client-php/lib/Model/RankingInfo.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * RankingInfo Class Doc Comment @@ -41,7 +41,7 @@ class RankingInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'promoted' => 'bool', 'proximityDistance' => 'int', 'userScore' => 'int', - 'word' => 'int' + 'word' => 'int', ]; /** @@ -62,7 +62,7 @@ class RankingInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'promoted' => null, 'proximityDistance' => null, 'userScore' => null, - 'word' => null + 'word' => null, ]; /** @@ -102,7 +102,7 @@ public static function openAPIFormats() 'promoted' => 'promoted', 'proximityDistance' => 'proximityDistance', 'userScore' => 'userScore', - 'word' => 'word' + 'word' => 'word', ]; /** @@ -121,7 +121,7 @@ public static function openAPIFormats() 'promoted' => 'setPromoted', 'proximityDistance' => 'setProximityDistance', 'userScore' => 'setUserScore', - 'word' => 'setWord' + 'word' => 'setWord', ]; /** @@ -140,7 +140,7 @@ public static function openAPIFormats() 'promoted' => 'getPromoted', 'proximityDistance' => 'getProximityDistance', 'userScore' => 'getUserScore', - 'word' => 'getWord' + 'word' => 'getWord', ]; /** @@ -184,7 +184,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -236,7 +235,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets filters * @@ -250,7 +248,7 @@ public function getFilters() /** * Sets filters * - * @param int|null $filters This field is reserved for advanced usage. + * @param int|null $filters this field is reserved for advanced usage * * @return self */ @@ -274,7 +272,7 @@ public function getFirstMatchedWord() /** * Sets firstMatchedWord * - * @param int|null $firstMatchedWord Position of the most important matched attribute in the attributes to index list. + * @param int|null $firstMatchedWord position of the most important matched attribute in the attributes to index list * * @return self */ @@ -298,7 +296,7 @@ public function getGeoDistance() /** * Sets geoDistance * - * @param int|null $geoDistance Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). + * @param int|null $geoDistance distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters) * * @return self */ @@ -322,7 +320,7 @@ public function getGeoPrecision() /** * Sets geoPrecision * - * @param int|null $geoPrecision Precision used when computing the geo distance, in meters. + * @param int|null $geoPrecision precision used when computing the geo distance, in meters * * @return self */ @@ -370,7 +368,7 @@ public function getNbExactWords() /** * Sets nbExactWords * - * @param int|null $nbExactWords Number of exactly matched words. + * @param int|null $nbExactWords number of exactly matched words * * @return self */ @@ -394,7 +392,7 @@ public function getNbTypos() /** * Sets nbTypos * - * @param int|null $nbTypos Number of typos encountered when matching the record. + * @param int|null $nbTypos number of typos encountered when matching the record * * @return self */ @@ -418,7 +416,7 @@ public function getPromoted() /** * Sets promoted * - * @param bool|null $promoted Present and set to true if a Rule promoted the hit. + * @param bool|null $promoted present and set to true if a Rule promoted the hit * * @return self */ @@ -442,7 +440,7 @@ public function getProximityDistance() /** * Sets proximityDistance * - * @param int|null $proximityDistance When the query contains more than one word, the sum of the distances between matched words (in meters). + * @param int|null $proximityDistance when the query contains more than one word, the sum of the distances between matched words (in meters) * * @return self */ @@ -466,7 +464,7 @@ public function getUserScore() /** * Sets userScore * - * @param int|null $userScore Custom ranking for the object, expressed as a single integer value. + * @param int|null $userScore custom ranking for the object, expressed as a single integer value * * @return self */ @@ -490,7 +488,7 @@ public function getWord() /** * Sets word * - * @param int|null $word Number of matched words, including prefixes and typos. + * @param int|null $word number of matched words, including prefixes and typos * * @return self */ @@ -503,9 +501,9 @@ public function setWord($word) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -515,7 +513,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -544,7 +542,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -555,14 +553,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -589,4 +588,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/RankingInfoMatchedGeoLocation.php b/clients/algoliasearch-client-php/lib/Model/RankingInfoMatchedGeoLocation.php index 40e0ff224f..cc946d6772 100644 --- a/clients/algoliasearch-client-php/lib/Model/RankingInfoMatchedGeoLocation.php +++ b/clients/algoliasearch-client-php/lib/Model/RankingInfoMatchedGeoLocation.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * RankingInfoMatchedGeoLocation Class Doc Comment @@ -33,7 +33,7 @@ class RankingInfoMatchedGeoLocation implements ModelInterface, ArrayAccess, \Jso protected static $openAPITypes = [ 'lat' => 'double', 'lng' => 'double', - 'distance' => 'int' + 'distance' => 'int', ]; /** @@ -46,7 +46,7 @@ class RankingInfoMatchedGeoLocation implements ModelInterface, ArrayAccess, \Jso protected static $openAPIFormats = [ 'lat' => 'double', 'lng' => 'double', - 'distance' => null + 'distance' => null, ]; /** @@ -78,7 +78,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'lat' => 'lat', 'lng' => 'lng', - 'distance' => 'distance' + 'distance' => 'distance', ]; /** @@ -89,7 +89,7 @@ public static function openAPIFormats() protected static $setters = [ 'lat' => 'setLat', 'lng' => 'setLng', - 'distance' => 'setDistance' + 'distance' => 'setDistance', ]; /** @@ -100,7 +100,7 @@ public static function openAPIFormats() protected static $getters = [ 'lat' => 'getLat', 'lng' => 'getLng', - 'distance' => 'getDistance' + 'distance' => 'getDistance', ]; /** @@ -144,7 +144,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -188,11 +187,10 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets lat * - * @return double|null + * @return float|null */ public function getLat() { @@ -202,7 +200,7 @@ public function getLat() /** * Sets lat * - * @param double|null $lat Latitude of the matched location. + * @param float|null $lat latitude of the matched location * * @return self */ @@ -216,7 +214,7 @@ public function setLat($lat) /** * Gets lng * - * @return double|null + * @return float|null */ public function getLng() { @@ -226,7 +224,7 @@ public function getLng() /** * Sets lng * - * @param double|null $lng Longitude of the matched location. + * @param float|null $lng longitude of the matched location * * @return self */ @@ -250,7 +248,7 @@ public function getDistance() /** * Sets distance * - * @param int|null $distance Distance between the matched location and the search location (in meters). + * @param int|null $distance distance between the matched location and the search location (in meters) * * @return self */ @@ -263,9 +261,9 @@ public function setDistance($distance) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -275,7 +273,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -304,7 +302,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -315,14 +313,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -349,4 +348,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/Record.php b/clients/algoliasearch-client-php/lib/Model/Record.php index cc58da5171..8865c7c54c 100644 --- a/clients/algoliasearch-client-php/lib/Model/Record.php +++ b/clients/algoliasearch-client-php/lib/Model/Record.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * Record Class Doc Comment * * @category Class * @description A single record. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -36,7 +37,7 @@ class Record implements ModelInterface, ArrayAccess, \JsonSerializable 'highlightResult' => '\Algolia\AlgoliaSearch\Model\HighlightResult', 'snippetResult' => '\Algolia\AlgoliaSearch\Model\SnippetResult', 'rankingInfo' => '\Algolia\AlgoliaSearch\Model\RankingInfo', - 'distinctSeqID' => 'int' + 'distinctSeqID' => 'int', ]; /** @@ -51,7 +52,7 @@ class Record implements ModelInterface, ArrayAccess, \JsonSerializable 'highlightResult' => null, 'snippetResult' => null, 'rankingInfo' => null, - 'distinctSeqID' => null + 'distinctSeqID' => null, ]; /** @@ -85,7 +86,7 @@ public static function openAPIFormats() 'highlightResult' => '_highlightResult', 'snippetResult' => '_snippetResult', 'rankingInfo' => '_rankingInfo', - 'distinctSeqID' => '_distinctSeqID' + 'distinctSeqID' => '_distinctSeqID', ]; /** @@ -98,7 +99,7 @@ public static function openAPIFormats() 'highlightResult' => 'setHighlightResult', 'snippetResult' => 'setSnippetResult', 'rankingInfo' => 'setRankingInfo', - 'distinctSeqID' => 'setDistinctSeqID' + 'distinctSeqID' => 'setDistinctSeqID', ]; /** @@ -111,7 +112,7 @@ public static function openAPIFormats() 'highlightResult' => 'getHighlightResult', 'snippetResult' => 'getSnippetResult', 'rankingInfo' => 'getRankingInfo', - 'distinctSeqID' => 'getDistinctSeqID' + 'distinctSeqID' => 'getDistinctSeqID', ]; /** @@ -155,7 +156,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -190,6 +190,7 @@ public function listInvalidProperties() if ($this->container['objectID'] === null) { $invalidProperties[] = "'objectID' can't be null"; } + return $invalidProperties; } @@ -204,7 +205,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets objectID * @@ -218,7 +218,7 @@ public function getObjectID() /** * Sets objectID * - * @param string $objectID Unique identifier of the object. + * @param string $objectID unique identifier of the object * * @return self */ @@ -327,9 +327,9 @@ public function setDistinctSeqID($distinctSeqID) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -339,7 +339,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -368,7 +368,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -379,14 +379,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -413,4 +414,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/RemoveUserIdResponse.php b/clients/algoliasearch-client-php/lib/Model/RemoveUserIdResponse.php index 0c70495abb..613ea7b881 100644 --- a/clients/algoliasearch-client-php/lib/Model/RemoveUserIdResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/RemoveUserIdResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * RemoveUserIdResponse Class Doc Comment @@ -31,7 +31,7 @@ class RemoveUserIdResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ - 'deletedAt' => '\DateTime' + 'deletedAt' => '\DateTime', ]; /** @@ -42,7 +42,7 @@ class RemoveUserIdResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ - 'deletedAt' => 'date-time' + 'deletedAt' => 'date-time', ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'deletedAt' => 'deletedAt' + 'deletedAt' => 'deletedAt', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'deletedAt' => 'setDeletedAt' + 'deletedAt' => 'setDeletedAt', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'deletedAt' => 'getDeletedAt' + 'deletedAt' => 'getDeletedAt', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -165,6 +164,7 @@ public function listInvalidProperties() if ($this->container['deletedAt'] === null) { $invalidProperties[] = "'deletedAt' can't be null"; } + return $invalidProperties; } @@ -179,7 +179,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets deletedAt * @@ -193,7 +192,7 @@ public function getDeletedAt() /** * Sets deletedAt * - * @param \DateTime $deletedAt Date of deletion (ISO-8601 format). + * @param \DateTime $deletedAt date of deletion (ISO-8601 format) * * @return self */ @@ -206,9 +205,9 @@ public function setDeletedAt($deletedAt) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -218,7 +217,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -247,7 +246,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -258,14 +257,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -292,4 +292,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/ReplaceSourceResponse.php b/clients/algoliasearch-client-php/lib/Model/ReplaceSourceResponse.php index 2b7487736e..76fdb9b512 100644 --- a/clients/algoliasearch-client-php/lib/Model/ReplaceSourceResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/ReplaceSourceResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * ReplaceSourceResponse Class Doc Comment @@ -31,7 +31,7 @@ class ReplaceSourceResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'updatedAt' => '\DateTime' + 'updatedAt' => '\DateTime', ]; /** @@ -42,7 +42,7 @@ class ReplaceSourceResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ - 'updatedAt' => 'date-time' + 'updatedAt' => 'date-time', ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'updatedAt' => 'updatedAt' + 'updatedAt' => 'updatedAt', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'updatedAt' => 'setUpdatedAt' + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'updatedAt' => 'getUpdatedAt' + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -165,6 +164,7 @@ public function listInvalidProperties() if ($this->container['updatedAt'] === null) { $invalidProperties[] = "'updatedAt' can't be null"; } + return $invalidProperties; } @@ -179,7 +179,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets updatedAt * @@ -193,7 +192,7 @@ public function getUpdatedAt() /** * Sets updatedAt * - * @param \DateTime $updatedAt Date of last update (ISO-8601 format). + * @param \DateTime $updatedAt date of last update (ISO-8601 format) * * @return self */ @@ -206,9 +205,9 @@ public function setUpdatedAt($updatedAt) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -218,7 +217,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -247,7 +246,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -258,14 +257,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -292,4 +292,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/RequiredSearchParams.php b/clients/algoliasearch-client-php/lib/Model/RequiredSearchParams.php index 180e14b0cd..9ad354fa1a 100644 --- a/clients/algoliasearch-client-php/lib/Model/RequiredSearchParams.php +++ b/clients/algoliasearch-client-php/lib/Model/RequiredSearchParams.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * RequiredSearchParams Class Doc Comment @@ -31,7 +31,7 @@ class RequiredSearchParams implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ - 'query' => 'string' + 'query' => 'string', ]; /** @@ -42,7 +42,7 @@ class RequiredSearchParams implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ - 'query' => null + 'query' => null, ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'query' => 'query' + 'query' => 'query', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'query' => 'setQuery' + 'query' => 'setQuery', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'query' => 'getQuery' + 'query' => 'getQuery', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -165,6 +164,7 @@ public function listInvalidProperties() if ($this->container['query'] === null) { $invalidProperties[] = "'query' can't be null"; } + return $invalidProperties; } @@ -179,7 +179,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets query * @@ -193,7 +192,7 @@ public function getQuery() /** * Sets query * - * @param string $query The text to search in the index. + * @param string $query the text to search in the index * * @return self */ @@ -206,9 +205,9 @@ public function setQuery($query) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -218,7 +217,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -247,7 +246,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -258,14 +257,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -292,4 +292,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/Rule.php b/clients/algoliasearch-client-php/lib/Model/Rule.php index ff0c3fb926..348f078ebe 100644 --- a/clients/algoliasearch-client-php/lib/Model/Rule.php +++ b/clients/algoliasearch-client-php/lib/Model/Rule.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * Rule Class Doc Comment * * @category Class * @description Rule object. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -37,7 +38,7 @@ class Rule implements ModelInterface, ArrayAccess, \JsonSerializable 'consequence' => '\Algolia\AlgoliaSearch\Model\Consequence', 'description' => 'string', 'enabled' => 'bool', - 'validity' => '\Algolia\AlgoliaSearch\Model\TimeRange[]' + 'validity' => '\Algolia\AlgoliaSearch\Model\TimeRange[]', ]; /** @@ -53,7 +54,7 @@ class Rule implements ModelInterface, ArrayAccess, \JsonSerializable 'consequence' => null, 'description' => null, 'enabled' => null, - 'validity' => null + 'validity' => null, ]; /** @@ -88,7 +89,7 @@ public static function openAPIFormats() 'consequence' => 'consequence', 'description' => 'description', 'enabled' => 'enabled', - 'validity' => 'validity' + 'validity' => 'validity', ]; /** @@ -102,7 +103,7 @@ public static function openAPIFormats() 'consequence' => 'setConsequence', 'description' => 'setDescription', 'enabled' => 'setEnabled', - 'validity' => 'setValidity' + 'validity' => 'setValidity', ]; /** @@ -116,7 +117,7 @@ public static function openAPIFormats() 'consequence' => 'getConsequence', 'description' => 'getDescription', 'enabled' => 'getEnabled', - 'validity' => 'getValidity' + 'validity' => 'getValidity', ]; /** @@ -160,7 +161,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -199,6 +199,7 @@ public function listInvalidProperties() if ($this->container['consequence'] === null) { $invalidProperties[] = "'consequence' can't be null"; } + return $invalidProperties; } @@ -213,7 +214,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets objectID * @@ -227,7 +227,7 @@ public function getObjectID() /** * Sets objectID * - * @param string $objectID Unique identifier of the object. + * @param string $objectID unique identifier of the object * * @return self */ @@ -360,9 +360,9 @@ public function setValidity($validity) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -372,7 +372,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -401,7 +401,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -412,14 +412,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -446,4 +447,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SaveObjectResponse.php b/clients/algoliasearch-client-php/lib/Model/SaveObjectResponse.php index 4b894609d1..f941a44abc 100644 --- a/clients/algoliasearch-client-php/lib/Model/SaveObjectResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/SaveObjectResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SaveObjectResponse Class Doc Comment @@ -33,7 +33,7 @@ class SaveObjectResponse implements ModelInterface, ArrayAccess, \JsonSerializab protected static $openAPITypes = [ 'createdAt' => 'string', 'taskID' => 'int', - 'objectID' => 'string' + 'objectID' => 'string', ]; /** @@ -46,7 +46,7 @@ class SaveObjectResponse implements ModelInterface, ArrayAccess, \JsonSerializab protected static $openAPIFormats = [ 'createdAt' => null, 'taskID' => null, - 'objectID' => null + 'objectID' => null, ]; /** @@ -78,7 +78,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'createdAt' => 'createdAt', 'taskID' => 'taskID', - 'objectID' => 'objectID' + 'objectID' => 'objectID', ]; /** @@ -89,7 +89,7 @@ public static function openAPIFormats() protected static $setters = [ 'createdAt' => 'setCreatedAt', 'taskID' => 'setTaskID', - 'objectID' => 'setObjectID' + 'objectID' => 'setObjectID', ]; /** @@ -100,7 +100,7 @@ public static function openAPIFormats() protected static $getters = [ 'createdAt' => 'getCreatedAt', 'taskID' => 'getTaskID', - 'objectID' => 'getObjectID' + 'objectID' => 'getObjectID', ]; /** @@ -144,7 +144,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -188,7 +187,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets createdAt * @@ -226,7 +224,7 @@ public function getTaskID() /** * Sets taskID * - * @param int|null $taskID taskID of the indexing task to wait for. + * @param int|null $taskID taskID of the indexing task to wait for * * @return self */ @@ -250,7 +248,7 @@ public function getObjectID() /** * Sets objectID * - * @param string|null $objectID Unique identifier of the object. + * @param string|null $objectID unique identifier of the object * * @return self */ @@ -263,9 +261,9 @@ public function setObjectID($objectID) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -275,7 +273,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -304,7 +302,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -315,14 +313,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -349,4 +348,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SaveSynonymResponse.php b/clients/algoliasearch-client-php/lib/Model/SaveSynonymResponse.php index 5781c715c7..2cc8ccc681 100644 --- a/clients/algoliasearch-client-php/lib/Model/SaveSynonymResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/SaveSynonymResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SaveSynonymResponse Class Doc Comment @@ -33,7 +33,7 @@ class SaveSynonymResponse implements ModelInterface, ArrayAccess, \JsonSerializa protected static $openAPITypes = [ 'taskID' => 'int', 'updatedAt' => '\DateTime', - 'id' => 'string' + 'id' => 'string', ]; /** @@ -46,7 +46,7 @@ class SaveSynonymResponse implements ModelInterface, ArrayAccess, \JsonSerializa protected static $openAPIFormats = [ 'taskID' => null, 'updatedAt' => 'date-time', - 'id' => null + 'id' => null, ]; /** @@ -78,7 +78,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'taskID' => 'taskID', 'updatedAt' => 'updatedAt', - 'id' => 'id' + 'id' => 'id', ]; /** @@ -89,7 +89,7 @@ public static function openAPIFormats() protected static $setters = [ 'taskID' => 'setTaskID', 'updatedAt' => 'setUpdatedAt', - 'id' => 'setId' + 'id' => 'setId', ]; /** @@ -100,7 +100,7 @@ public static function openAPIFormats() protected static $getters = [ 'taskID' => 'getTaskID', 'updatedAt' => 'getUpdatedAt', - 'id' => 'getId' + 'id' => 'getId', ]; /** @@ -144,7 +144,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -183,6 +182,7 @@ public function listInvalidProperties() if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + return $invalidProperties; } @@ -197,7 +197,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets taskID * @@ -211,7 +210,7 @@ public function getTaskID() /** * Sets taskID * - * @param int $taskID taskID of the indexing task to wait for. + * @param int $taskID taskID of the indexing task to wait for * * @return self */ @@ -235,7 +234,7 @@ public function getUpdatedAt() /** * Sets updatedAt * - * @param \DateTime $updatedAt Date of last update (ISO-8601 format). + * @param \DateTime $updatedAt date of last update (ISO-8601 format) * * @return self */ @@ -259,7 +258,7 @@ public function getId() /** * Sets id * - * @param string $id objectID of the inserted object. + * @param string $id objectID of the inserted object * * @return self */ @@ -272,9 +271,9 @@ public function setId($id) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -284,7 +283,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -313,7 +312,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -324,14 +323,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -358,4 +358,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchDictionaryEntries.php b/clients/algoliasearch-client-php/lib/Model/SearchDictionaryEntries.php index 1db78c1742..f43a843699 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchDictionaryEntries.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchDictionaryEntries.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchDictionaryEntries Class Doc Comment * * @category Class * @description The `searchDictionaryEntries` request. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -35,7 +36,7 @@ class SearchDictionaryEntries implements ModelInterface, ArrayAccess, \JsonSeria 'query' => 'string', 'page' => 'int', 'hitsPerPage' => 'int', - 'language' => 'string' + 'language' => 'string', ]; /** @@ -49,7 +50,7 @@ class SearchDictionaryEntries implements ModelInterface, ArrayAccess, \JsonSeria 'query' => null, 'page' => null, 'hitsPerPage' => null, - 'language' => null + 'language' => null, ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() 'query' => 'query', 'page' => 'page', 'hitsPerPage' => 'hitsPerPage', - 'language' => 'language' + 'language' => 'language', ]; /** @@ -94,7 +95,7 @@ public static function openAPIFormats() 'query' => 'setQuery', 'page' => 'setPage', 'hitsPerPage' => 'setHitsPerPage', - 'language' => 'setLanguage' + 'language' => 'setLanguage', ]; /** @@ -106,7 +107,7 @@ public static function openAPIFormats() 'query' => 'getQuery', 'page' => 'getPage', 'hitsPerPage' => 'getHitsPerPage', - 'language' => 'getLanguage' + 'language' => 'getLanguage', ]; /** @@ -150,7 +151,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -184,6 +184,7 @@ public function listInvalidProperties() if ($this->container['query'] === null) { $invalidProperties[] = "'query' can't be null"; } + return $invalidProperties; } @@ -198,7 +199,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets query * @@ -212,7 +212,7 @@ public function getQuery() /** * Sets query * - * @param string $query The text to search in the index. + * @param string $query the text to search in the index * * @return self */ @@ -236,7 +236,7 @@ public function getPage() /** * Sets page * - * @param int|null $page Specify the page to retrieve. + * @param int|null $page specify the page to retrieve * * @return self */ @@ -260,7 +260,7 @@ public function getHitsPerPage() /** * Sets hitsPerPage * - * @param int|null $hitsPerPage Set the number of hits per page. + * @param int|null $hitsPerPage set the number of hits per page * * @return self */ @@ -297,9 +297,9 @@ public function setLanguage($language) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -309,7 +309,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -338,7 +338,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -349,14 +349,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -383,4 +384,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchForFacetValuesRequest.php b/clients/algoliasearch-client-php/lib/Model/SearchForFacetValuesRequest.php index 9ab47c9980..941510a8ee 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchForFacetValuesRequest.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchForFacetValuesRequest.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchForFacetValuesRequest Class Doc Comment @@ -33,7 +33,7 @@ class SearchForFacetValuesRequest implements ModelInterface, ArrayAccess, \JsonS protected static $openAPITypes = [ 'params' => 'string', 'facetQuery' => 'string', - 'maxFacetHits' => 'int' + 'maxFacetHits' => 'int', ]; /** @@ -46,7 +46,7 @@ class SearchForFacetValuesRequest implements ModelInterface, ArrayAccess, \JsonS protected static $openAPIFormats = [ 'params' => null, 'facetQuery' => null, - 'maxFacetHits' => null + 'maxFacetHits' => null, ]; /** @@ -78,7 +78,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'params' => 'params', 'facetQuery' => 'facetQuery', - 'maxFacetHits' => 'maxFacetHits' + 'maxFacetHits' => 'maxFacetHits', ]; /** @@ -89,7 +89,7 @@ public static function openAPIFormats() protected static $setters = [ 'params' => 'setParams', 'facetQuery' => 'setFacetQuery', - 'maxFacetHits' => 'setMaxFacetHits' + 'maxFacetHits' => 'setMaxFacetHits', ]; /** @@ -100,7 +100,7 @@ public static function openAPIFormats() protected static $getters = [ 'params' => 'getParams', 'facetQuery' => 'getFacetQuery', - 'maxFacetHits' => 'getMaxFacetHits' + 'maxFacetHits' => 'getMaxFacetHits', ]; /** @@ -144,7 +144,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -192,7 +191,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets params * @@ -206,7 +204,7 @@ public function getParams() /** * Sets params * - * @param string|null $params Search parameters as URL-encoded query string. + * @param string|null $params search parameters as URL-encoded query string * * @return self */ @@ -230,7 +228,7 @@ public function getFacetQuery() /** * Sets facetQuery * - * @param string|null $facetQuery Text to search inside the facet's values. + * @param string|null $facetQuery text to search inside the facet's values * * @return self */ @@ -260,7 +258,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling SearchForFacetValuesRequest., must be smaller than or equal to 100.'); } @@ -272,9 +269,9 @@ public function setMaxFacetHits($maxFacetHits) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -284,7 +281,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -313,7 +310,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -324,14 +321,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -358,4 +356,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchForFacetValuesResponse.php b/clients/algoliasearch-client-php/lib/Model/SearchForFacetValuesResponse.php index 7f1bfa58fa..c69a1144ef 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchForFacetValuesResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchForFacetValuesResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchForFacetValuesResponse Class Doc Comment @@ -31,7 +31,7 @@ class SearchForFacetValuesResponse implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ - 'facetHits' => '\Algolia\AlgoliaSearch\Model\SearchForFacetValuesResponseFacetHits[]' + 'facetHits' => '\Algolia\AlgoliaSearch\Model\SearchForFacetValuesResponseFacetHits[]', ]; /** @@ -42,7 +42,7 @@ class SearchForFacetValuesResponse implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ - 'facetHits' => null + 'facetHits' => null, ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'facetHits' => 'facetHits' + 'facetHits' => 'facetHits', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'facetHits' => 'setFacetHits' + 'facetHits' => 'setFacetHits', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'facetHits' => 'getFacetHits' + 'facetHits' => 'getFacetHits', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -165,6 +164,7 @@ public function listInvalidProperties() if ($this->container['facetHits'] === null) { $invalidProperties[] = "'facetHits' can't be null"; } + return $invalidProperties; } @@ -179,7 +179,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets facetHits * @@ -206,9 +205,9 @@ public function setFacetHits($facetHits) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -218,7 +217,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -247,7 +246,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -258,14 +257,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -292,4 +292,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchForFacetValuesResponseFacetHits.php b/clients/algoliasearch-client-php/lib/Model/SearchForFacetValuesResponseFacetHits.php index 0b4efb1a49..f5c7b8bba5 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchForFacetValuesResponseFacetHits.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchForFacetValuesResponseFacetHits.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchForFacetValuesResponseFacetHits Class Doc Comment @@ -33,7 +33,7 @@ class SearchForFacetValuesResponseFacetHits implements ModelInterface, ArrayAcce protected static $openAPITypes = [ 'value' => 'string', 'highlighted' => 'string', - 'count' => 'int' + 'count' => 'int', ]; /** @@ -46,7 +46,7 @@ class SearchForFacetValuesResponseFacetHits implements ModelInterface, ArrayAcce protected static $openAPIFormats = [ 'value' => null, 'highlighted' => null, - 'count' => null + 'count' => null, ]; /** @@ -78,7 +78,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'value' => 'value', 'highlighted' => 'highlighted', - 'count' => 'count' + 'count' => 'count', ]; /** @@ -89,7 +89,7 @@ public static function openAPIFormats() protected static $setters = [ 'value' => 'setValue', 'highlighted' => 'setHighlighted', - 'count' => 'setCount' + 'count' => 'setCount', ]; /** @@ -100,7 +100,7 @@ public static function openAPIFormats() protected static $getters = [ 'value' => 'getValue', 'highlighted' => 'getHighlighted', - 'count' => 'getCount' + 'count' => 'getCount', ]; /** @@ -144,7 +144,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -183,6 +182,7 @@ public function listInvalidProperties() if ($this->container['count'] === null) { $invalidProperties[] = "'count' can't be null"; } + return $invalidProperties; } @@ -197,7 +197,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets value * @@ -211,7 +210,7 @@ public function getValue() /** * Sets value * - * @param string $value Raw value of the facet. + * @param string $value raw value of the facet * * @return self */ @@ -235,7 +234,7 @@ public function getHighlighted() /** * Sets highlighted * - * @param string $highlighted Markup text with occurrences highlighted. + * @param string $highlighted markup text with occurrences highlighted * * @return self */ @@ -272,9 +271,9 @@ public function setCount($count) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -284,7 +283,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -313,7 +312,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -324,14 +323,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -358,4 +358,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchHits.php b/clients/algoliasearch-client-php/lib/Model/SearchHits.php index 98d474deaf..9eea6d0bd9 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchHits.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchHits.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchHits Class Doc Comment @@ -31,7 +31,7 @@ class SearchHits implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'hits' => '\Algolia\AlgoliaSearch\Model\Record[]' + 'hits' => '\Algolia\AlgoliaSearch\Model\Record[]', ]; /** @@ -42,7 +42,7 @@ class SearchHits implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'hits' => null + 'hits' => null, ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'hits' => 'hits' + 'hits' => 'hits', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'hits' => 'setHits' + 'hits' => 'setHits', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'hits' => 'getHits' + 'hits' => 'getHits', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -176,7 +175,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets hits * @@ -203,9 +201,9 @@ public function setHits($hits) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -215,7 +213,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -244,7 +242,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -255,14 +253,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -289,4 +288,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchParams.php b/clients/algoliasearch-client-php/lib/Model/SearchParams.php index 184d6356e4..ec002c5001 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchParams.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchParams.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchParams Class Doc Comment @@ -108,7 +108,7 @@ class SearchParams implements ModelInterface, ArrayAccess, \JsonSerializable 'responseFields' => 'string[]', 'maxFacetHits' => 'int', 'attributeCriteriaComputedByMinProximity' => 'bool', - 'renderingContent' => 'object' + 'renderingContent' => 'object', ]; /** @@ -196,7 +196,7 @@ class SearchParams implements ModelInterface, ArrayAccess, \JsonSerializable 'responseFields' => null, 'maxFacetHits' => null, 'attributeCriteriaComputedByMinProximity' => null, - 'renderingContent' => null + 'renderingContent' => null, ]; /** @@ -303,7 +303,7 @@ public static function openAPIFormats() 'responseFields' => 'responseFields', 'maxFacetHits' => 'maxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'attributeCriteriaComputedByMinProximity', - 'renderingContent' => 'renderingContent' + 'renderingContent' => 'renderingContent', ]; /** @@ -389,7 +389,7 @@ public static function openAPIFormats() 'responseFields' => 'setResponseFields', 'maxFacetHits' => 'setMaxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'setAttributeCriteriaComputedByMinProximity', - 'renderingContent' => 'setRenderingContent' + 'renderingContent' => 'setRenderingContent', ]; /** @@ -475,7 +475,7 @@ public static function openAPIFormats() 'responseFields' => 'getResponseFields', 'maxFacetHits' => 'getMaxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'getAttributeCriteriaComputedByMinProximity', - 'renderingContent' => 'getRenderingContent' + 'renderingContent' => 'getRenderingContent', ]; /** @@ -813,7 +813,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets params * @@ -827,7 +826,7 @@ public function getParams() /** * Sets params * - * @param string|null $params Search parameters as URL-encoded query string. + * @param string|null $params search parameters as URL-encoded query string * * @return self */ @@ -851,7 +850,7 @@ public function getSimilarQuery() /** * Sets similarQuery * - * @param string|null $similarQuery Overrides the query parameter and performs a more generic search that can be used to find \"similar\" results. + * @param string|null $similarQuery overrides the query parameter and performs a more generic search that can be used to find \"similar\" results * * @return self */ @@ -875,7 +874,7 @@ public function getFilters() /** * Sets filters * - * @param string|null $filters Filter the query with numeric, facet and/or tag filters. + * @param string|null $filters filter the query with numeric, facet and/or tag filters * * @return self */ @@ -899,7 +898,7 @@ public function getFacetFilters() /** * Sets facetFilters * - * @param string[]|null $facetFilters Filter hits by facet value. + * @param string[]|null $facetFilters filter hits by facet value * * @return self */ @@ -923,7 +922,7 @@ public function getOptionalFilters() /** * Sets optionalFilters * - * @param string[]|null $optionalFilters Create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter. + * @param string[]|null $optionalFilters create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter * * @return self */ @@ -947,7 +946,7 @@ public function getNumericFilters() /** * Sets numericFilters * - * @param string[]|null $numericFilters Filter on numeric attributes. + * @param string[]|null $numericFilters filter on numeric attributes * * @return self */ @@ -971,7 +970,7 @@ public function getTagFilters() /** * Sets tagFilters * - * @param string[]|null $tagFilters Filter hits by tags. + * @param string[]|null $tagFilters filter hits by tags * * @return self */ @@ -995,7 +994,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores * - * @param bool|null $sumOrFiltersScores Determines how to calculate the total score for filtering. + * @param bool|null $sumOrFiltersScores determines how to calculate the total score for filtering * * @return self */ @@ -1019,7 +1018,7 @@ public function getFacets() /** * Sets facets * - * @param string[]|null $facets Retrieve facets and their facet values. + * @param string[]|null $facets retrieve facets and their facet values * * @return self */ @@ -1043,7 +1042,7 @@ public function getMaxValuesPerFacet() /** * Sets maxValuesPerFacet * - * @param int|null $maxValuesPerFacet Maximum number of facet values to return for each facet during a regular search. + * @param int|null $maxValuesPerFacet maximum number of facet values to return for each facet during a regular search * * @return self */ @@ -1067,7 +1066,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct * - * @param bool|null $facetingAfterDistinct Force faceting to be applied after de-duplication (via the Distinct setting). + * @param bool|null $facetingAfterDistinct force faceting to be applied after de-duplication (via the Distinct setting) * * @return self */ @@ -1091,7 +1090,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy * - * @param string|null $sortFacetValuesBy Controls how facet values are fetched. + * @param string|null $sortFacetValuesBy controls how facet values are fetched * * @return self */ @@ -1115,7 +1114,7 @@ public function getPage() /** * Sets page * - * @param int|null $page Specify the page to retrieve. + * @param int|null $page specify the page to retrieve * * @return self */ @@ -1139,7 +1138,7 @@ public function getOffset() /** * Sets offset * - * @param int|null $offset Specify the offset of the first hit to return. + * @param int|null $offset specify the offset of the first hit to return * * @return self */ @@ -1163,13 +1162,12 @@ public function getLength() /** * Sets length * - * @param int|null $length Set the number of hits to retrieve (used only with offset). + * @param int|null $length set the number of hits to retrieve (used only with offset) * * @return self */ public function setLength($length) { - if (!is_null($length) && ($length > 1000)) { throw new \InvalidArgumentException('invalid value for $length when calling SearchParams., must be smaller than or equal to 1000.'); } @@ -1195,7 +1193,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng * - * @param string|null $aroundLatLng Search for entries around a central geolocation, enabling a geo search within a circular area. + * @param string|null $aroundLatLng search for entries around a central geolocation, enabling a geo search within a circular area * * @return self */ @@ -1219,7 +1217,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP * - * @param bool|null $aroundLatLngViaIP Search for entries around a given location automatically computed from the requester's IP address. + * @param bool|null $aroundLatLngViaIP search for entries around a given location automatically computed from the requester's IP address * * @return self */ @@ -1243,7 +1241,7 @@ public function getAroundRadius() /** * Sets aroundRadius * - * @param OneOfIntegerString|null $aroundRadius Define the maximum radius for a geo search (in meters). + * @param OneOfIntegerString|null $aroundRadius define the maximum radius for a geo search (in meters) * * @return self */ @@ -1267,7 +1265,7 @@ public function getAroundPrecision() /** * Sets aroundPrecision * - * @param int|null $aroundPrecision Precision of geo search (in meters), to add grouping by geo location to the ranking formula. + * @param int|null $aroundPrecision precision of geo search (in meters), to add grouping by geo location to the ranking formula * * @return self */ @@ -1291,13 +1289,12 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius * - * @param int|null $minimumAroundRadius Minimum radius (in meters) used for a geo search when aroundRadius is not set. + * @param int|null $minimumAroundRadius minimum radius (in meters) used for a geo search when aroundRadius is not set * * @return self */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling SearchParams., must be bigger than or equal to 1.'); } @@ -1320,7 +1317,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox * - * @param float[]|null $insideBoundingBox Search inside a rectangular area (in geo coordinates). + * @param float[]|null $insideBoundingBox search inside a rectangular area (in geo coordinates) * * @return self */ @@ -1344,7 +1341,7 @@ public function getInsidePolygon() /** * Sets insidePolygon * - * @param float[]|null $insidePolygon Search inside a polygon (in geo coordinates). + * @param float[]|null $insidePolygon search inside a polygon (in geo coordinates) * * @return self */ @@ -1392,7 +1389,7 @@ public function getRuleContexts() /** * Sets ruleContexts * - * @param string[]|null $ruleContexts Enables contextual rules. + * @param string[]|null $ruleContexts enables contextual rules * * @return self */ @@ -1416,7 +1413,7 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact * - * @param int|null $personalizationImpact Define the impact of the Personalization feature. + * @param int|null $personalizationImpact define the impact of the Personalization feature * * @return self */ @@ -1440,7 +1437,7 @@ public function getUserToken() /** * Sets userToken * - * @param string|null $userToken Associates a certain user token with the current search. + * @param string|null $userToken associates a certain user token with the current search * * @return self */ @@ -1464,7 +1461,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo * - * @param bool|null $getRankingInfo Retrieve detailed ranking information. + * @param bool|null $getRankingInfo retrieve detailed ranking information * * @return self */ @@ -1488,7 +1485,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics * - * @param bool|null $clickAnalytics Enable the Click Analytics feature. + * @param bool|null $clickAnalytics enable the Click Analytics feature * * @return self */ @@ -1512,7 +1509,7 @@ public function getAnalytics() /** * Sets analytics * - * @param bool|null $analytics Whether the current query will be taken into account in the Analytics. + * @param bool|null $analytics whether the current query will be taken into account in the Analytics * * @return self */ @@ -1536,7 +1533,7 @@ public function getAnalyticsTags() /** * Sets analyticsTags * - * @param string[]|null $analyticsTags List of tags to apply to the query for analytics purposes. + * @param string[]|null $analyticsTags list of tags to apply to the query for analytics purposes * * @return self */ @@ -1560,7 +1557,7 @@ public function getPercentileComputation() /** * Sets percentileComputation * - * @param bool|null $percentileComputation Whether to include or exclude a query from the processing-time percentile computation. + * @param bool|null $percentileComputation whether to include or exclude a query from the processing-time percentile computation * * @return self */ @@ -1584,7 +1581,7 @@ public function getEnableABTest() /** * Sets enableABTest * - * @param bool|null $enableABTest Whether this search should participate in running AB tests. + * @param bool|null $enableABTest whether this search should participate in running AB tests * * @return self */ @@ -1608,7 +1605,7 @@ public function getEnableReRanking() /** * Sets enableReRanking * - * @param bool|null $enableReRanking Whether this search should use AI Re-Ranking. + * @param bool|null $enableReRanking whether this search should use AI Re-Ranking * * @return self */ @@ -1632,7 +1629,7 @@ public function getQuery() /** * Sets query * - * @param string $query The text to search in the index. + * @param string $query the text to search in the index * * @return self */ @@ -1656,7 +1653,7 @@ public function getSearchableAttributes() /** * Sets searchableAttributes * - * @param string[]|null $searchableAttributes The complete list of attributes used for searching. + * @param string[]|null $searchableAttributes the complete list of attributes used for searching * * @return self */ @@ -1680,7 +1677,7 @@ public function getAttributesForFaceting() /** * Sets attributesForFaceting * - * @param string[]|null $attributesForFaceting The complete list of attributes that will be used for faceting. + * @param string[]|null $attributesForFaceting the complete list of attributes that will be used for faceting * * @return self */ @@ -1704,7 +1701,7 @@ public function getUnretrievableAttributes() /** * Sets unretrievableAttributes * - * @param string[]|null $unretrievableAttributes List of attributes that can't be retrieved at query time. + * @param string[]|null $unretrievableAttributes list of attributes that can't be retrieved at query time * * @return self */ @@ -1728,7 +1725,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve * - * @param string[]|null $attributesToRetrieve This parameter controls which attributes to retrieve and which not to retrieve. + * @param string[]|null $attributesToRetrieve this parameter controls which attributes to retrieve and which not to retrieve * * @return self */ @@ -1752,7 +1749,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes * - * @param string[]|null $restrictSearchableAttributes Restricts a given query to look in only a subset of your searchable attributes. + * @param string[]|null $restrictSearchableAttributes restricts a given query to look in only a subset of your searchable attributes * * @return self */ @@ -1776,7 +1773,7 @@ public function getRanking() /** * Sets ranking * - * @param string[]|null $ranking Controls how Algolia should sort your results. + * @param string[]|null $ranking controls how Algolia should sort your results * * @return self */ @@ -1800,7 +1797,7 @@ public function getCustomRanking() /** * Sets customRanking * - * @param string[]|null $customRanking Specifies the custom ranking criterion. + * @param string[]|null $customRanking specifies the custom ranking criterion * * @return self */ @@ -1824,7 +1821,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness * - * @param int|null $relevancyStrictness Controls the relevancy threshold below which less relevant results aren't included in the results. + * @param int|null $relevancyStrictness controls the relevancy threshold below which less relevant results aren't included in the results * * @return self */ @@ -1848,7 +1845,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight * - * @param string[]|null $attributesToHighlight List of attributes to highlight. + * @param string[]|null $attributesToHighlight list of attributes to highlight * * @return self */ @@ -1872,7 +1869,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet * - * @param string[]|null $attributesToSnippet List of attributes to snippet, with an optional maximum number of words to snippet. + * @param string[]|null $attributesToSnippet list of attributes to snippet, with an optional maximum number of words to snippet * * @return self */ @@ -1896,7 +1893,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag * - * @param string|null $highlightPreTag The HTML string to insert before the highlighted parts in all highlight and snippet results. + * @param string|null $highlightPreTag the HTML string to insert before the highlighted parts in all highlight and snippet results * * @return self */ @@ -1920,7 +1917,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag * - * @param string|null $highlightPostTag The HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param string|null $highlightPostTag the HTML string to insert after the highlighted parts in all highlight and snippet results * * @return self */ @@ -1944,7 +1941,7 @@ public function getSnippetEllipsisText() /** * Sets snippetEllipsisText * - * @param string|null $snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. + * @param string|null $snippetEllipsisText string used as an ellipsis indicator when a snippet is truncated * * @return self */ @@ -1968,7 +1965,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays * - * @param bool|null $restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param bool|null $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query * * @return self */ @@ -1992,7 +1989,7 @@ public function getHitsPerPage() /** * Sets hitsPerPage * - * @param int|null $hitsPerPage Set the number of hits per page. + * @param int|null $hitsPerPage set the number of hits per page * * @return self */ @@ -2016,7 +2013,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo * - * @param int|null $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with 1 typo. + * @param int|null $minWordSizefor1Typo minimum number of characters a word in the query string must contain to accept matches with 1 typo * * @return self */ @@ -2040,7 +2037,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos * - * @param int|null $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with 2 typos. + * @param int|null $minWordSizefor2Typos minimum number of characters a word in the query string must contain to accept matches with 2 typos * * @return self */ @@ -2064,7 +2061,7 @@ public function getTypoTolerance() /** * Sets typoTolerance * - * @param string|null $typoTolerance Controls whether typo tolerance is enabled and how it is applied. + * @param string|null $typoTolerance controls whether typo tolerance is enabled and how it is applied * * @return self */ @@ -2098,7 +2095,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens * - * @param bool|null $allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * @param bool|null $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string * * @return self */ @@ -2122,7 +2119,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes * - * @param string[]|null $disableTypoToleranceOnAttributes List of attributes on which you want to disable typo tolerance. + * @param string[]|null $disableTypoToleranceOnAttributes list of attributes on which you want to disable typo tolerance * * @return self */ @@ -2146,7 +2143,7 @@ public function getSeparatorsToIndex() /** * Sets separatorsToIndex * - * @param string|null $separatorsToIndex Control which separators are indexed. + * @param string|null $separatorsToIndex control which separators are indexed * * @return self */ @@ -2170,7 +2167,7 @@ public function getIgnorePlurals() /** * Sets ignorePlurals * - * @param string|null $ignorePlurals Treats singular, plurals, and other forms of declensions as matching terms. + * @param string|null $ignorePlurals treats singular, plurals, and other forms of declensions as matching terms * * @return self */ @@ -2194,7 +2191,7 @@ public function getRemoveStopWords() /** * Sets removeStopWords * - * @param string|null $removeStopWords Removes stop (common) words from the query before executing it. + * @param string|null $removeStopWords removes stop (common) words from the query before executing it * * @return self */ @@ -2218,7 +2215,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters * - * @param string|null $keepDiacriticsOnCharacters List of characters that the engine shouldn't automatically normalize. + * @param string|null $keepDiacriticsOnCharacters list of characters that the engine shouldn't automatically normalize * * @return self */ @@ -2242,7 +2239,7 @@ public function getQueryLanguages() /** * Sets queryLanguages * - * @param string[]|null $queryLanguages Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection. + * @param string[]|null $queryLanguages sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection * * @return self */ @@ -2266,7 +2263,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery * - * @param bool|null $decompoundQuery Splits compound words into their composing atoms in the query. + * @param bool|null $decompoundQuery splits compound words into their composing atoms in the query * * @return self */ @@ -2290,7 +2287,7 @@ public function getEnableRules() /** * Sets enableRules * - * @param bool|null $enableRules Whether Rules should be globally enabled. + * @param bool|null $enableRules whether Rules should be globally enabled * * @return self */ @@ -2314,7 +2311,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization * - * @param bool|null $enablePersonalization Enable the Personalization feature. + * @param bool|null $enablePersonalization enable the Personalization feature * * @return self */ @@ -2338,7 +2335,7 @@ public function getQueryType() /** * Sets queryType * - * @param string|null $queryType Controls if and how query words are interpreted as prefixes. + * @param string|null $queryType controls if and how query words are interpreted as prefixes * * @return self */ @@ -2372,7 +2369,7 @@ public function getRemoveWordsIfNoResults() /** * Sets removeWordsIfNoResults * - * @param string|null $removeWordsIfNoResults Selects a strategy to remove words from the query when it doesn't match any hits. + * @param string|null $removeWordsIfNoResults selects a strategy to remove words from the query when it doesn't match any hits * * @return self */ @@ -2406,7 +2403,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax * - * @param bool|null $advancedSyntax Enables the advanced query syntax. + * @param bool|null $advancedSyntax enables the advanced query syntax * * @return self */ @@ -2430,7 +2427,7 @@ public function getOptionalWords() /** * Sets optionalWords * - * @param string[]|null $optionalWords A list of words that should be considered as optional when found in the query. + * @param string[]|null $optionalWords a list of words that should be considered as optional when found in the query * * @return self */ @@ -2454,7 +2451,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes * - * @param string[]|null $disableExactOnAttributes List of attributes on which you want to disable the exact ranking criterion. + * @param string[]|null $disableExactOnAttributes list of attributes on which you want to disable the exact ranking criterion * * @return self */ @@ -2478,7 +2475,7 @@ public function getExactOnSingleWordQuery() /** * Sets exactOnSingleWordQuery * - * @param string|null $exactOnSingleWordQuery Controls how the exact ranking criterion is computed when the query contains only one word. + * @param string|null $exactOnSingleWordQuery controls how the exact ranking criterion is computed when the query contains only one word * * @return self */ @@ -2512,7 +2509,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact * - * @param string[]|null $alternativesAsExact List of alternatives that should be considered an exact match by the exact ranking criterion. + * @param string[]|null $alternativesAsExact list of alternatives that should be considered an exact match by the exact ranking criterion * * @return self */ @@ -2545,7 +2542,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures * - * @param string[]|null $advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when ‘advancedSyntax' is enabled. + * @param string[]|null $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when ‘advancedSyntax' is enabled * * @return self */ @@ -2578,13 +2575,12 @@ public function getDistinct() /** * Sets distinct * - * @param int|null $distinct Enables de-duplication or grouping of results. + * @param int|null $distinct enables de-duplication or grouping of results * * @return self */ public function setDistinct($distinct) { - if (!is_null($distinct) && ($distinct > 4)) { throw new \InvalidArgumentException('invalid value for $distinct when calling SearchParams., must be smaller than or equal to 4.'); } @@ -2610,7 +2606,7 @@ public function getSynonyms() /** * Sets synonyms * - * @param bool|null $synonyms Whether to take into account an index's synonyms for a particular search. + * @param bool|null $synonyms whether to take into account an index's synonyms for a particular search * * @return self */ @@ -2634,7 +2630,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight * - * @param bool|null $replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * @param bool|null $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself * * @return self */ @@ -2658,13 +2654,12 @@ public function getMinProximity() /** * Sets minProximity * - * @param int|null $minProximity Precision of the proximity ranking criterion. + * @param int|null $minProximity precision of the proximity ranking criterion * * @return self */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { throw new \InvalidArgumentException('invalid value for $minProximity when calling SearchParams., must be smaller than or equal to 7.'); } @@ -2720,7 +2715,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling SearchParams., must be smaller than or equal to 100.'); } @@ -2743,7 +2737,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity * - * @param bool|null $attributeCriteriaComputedByMinProximity When attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage. + * @param bool|null $attributeCriteriaComputedByMinProximity when attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage * * @return self */ @@ -2780,9 +2774,9 @@ public function setRenderingContent($renderingContent) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -2792,7 +2786,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -2821,7 +2815,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -2832,14 +2826,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -2866,4 +2861,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchParamsObject.php b/clients/algoliasearch-client-php/lib/Model/SearchParamsObject.php index 49956dd09f..5fcfff23f1 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchParamsObject.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchParamsObject.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchParamsObject Class Doc Comment @@ -107,7 +107,7 @@ class SearchParamsObject implements ModelInterface, ArrayAccess, \JsonSerializab 'responseFields' => 'string[]', 'maxFacetHits' => 'int', 'attributeCriteriaComputedByMinProximity' => 'bool', - 'renderingContent' => 'object' + 'renderingContent' => 'object', ]; /** @@ -194,7 +194,7 @@ class SearchParamsObject implements ModelInterface, ArrayAccess, \JsonSerializab 'responseFields' => null, 'maxFacetHits' => null, 'attributeCriteriaComputedByMinProximity' => null, - 'renderingContent' => null + 'renderingContent' => null, ]; /** @@ -300,7 +300,7 @@ public static function openAPIFormats() 'responseFields' => 'responseFields', 'maxFacetHits' => 'maxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'attributeCriteriaComputedByMinProximity', - 'renderingContent' => 'renderingContent' + 'renderingContent' => 'renderingContent', ]; /** @@ -385,7 +385,7 @@ public static function openAPIFormats() 'responseFields' => 'setResponseFields', 'maxFacetHits' => 'setMaxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'setAttributeCriteriaComputedByMinProximity', - 'renderingContent' => 'setRenderingContent' + 'renderingContent' => 'setRenderingContent', ]; /** @@ -470,7 +470,7 @@ public static function openAPIFormats() 'responseFields' => 'getResponseFields', 'maxFacetHits' => 'getMaxFacetHits', 'attributeCriteriaComputedByMinProximity' => 'getAttributeCriteriaComputedByMinProximity', - 'renderingContent' => 'getRenderingContent' + 'renderingContent' => 'getRenderingContent', ]; /** @@ -807,7 +807,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets similarQuery * @@ -821,7 +820,7 @@ public function getSimilarQuery() /** * Sets similarQuery * - * @param string|null $similarQuery Overrides the query parameter and performs a more generic search that can be used to find \"similar\" results. + * @param string|null $similarQuery overrides the query parameter and performs a more generic search that can be used to find \"similar\" results * * @return self */ @@ -845,7 +844,7 @@ public function getFilters() /** * Sets filters * - * @param string|null $filters Filter the query with numeric, facet and/or tag filters. + * @param string|null $filters filter the query with numeric, facet and/or tag filters * * @return self */ @@ -869,7 +868,7 @@ public function getFacetFilters() /** * Sets facetFilters * - * @param string[]|null $facetFilters Filter hits by facet value. + * @param string[]|null $facetFilters filter hits by facet value * * @return self */ @@ -893,7 +892,7 @@ public function getOptionalFilters() /** * Sets optionalFilters * - * @param string[]|null $optionalFilters Create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter. + * @param string[]|null $optionalFilters create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter * * @return self */ @@ -917,7 +916,7 @@ public function getNumericFilters() /** * Sets numericFilters * - * @param string[]|null $numericFilters Filter on numeric attributes. + * @param string[]|null $numericFilters filter on numeric attributes * * @return self */ @@ -941,7 +940,7 @@ public function getTagFilters() /** * Sets tagFilters * - * @param string[]|null $tagFilters Filter hits by tags. + * @param string[]|null $tagFilters filter hits by tags * * @return self */ @@ -965,7 +964,7 @@ public function getSumOrFiltersScores() /** * Sets sumOrFiltersScores * - * @param bool|null $sumOrFiltersScores Determines how to calculate the total score for filtering. + * @param bool|null $sumOrFiltersScores determines how to calculate the total score for filtering * * @return self */ @@ -989,7 +988,7 @@ public function getFacets() /** * Sets facets * - * @param string[]|null $facets Retrieve facets and their facet values. + * @param string[]|null $facets retrieve facets and their facet values * * @return self */ @@ -1013,7 +1012,7 @@ public function getMaxValuesPerFacet() /** * Sets maxValuesPerFacet * - * @param int|null $maxValuesPerFacet Maximum number of facet values to return for each facet during a regular search. + * @param int|null $maxValuesPerFacet maximum number of facet values to return for each facet during a regular search * * @return self */ @@ -1037,7 +1036,7 @@ public function getFacetingAfterDistinct() /** * Sets facetingAfterDistinct * - * @param bool|null $facetingAfterDistinct Force faceting to be applied after de-duplication (via the Distinct setting). + * @param bool|null $facetingAfterDistinct force faceting to be applied after de-duplication (via the Distinct setting) * * @return self */ @@ -1061,7 +1060,7 @@ public function getSortFacetValuesBy() /** * Sets sortFacetValuesBy * - * @param string|null $sortFacetValuesBy Controls how facet values are fetched. + * @param string|null $sortFacetValuesBy controls how facet values are fetched * * @return self */ @@ -1085,7 +1084,7 @@ public function getPage() /** * Sets page * - * @param int|null $page Specify the page to retrieve. + * @param int|null $page specify the page to retrieve * * @return self */ @@ -1109,7 +1108,7 @@ public function getOffset() /** * Sets offset * - * @param int|null $offset Specify the offset of the first hit to return. + * @param int|null $offset specify the offset of the first hit to return * * @return self */ @@ -1133,13 +1132,12 @@ public function getLength() /** * Sets length * - * @param int|null $length Set the number of hits to retrieve (used only with offset). + * @param int|null $length set the number of hits to retrieve (used only with offset) * * @return self */ public function setLength($length) { - if (!is_null($length) && ($length > 1000)) { throw new \InvalidArgumentException('invalid value for $length when calling SearchParamsObject., must be smaller than or equal to 1000.'); } @@ -1165,7 +1163,7 @@ public function getAroundLatLng() /** * Sets aroundLatLng * - * @param string|null $aroundLatLng Search for entries around a central geolocation, enabling a geo search within a circular area. + * @param string|null $aroundLatLng search for entries around a central geolocation, enabling a geo search within a circular area * * @return self */ @@ -1189,7 +1187,7 @@ public function getAroundLatLngViaIP() /** * Sets aroundLatLngViaIP * - * @param bool|null $aroundLatLngViaIP Search for entries around a given location automatically computed from the requester's IP address. + * @param bool|null $aroundLatLngViaIP search for entries around a given location automatically computed from the requester's IP address * * @return self */ @@ -1213,7 +1211,7 @@ public function getAroundRadius() /** * Sets aroundRadius * - * @param OneOfIntegerString|null $aroundRadius Define the maximum radius for a geo search (in meters). + * @param OneOfIntegerString|null $aroundRadius define the maximum radius for a geo search (in meters) * * @return self */ @@ -1237,7 +1235,7 @@ public function getAroundPrecision() /** * Sets aroundPrecision * - * @param int|null $aroundPrecision Precision of geo search (in meters), to add grouping by geo location to the ranking formula. + * @param int|null $aroundPrecision precision of geo search (in meters), to add grouping by geo location to the ranking formula * * @return self */ @@ -1261,13 +1259,12 @@ public function getMinimumAroundRadius() /** * Sets minimumAroundRadius * - * @param int|null $minimumAroundRadius Minimum radius (in meters) used for a geo search when aroundRadius is not set. + * @param int|null $minimumAroundRadius minimum radius (in meters) used for a geo search when aroundRadius is not set * * @return self */ public function setMinimumAroundRadius($minimumAroundRadius) { - if (!is_null($minimumAroundRadius) && ($minimumAroundRadius < 1)) { throw new \InvalidArgumentException('invalid value for $minimumAroundRadius when calling SearchParamsObject., must be bigger than or equal to 1.'); } @@ -1290,7 +1287,7 @@ public function getInsideBoundingBox() /** * Sets insideBoundingBox * - * @param float[]|null $insideBoundingBox Search inside a rectangular area (in geo coordinates). + * @param float[]|null $insideBoundingBox search inside a rectangular area (in geo coordinates) * * @return self */ @@ -1314,7 +1311,7 @@ public function getInsidePolygon() /** * Sets insidePolygon * - * @param float[]|null $insidePolygon Search inside a polygon (in geo coordinates). + * @param float[]|null $insidePolygon search inside a polygon (in geo coordinates) * * @return self */ @@ -1362,7 +1359,7 @@ public function getRuleContexts() /** * Sets ruleContexts * - * @param string[]|null $ruleContexts Enables contextual rules. + * @param string[]|null $ruleContexts enables contextual rules * * @return self */ @@ -1386,7 +1383,7 @@ public function getPersonalizationImpact() /** * Sets personalizationImpact * - * @param int|null $personalizationImpact Define the impact of the Personalization feature. + * @param int|null $personalizationImpact define the impact of the Personalization feature * * @return self */ @@ -1410,7 +1407,7 @@ public function getUserToken() /** * Sets userToken * - * @param string|null $userToken Associates a certain user token with the current search. + * @param string|null $userToken associates a certain user token with the current search * * @return self */ @@ -1434,7 +1431,7 @@ public function getGetRankingInfo() /** * Sets getRankingInfo * - * @param bool|null $getRankingInfo Retrieve detailed ranking information. + * @param bool|null $getRankingInfo retrieve detailed ranking information * * @return self */ @@ -1458,7 +1455,7 @@ public function getClickAnalytics() /** * Sets clickAnalytics * - * @param bool|null $clickAnalytics Enable the Click Analytics feature. + * @param bool|null $clickAnalytics enable the Click Analytics feature * * @return self */ @@ -1482,7 +1479,7 @@ public function getAnalytics() /** * Sets analytics * - * @param bool|null $analytics Whether the current query will be taken into account in the Analytics. + * @param bool|null $analytics whether the current query will be taken into account in the Analytics * * @return self */ @@ -1506,7 +1503,7 @@ public function getAnalyticsTags() /** * Sets analyticsTags * - * @param string[]|null $analyticsTags List of tags to apply to the query for analytics purposes. + * @param string[]|null $analyticsTags list of tags to apply to the query for analytics purposes * * @return self */ @@ -1530,7 +1527,7 @@ public function getPercentileComputation() /** * Sets percentileComputation * - * @param bool|null $percentileComputation Whether to include or exclude a query from the processing-time percentile computation. + * @param bool|null $percentileComputation whether to include or exclude a query from the processing-time percentile computation * * @return self */ @@ -1554,7 +1551,7 @@ public function getEnableABTest() /** * Sets enableABTest * - * @param bool|null $enableABTest Whether this search should participate in running AB tests. + * @param bool|null $enableABTest whether this search should participate in running AB tests * * @return self */ @@ -1578,7 +1575,7 @@ public function getEnableReRanking() /** * Sets enableReRanking * - * @param bool|null $enableReRanking Whether this search should use AI Re-Ranking. + * @param bool|null $enableReRanking whether this search should use AI Re-Ranking * * @return self */ @@ -1602,7 +1599,7 @@ public function getQuery() /** * Sets query * - * @param string $query The text to search in the index. + * @param string $query the text to search in the index * * @return self */ @@ -1626,7 +1623,7 @@ public function getSearchableAttributes() /** * Sets searchableAttributes * - * @param string[]|null $searchableAttributes The complete list of attributes used for searching. + * @param string[]|null $searchableAttributes the complete list of attributes used for searching * * @return self */ @@ -1650,7 +1647,7 @@ public function getAttributesForFaceting() /** * Sets attributesForFaceting * - * @param string[]|null $attributesForFaceting The complete list of attributes that will be used for faceting. + * @param string[]|null $attributesForFaceting the complete list of attributes that will be used for faceting * * @return self */ @@ -1674,7 +1671,7 @@ public function getUnretrievableAttributes() /** * Sets unretrievableAttributes * - * @param string[]|null $unretrievableAttributes List of attributes that can't be retrieved at query time. + * @param string[]|null $unretrievableAttributes list of attributes that can't be retrieved at query time * * @return self */ @@ -1698,7 +1695,7 @@ public function getAttributesToRetrieve() /** * Sets attributesToRetrieve * - * @param string[]|null $attributesToRetrieve This parameter controls which attributes to retrieve and which not to retrieve. + * @param string[]|null $attributesToRetrieve this parameter controls which attributes to retrieve and which not to retrieve * * @return self */ @@ -1722,7 +1719,7 @@ public function getRestrictSearchableAttributes() /** * Sets restrictSearchableAttributes * - * @param string[]|null $restrictSearchableAttributes Restricts a given query to look in only a subset of your searchable attributes. + * @param string[]|null $restrictSearchableAttributes restricts a given query to look in only a subset of your searchable attributes * * @return self */ @@ -1746,7 +1743,7 @@ public function getRanking() /** * Sets ranking * - * @param string[]|null $ranking Controls how Algolia should sort your results. + * @param string[]|null $ranking controls how Algolia should sort your results * * @return self */ @@ -1770,7 +1767,7 @@ public function getCustomRanking() /** * Sets customRanking * - * @param string[]|null $customRanking Specifies the custom ranking criterion. + * @param string[]|null $customRanking specifies the custom ranking criterion * * @return self */ @@ -1794,7 +1791,7 @@ public function getRelevancyStrictness() /** * Sets relevancyStrictness * - * @param int|null $relevancyStrictness Controls the relevancy threshold below which less relevant results aren't included in the results. + * @param int|null $relevancyStrictness controls the relevancy threshold below which less relevant results aren't included in the results * * @return self */ @@ -1818,7 +1815,7 @@ public function getAttributesToHighlight() /** * Sets attributesToHighlight * - * @param string[]|null $attributesToHighlight List of attributes to highlight. + * @param string[]|null $attributesToHighlight list of attributes to highlight * * @return self */ @@ -1842,7 +1839,7 @@ public function getAttributesToSnippet() /** * Sets attributesToSnippet * - * @param string[]|null $attributesToSnippet List of attributes to snippet, with an optional maximum number of words to snippet. + * @param string[]|null $attributesToSnippet list of attributes to snippet, with an optional maximum number of words to snippet * * @return self */ @@ -1866,7 +1863,7 @@ public function getHighlightPreTag() /** * Sets highlightPreTag * - * @param string|null $highlightPreTag The HTML string to insert before the highlighted parts in all highlight and snippet results. + * @param string|null $highlightPreTag the HTML string to insert before the highlighted parts in all highlight and snippet results * * @return self */ @@ -1890,7 +1887,7 @@ public function getHighlightPostTag() /** * Sets highlightPostTag * - * @param string|null $highlightPostTag The HTML string to insert after the highlighted parts in all highlight and snippet results. + * @param string|null $highlightPostTag the HTML string to insert after the highlighted parts in all highlight and snippet results * * @return self */ @@ -1914,7 +1911,7 @@ public function getSnippetEllipsisText() /** * Sets snippetEllipsisText * - * @param string|null $snippetEllipsisText String used as an ellipsis indicator when a snippet is truncated. + * @param string|null $snippetEllipsisText string used as an ellipsis indicator when a snippet is truncated * * @return self */ @@ -1938,7 +1935,7 @@ public function getRestrictHighlightAndSnippetArrays() /** * Sets restrictHighlightAndSnippetArrays * - * @param bool|null $restrictHighlightAndSnippetArrays Restrict highlighting and snippeting to items that matched the query. + * @param bool|null $restrictHighlightAndSnippetArrays restrict highlighting and snippeting to items that matched the query * * @return self */ @@ -1962,7 +1959,7 @@ public function getHitsPerPage() /** * Sets hitsPerPage * - * @param int|null $hitsPerPage Set the number of hits per page. + * @param int|null $hitsPerPage set the number of hits per page * * @return self */ @@ -1986,7 +1983,7 @@ public function getMinWordSizefor1Typo() /** * Sets minWordSizefor1Typo * - * @param int|null $minWordSizefor1Typo Minimum number of characters a word in the query string must contain to accept matches with 1 typo. + * @param int|null $minWordSizefor1Typo minimum number of characters a word in the query string must contain to accept matches with 1 typo * * @return self */ @@ -2010,7 +2007,7 @@ public function getMinWordSizefor2Typos() /** * Sets minWordSizefor2Typos * - * @param int|null $minWordSizefor2Typos Minimum number of characters a word in the query string must contain to accept matches with 2 typos. + * @param int|null $minWordSizefor2Typos minimum number of characters a word in the query string must contain to accept matches with 2 typos * * @return self */ @@ -2034,7 +2031,7 @@ public function getTypoTolerance() /** * Sets typoTolerance * - * @param string|null $typoTolerance Controls whether typo tolerance is enabled and how it is applied. + * @param string|null $typoTolerance controls whether typo tolerance is enabled and how it is applied * * @return self */ @@ -2068,7 +2065,7 @@ public function getAllowTyposOnNumericTokens() /** * Sets allowTyposOnNumericTokens * - * @param bool|null $allowTyposOnNumericTokens Whether to allow typos on numbers (\"numeric tokens\") in the query string. + * @param bool|null $allowTyposOnNumericTokens whether to allow typos on numbers (\"numeric tokens\") in the query string * * @return self */ @@ -2092,7 +2089,7 @@ public function getDisableTypoToleranceOnAttributes() /** * Sets disableTypoToleranceOnAttributes * - * @param string[]|null $disableTypoToleranceOnAttributes List of attributes on which you want to disable typo tolerance. + * @param string[]|null $disableTypoToleranceOnAttributes list of attributes on which you want to disable typo tolerance * * @return self */ @@ -2116,7 +2113,7 @@ public function getSeparatorsToIndex() /** * Sets separatorsToIndex * - * @param string|null $separatorsToIndex Control which separators are indexed. + * @param string|null $separatorsToIndex control which separators are indexed * * @return self */ @@ -2140,7 +2137,7 @@ public function getIgnorePlurals() /** * Sets ignorePlurals * - * @param string|null $ignorePlurals Treats singular, plurals, and other forms of declensions as matching terms. + * @param string|null $ignorePlurals treats singular, plurals, and other forms of declensions as matching terms * * @return self */ @@ -2164,7 +2161,7 @@ public function getRemoveStopWords() /** * Sets removeStopWords * - * @param string|null $removeStopWords Removes stop (common) words from the query before executing it. + * @param string|null $removeStopWords removes stop (common) words from the query before executing it * * @return self */ @@ -2188,7 +2185,7 @@ public function getKeepDiacriticsOnCharacters() /** * Sets keepDiacriticsOnCharacters * - * @param string|null $keepDiacriticsOnCharacters List of characters that the engine shouldn't automatically normalize. + * @param string|null $keepDiacriticsOnCharacters list of characters that the engine shouldn't automatically normalize * * @return self */ @@ -2212,7 +2209,7 @@ public function getQueryLanguages() /** * Sets queryLanguages * - * @param string[]|null $queryLanguages Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection. + * @param string[]|null $queryLanguages sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection * * @return self */ @@ -2236,7 +2233,7 @@ public function getDecompoundQuery() /** * Sets decompoundQuery * - * @param bool|null $decompoundQuery Splits compound words into their composing atoms in the query. + * @param bool|null $decompoundQuery splits compound words into their composing atoms in the query * * @return self */ @@ -2260,7 +2257,7 @@ public function getEnableRules() /** * Sets enableRules * - * @param bool|null $enableRules Whether Rules should be globally enabled. + * @param bool|null $enableRules whether Rules should be globally enabled * * @return self */ @@ -2284,7 +2281,7 @@ public function getEnablePersonalization() /** * Sets enablePersonalization * - * @param bool|null $enablePersonalization Enable the Personalization feature. + * @param bool|null $enablePersonalization enable the Personalization feature * * @return self */ @@ -2308,7 +2305,7 @@ public function getQueryType() /** * Sets queryType * - * @param string|null $queryType Controls if and how query words are interpreted as prefixes. + * @param string|null $queryType controls if and how query words are interpreted as prefixes * * @return self */ @@ -2342,7 +2339,7 @@ public function getRemoveWordsIfNoResults() /** * Sets removeWordsIfNoResults * - * @param string|null $removeWordsIfNoResults Selects a strategy to remove words from the query when it doesn't match any hits. + * @param string|null $removeWordsIfNoResults selects a strategy to remove words from the query when it doesn't match any hits * * @return self */ @@ -2376,7 +2373,7 @@ public function getAdvancedSyntax() /** * Sets advancedSyntax * - * @param bool|null $advancedSyntax Enables the advanced query syntax. + * @param bool|null $advancedSyntax enables the advanced query syntax * * @return self */ @@ -2400,7 +2397,7 @@ public function getOptionalWords() /** * Sets optionalWords * - * @param string[]|null $optionalWords A list of words that should be considered as optional when found in the query. + * @param string[]|null $optionalWords a list of words that should be considered as optional when found in the query * * @return self */ @@ -2424,7 +2421,7 @@ public function getDisableExactOnAttributes() /** * Sets disableExactOnAttributes * - * @param string[]|null $disableExactOnAttributes List of attributes on which you want to disable the exact ranking criterion. + * @param string[]|null $disableExactOnAttributes list of attributes on which you want to disable the exact ranking criterion * * @return self */ @@ -2448,7 +2445,7 @@ public function getExactOnSingleWordQuery() /** * Sets exactOnSingleWordQuery * - * @param string|null $exactOnSingleWordQuery Controls how the exact ranking criterion is computed when the query contains only one word. + * @param string|null $exactOnSingleWordQuery controls how the exact ranking criterion is computed when the query contains only one word * * @return self */ @@ -2482,7 +2479,7 @@ public function getAlternativesAsExact() /** * Sets alternativesAsExact * - * @param string[]|null $alternativesAsExact List of alternatives that should be considered an exact match by the exact ranking criterion. + * @param string[]|null $alternativesAsExact list of alternatives that should be considered an exact match by the exact ranking criterion * * @return self */ @@ -2515,7 +2512,7 @@ public function getAdvancedSyntaxFeatures() /** * Sets advancedSyntaxFeatures * - * @param string[]|null $advancedSyntaxFeatures Allows you to specify which advanced syntax features are active when ‘advancedSyntax' is enabled. + * @param string[]|null $advancedSyntaxFeatures allows you to specify which advanced syntax features are active when ‘advancedSyntax' is enabled * * @return self */ @@ -2548,13 +2545,12 @@ public function getDistinct() /** * Sets distinct * - * @param int|null $distinct Enables de-duplication or grouping of results. + * @param int|null $distinct enables de-duplication or grouping of results * * @return self */ public function setDistinct($distinct) { - if (!is_null($distinct) && ($distinct > 4)) { throw new \InvalidArgumentException('invalid value for $distinct when calling SearchParamsObject., must be smaller than or equal to 4.'); } @@ -2580,7 +2576,7 @@ public function getSynonyms() /** * Sets synonyms * - * @param bool|null $synonyms Whether to take into account an index's synonyms for a particular search. + * @param bool|null $synonyms whether to take into account an index's synonyms for a particular search * * @return self */ @@ -2604,7 +2600,7 @@ public function getReplaceSynonymsInHighlight() /** * Sets replaceSynonymsInHighlight * - * @param bool|null $replaceSynonymsInHighlight Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + * @param bool|null $replaceSynonymsInHighlight whether to highlight and snippet the original word that matches the synonym or the synonym itself * * @return self */ @@ -2628,13 +2624,12 @@ public function getMinProximity() /** * Sets minProximity * - * @param int|null $minProximity Precision of the proximity ranking criterion. + * @param int|null $minProximity precision of the proximity ranking criterion * * @return self */ public function setMinProximity($minProximity) { - if (!is_null($minProximity) && ($minProximity > 7)) { throw new \InvalidArgumentException('invalid value for $minProximity when calling SearchParamsObject., must be smaller than or equal to 7.'); } @@ -2690,7 +2685,6 @@ public function getMaxFacetHits() */ public function setMaxFacetHits($maxFacetHits) { - if (!is_null($maxFacetHits) && ($maxFacetHits > 100)) { throw new \InvalidArgumentException('invalid value for $maxFacetHits when calling SearchParamsObject., must be smaller than or equal to 100.'); } @@ -2713,7 +2707,7 @@ public function getAttributeCriteriaComputedByMinProximity() /** * Sets attributeCriteriaComputedByMinProximity * - * @param bool|null $attributeCriteriaComputedByMinProximity When attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage. + * @param bool|null $attributeCriteriaComputedByMinProximity when attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage * * @return self */ @@ -2750,9 +2744,9 @@ public function setRenderingContent($renderingContent) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -2762,7 +2756,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -2791,7 +2785,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -2802,14 +2796,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -2836,4 +2831,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchParamsString.php b/clients/algoliasearch-client-php/lib/Model/SearchParamsString.php index ad130c49c8..67a696312f 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchParamsString.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchParamsString.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchParamsString Class Doc Comment @@ -31,7 +31,7 @@ class SearchParamsString implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'params' => 'string' + 'params' => 'string', ]; /** @@ -42,7 +42,7 @@ class SearchParamsString implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'params' => null + 'params' => null, ]; /** @@ -72,7 +72,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'params' => 'params' + 'params' => 'params', ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'params' => 'setParams' + 'params' => 'setParams', ]; /** @@ -90,7 +90,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'params' => 'getParams' + 'params' => 'getParams', ]; /** @@ -134,7 +134,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -176,7 +175,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets params * @@ -190,7 +188,7 @@ public function getParams() /** * Sets params * - * @param string|null $params Search parameters as URL-encoded query string. + * @param string|null $params search parameters as URL-encoded query string * * @return self */ @@ -203,9 +201,9 @@ public function setParams($params) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -215,7 +213,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -244,7 +242,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -255,14 +253,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -289,4 +288,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchResponse.php b/clients/algoliasearch-client-php/lib/Model/SearchResponse.php index f5adcaad07..cc9398e50d 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchResponse Class Doc Comment @@ -55,7 +55,7 @@ class SearchResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'queryAfterRemoval' => 'string', 'serverUsed' => 'string', 'userData' => 'object', - 'hits' => '\Algolia\AlgoliaSearch\Model\Record[]' + 'hits' => '\Algolia\AlgoliaSearch\Model\Record[]', ]; /** @@ -90,7 +90,7 @@ class SearchResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'queryAfterRemoval' => null, 'serverUsed' => null, 'userData' => null, - 'hits' => null + 'hits' => null, ]; /** @@ -144,7 +144,7 @@ public static function openAPIFormats() 'queryAfterRemoval' => 'queryAfterRemoval', 'serverUsed' => 'serverUsed', 'userData' => 'userData', - 'hits' => 'hits' + 'hits' => 'hits', ]; /** @@ -177,7 +177,7 @@ public static function openAPIFormats() 'queryAfterRemoval' => 'setQueryAfterRemoval', 'serverUsed' => 'setServerUsed', 'userData' => 'setUserData', - 'hits' => 'setHits' + 'hits' => 'setHits', ]; /** @@ -210,7 +210,7 @@ public static function openAPIFormats() 'queryAfterRemoval' => 'getQueryAfterRemoval', 'serverUsed' => 'getServerUsed', 'userData' => 'getUserData', - 'hits' => 'getHits' + 'hits' => 'getHits', ]; /** @@ -254,7 +254,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -306,7 +305,7 @@ public function listInvalidProperties() { $invalidProperties = []; - if (!is_null($this->container['aroundLatLng']) && !preg_match("/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/", $this->container['aroundLatLng'])) { + if (!is_null($this->container['aroundLatLng']) && !preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $this->container['aroundLatLng'])) { $invalidProperties[] = "invalid value for 'aroundLatLng', must be conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."; } @@ -340,6 +339,7 @@ public function listInvalidProperties() if ($this->container['hits'] === null) { $invalidProperties[] = "'hits' can't be null"; } + return $invalidProperties; } @@ -354,7 +354,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets abTestID * @@ -368,7 +367,7 @@ public function getAbTestID() /** * Sets abTestID * - * @param int|null $abTestID If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID. + * @param int|null $abTestID if a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID * * @return self */ @@ -392,7 +391,7 @@ public function getAbTestVariantID() /** * Sets abTestVariantID * - * @param int|null $abTestVariantID If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used. + * @param int|null $abTestVariantID if a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used * * @return self */ @@ -416,14 +415,13 @@ public function getAroundLatLng() /** * Sets aroundLatLng * - * @param string|null $aroundLatLng The computed geo location. + * @param string|null $aroundLatLng the computed geo location * * @return self */ public function setAroundLatLng($aroundLatLng) { - - if (!is_null($aroundLatLng) && (!preg_match("/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/", $aroundLatLng))) { + if (!is_null($aroundLatLng) && (!preg_match('/^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/', $aroundLatLng))) { throw new \InvalidArgumentException("invalid value for $aroundLatLng when calling SearchResponse., must conform to the pattern /^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$/."); } @@ -469,7 +467,7 @@ public function getExhaustiveFacetsCount() /** * Sets exhaustiveFacetsCount * - * @param bool|null $exhaustiveFacetsCount Whether the facet count is exhaustive or approximate. + * @param bool|null $exhaustiveFacetsCount whether the facet count is exhaustive or approximate * * @return self */ @@ -541,7 +539,7 @@ public function getFacets() /** * Sets facets * - * @param array>|null $facets A mapping of each facet name to the corresponding facet counts. + * @param array>|null $facets a mapping of each facet name to the corresponding facet counts * * @return self */ @@ -565,7 +563,7 @@ public function getFacetsStats() /** * Sets facetsStats * - * @param array|null $facetsStats Statistics for numerical facets. + * @param array|null $facetsStats statistics for numerical facets * * @return self */ @@ -589,7 +587,7 @@ public function getHitsPerPage() /** * Sets hitsPerPage * - * @param int $hitsPerPage Set the number of hits per page. + * @param int $hitsPerPage set the number of hits per page * * @return self */ @@ -613,7 +611,7 @@ public function getIndex() /** * Sets index * - * @param string|null $index Index name used for the query. + * @param string|null $index index name used for the query * * @return self */ @@ -661,7 +659,7 @@ public function getMessage() /** * Sets message * - * @param string|null $message Used to return warnings about the query. + * @param string|null $message used to return warnings about the query * * @return self */ @@ -685,7 +683,7 @@ public function getNbHits() /** * Sets nbHits * - * @param int $nbHits Number of hits that the search query matched. + * @param int $nbHits number of hits that the search query matched * * @return self */ @@ -757,7 +755,7 @@ public function getPage() /** * Sets page * - * @param int $page Specify the page to retrieve. + * @param int $page specify the page to retrieve * * @return self */ @@ -781,7 +779,7 @@ public function getParams() /** * Sets params * - * @param string $params A url-encoded string of all search parameters. + * @param string $params a url-encoded string of all search parameters * * @return self */ @@ -805,7 +803,7 @@ public function getParsedQuery() /** * Sets parsedQuery * - * @param string|null $parsedQuery The query string that will be searched, after normalization. + * @param string|null $parsedQuery the query string that will be searched, after normalization * * @return self */ @@ -829,7 +827,7 @@ public function getProcessingTimeMS() /** * Sets processingTimeMS * - * @param int $processingTimeMS Time the server took to process the request, in milliseconds. + * @param int $processingTimeMS time the server took to process the request, in milliseconds * * @return self */ @@ -853,7 +851,7 @@ public function getQuery() /** * Sets query * - * @param string $query The text to search in the index. + * @param string $query the text to search in the index * * @return self */ @@ -877,7 +875,7 @@ public function getQueryAfterRemoval() /** * Sets queryAfterRemoval * - * @param string|null $queryAfterRemoval A markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set. + * @param string|null $queryAfterRemoval a markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set * * @return self */ @@ -901,7 +899,7 @@ public function getServerUsed() /** * Sets serverUsed * - * @param string|null $serverUsed Actual host name of the server that processed the request. + * @param string|null $serverUsed actual host name of the server that processed the request * * @return self */ @@ -925,7 +923,7 @@ public function getUserData() /** * Sets userData * - * @param object|null $userData Lets you store custom data in your indices. + * @param object|null $userData lets you store custom data in your indices * * @return self */ @@ -962,9 +960,9 @@ public function setHits($hits) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -974,7 +972,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -1003,7 +1001,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -1014,14 +1012,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -1048,4 +1047,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchRulesParams.php b/clients/algoliasearch-client-php/lib/Model/SearchRulesParams.php index 604d9db2ea..b679355452 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchRulesParams.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchRulesParams.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchRulesParams Class Doc Comment * * @category Class * @description Parameters for the search. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -38,7 +39,7 @@ class SearchRulesParams implements ModelInterface, ArrayAccess, \JsonSerializabl 'page' => 'int', 'hitsPerPage' => 'int', 'enabled' => 'bool', - 'requestOptions' => 'object[]' + 'requestOptions' => 'object[]', ]; /** @@ -55,7 +56,7 @@ class SearchRulesParams implements ModelInterface, ArrayAccess, \JsonSerializabl 'page' => null, 'hitsPerPage' => null, 'enabled' => null, - 'requestOptions' => null + 'requestOptions' => null, ]; /** @@ -91,7 +92,7 @@ public static function openAPIFormats() 'page' => 'page', 'hitsPerPage' => 'hitsPerPage', 'enabled' => 'enabled', - 'requestOptions' => 'requestOptions' + 'requestOptions' => 'requestOptions', ]; /** @@ -106,7 +107,7 @@ public static function openAPIFormats() 'page' => 'setPage', 'hitsPerPage' => 'setHitsPerPage', 'enabled' => 'setEnabled', - 'requestOptions' => 'setRequestOptions' + 'requestOptions' => 'setRequestOptions', ]; /** @@ -121,7 +122,7 @@ public static function openAPIFormats() 'page' => 'getPage', 'hitsPerPage' => 'getHitsPerPage', 'enabled' => 'getEnabled', - 'requestOptions' => 'getRequestOptions' + 'requestOptions' => 'getRequestOptions', ]; /** @@ -165,7 +166,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -213,7 +213,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets query * @@ -227,7 +226,7 @@ public function getQuery() /** * Sets query * - * @param string|null $query Full text query. + * @param string|null $query full text query * * @return self */ @@ -275,7 +274,7 @@ public function getContext() /** * Sets context * - * @param string|null $context Restricts matches to contextual rules with a specific context (exact match). + * @param string|null $context restricts matches to contextual rules with a specific context (exact match) * * @return self */ @@ -299,7 +298,7 @@ public function getPage() /** * Sets page * - * @param int|null $page Requested page (zero-based). + * @param int|null $page requested page (zero-based) * * @return self */ @@ -371,7 +370,7 @@ public function getRequestOptions() /** * Sets requestOptions * - * @param object[]|null $requestOptions A mapping of requestOptions to send along with the request. + * @param object[]|null $requestOptions a mapping of requestOptions to send along with the request * * @return self */ @@ -384,9 +383,9 @@ public function setRequestOptions($requestOptions) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -396,7 +395,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -425,7 +424,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -436,14 +435,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -470,4 +470,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchRulesResponse.php b/clients/algoliasearch-client-php/lib/Model/SearchRulesResponse.php index 2bfe6387a8..7beafbe40c 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchRulesResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchRulesResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchRulesResponse Class Doc Comment @@ -34,7 +34,7 @@ class SearchRulesResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'hits' => '\Algolia\AlgoliaSearch\Model\Rule[]', 'nbHits' => 'int', 'page' => 'int', - 'nbPages' => 'int' + 'nbPages' => 'int', ]; /** @@ -48,7 +48,7 @@ class SearchRulesResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'hits' => null, 'nbHits' => null, 'page' => null, - 'nbPages' => null + 'nbPages' => null, ]; /** @@ -81,7 +81,7 @@ public static function openAPIFormats() 'hits' => 'hits', 'nbHits' => 'nbHits', 'page' => 'page', - 'nbPages' => 'nbPages' + 'nbPages' => 'nbPages', ]; /** @@ -93,7 +93,7 @@ public static function openAPIFormats() 'hits' => 'setHits', 'nbHits' => 'setNbHits', 'page' => 'setPage', - 'nbPages' => 'setNbPages' + 'nbPages' => 'setNbPages', ]; /** @@ -105,7 +105,7 @@ public static function openAPIFormats() 'hits' => 'getHits', 'nbHits' => 'getNbHits', 'page' => 'getPage', - 'nbPages' => 'getNbPages' + 'nbPages' => 'getNbPages', ]; /** @@ -149,7 +149,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -192,6 +191,7 @@ public function listInvalidProperties() if ($this->container['nbPages'] === null) { $invalidProperties[] = "'nbPages' can't be null"; } + return $invalidProperties; } @@ -206,7 +206,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets hits * @@ -220,7 +219,7 @@ public function getHits() /** * Sets hits * - * @param \Algolia\AlgoliaSearch\Model\Rule[] $hits Fetched rules. + * @param \Algolia\AlgoliaSearch\Model\Rule[] $hits fetched rules * * @return self */ @@ -244,7 +243,7 @@ public function getNbHits() /** * Sets nbHits * - * @param int $nbHits Number of fetched rules. + * @param int $nbHits number of fetched rules * * @return self */ @@ -268,7 +267,7 @@ public function getPage() /** * Sets page * - * @param int $page Current page. + * @param int $page current page * * @return self */ @@ -292,7 +291,7 @@ public function getNbPages() /** * Sets nbPages * - * @param int $nbPages Number of pages. + * @param int $nbPages number of pages * * @return self */ @@ -305,9 +304,9 @@ public function setNbPages($nbPages) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -317,7 +316,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -346,7 +345,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -357,14 +356,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -391,4 +391,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchSynonymsResponse.php b/clients/algoliasearch-client-php/lib/Model/SearchSynonymsResponse.php index 95e04a6329..d4c5c7b785 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchSynonymsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchSynonymsResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchSynonymsResponse Class Doc Comment @@ -32,7 +32,7 @@ class SearchSynonymsResponse implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPITypes = [ 'hits' => '\Algolia\AlgoliaSearch\Model\SynonymHit[]', - 'nbHits' => 'int' + 'nbHits' => 'int', ]; /** @@ -44,7 +44,7 @@ class SearchSynonymsResponse implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPIFormats = [ 'hits' => null, - 'nbHits' => null + 'nbHits' => null, ]; /** @@ -75,7 +75,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'hits' => 'hits', - 'nbHits' => 'nbHits' + 'nbHits' => 'nbHits', ]; /** @@ -85,7 +85,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'hits' => 'setHits', - 'nbHits' => 'setNbHits' + 'nbHits' => 'setNbHits', ]; /** @@ -95,7 +95,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'hits' => 'getHits', - 'nbHits' => 'getNbHits' + 'nbHits' => 'getNbHits', ]; /** @@ -139,7 +139,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -174,6 +173,7 @@ public function listInvalidProperties() if ($this->container['nbHits'] === null) { $invalidProperties[] = "'nbHits' can't be null"; } + return $invalidProperties; } @@ -188,7 +188,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets hits * @@ -202,7 +201,7 @@ public function getHits() /** * Sets hits * - * @param \Algolia\AlgoliaSearch\Model\SynonymHit[] $hits Array of synonym objects. + * @param \Algolia\AlgoliaSearch\Model\SynonymHit[] $hits array of synonym objects * * @return self */ @@ -226,7 +225,7 @@ public function getNbHits() /** * Sets nbHits * - * @param int $nbHits Number of hits that the search query matched. + * @param int $nbHits number of hits that the search query matched * * @return self */ @@ -239,9 +238,9 @@ public function setNbHits($nbHits) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -251,7 +250,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -280,7 +279,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -291,14 +290,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -325,4 +325,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchUserIdsObject.php b/clients/algoliasearch-client-php/lib/Model/SearchUserIdsObject.php index 2db6a4eb66..b7e8b73076 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchUserIdsObject.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchUserIdsObject.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchUserIdsObject Class Doc Comment * * @category Class * @description OK + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -35,7 +36,7 @@ class SearchUserIdsObject implements ModelInterface, ArrayAccess, \JsonSerializa 'query' => 'string', 'clusterName' => 'string', 'page' => 'int', - 'hitsPerPage' => 'int' + 'hitsPerPage' => 'int', ]; /** @@ -49,7 +50,7 @@ class SearchUserIdsObject implements ModelInterface, ArrayAccess, \JsonSerializa 'query' => null, 'clusterName' => null, 'page' => null, - 'hitsPerPage' => null + 'hitsPerPage' => null, ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() 'query' => 'query', 'clusterName' => 'clusterName', 'page' => 'page', - 'hitsPerPage' => 'hitsPerPage' + 'hitsPerPage' => 'hitsPerPage', ]; /** @@ -94,7 +95,7 @@ public static function openAPIFormats() 'query' => 'setQuery', 'clusterName' => 'setClusterName', 'page' => 'setPage', - 'hitsPerPage' => 'setHitsPerPage' + 'hitsPerPage' => 'setHitsPerPage', ]; /** @@ -106,7 +107,7 @@ public static function openAPIFormats() 'query' => 'getQuery', 'clusterName' => 'getClusterName', 'page' => 'getPage', - 'hitsPerPage' => 'getHitsPerPage' + 'hitsPerPage' => 'getHitsPerPage', ]; /** @@ -150,7 +151,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -184,6 +184,7 @@ public function listInvalidProperties() if ($this->container['query'] === null) { $invalidProperties[] = "'query' can't be null"; } + return $invalidProperties; } @@ -198,7 +199,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets query * @@ -236,7 +236,7 @@ public function getClusterName() /** * Sets clusterName * - * @param string|null $clusterName Name of the cluster. + * @param string|null $clusterName name of the cluster * * @return self */ @@ -260,7 +260,7 @@ public function getPage() /** * Sets page * - * @param int|null $page Specify the page to retrieve. + * @param int|null $page specify the page to retrieve * * @return self */ @@ -284,7 +284,7 @@ public function getHitsPerPage() /** * Sets hitsPerPage * - * @param int|null $hitsPerPage Set the number of hits per page. + * @param int|null $hitsPerPage set the number of hits per page * * @return self */ @@ -297,9 +297,9 @@ public function setHitsPerPage($hitsPerPage) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -309,7 +309,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -338,7 +338,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -349,14 +349,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -383,4 +384,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchUserIdsResponse.php b/clients/algoliasearch-client-php/lib/Model/SearchUserIdsResponse.php index 3c0a3ddf23..9e3f78f382 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchUserIdsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchUserIdsResponse.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchUserIdsResponse Class Doc Comment * * @category Class * @description userIDs data. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -36,7 +37,7 @@ class SearchUserIdsResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'nbHits' => 'int', 'page' => 'int', 'hitsPerPage' => 'int', - 'updatedAt' => '\DateTime' + 'updatedAt' => '\DateTime', ]; /** @@ -51,7 +52,7 @@ class SearchUserIdsResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'nbHits' => null, 'page' => null, 'hitsPerPage' => null, - 'updatedAt' => 'date-time' + 'updatedAt' => 'date-time', ]; /** @@ -85,7 +86,7 @@ public static function openAPIFormats() 'nbHits' => 'nbHits', 'page' => 'page', 'hitsPerPage' => 'hitsPerPage', - 'updatedAt' => 'updatedAt' + 'updatedAt' => 'updatedAt', ]; /** @@ -98,7 +99,7 @@ public static function openAPIFormats() 'nbHits' => 'setNbHits', 'page' => 'setPage', 'hitsPerPage' => 'setHitsPerPage', - 'updatedAt' => 'setUpdatedAt' + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -111,7 +112,7 @@ public static function openAPIFormats() 'nbHits' => 'getNbHits', 'page' => 'getPage', 'hitsPerPage' => 'getHitsPerPage', - 'updatedAt' => 'getUpdatedAt' + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -155,7 +156,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -202,6 +202,7 @@ public function listInvalidProperties() if ($this->container['updatedAt'] === null) { $invalidProperties[] = "'updatedAt' can't be null"; } + return $invalidProperties; } @@ -216,7 +217,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets hits * @@ -230,7 +230,7 @@ public function getHits() /** * Sets hits * - * @param \Algolia\AlgoliaSearch\Model\SearchUserIdsResponseHits[] $hits List of user object matching the query. + * @param \Algolia\AlgoliaSearch\Model\SearchUserIdsResponseHits[] $hits list of user object matching the query * * @return self */ @@ -254,7 +254,7 @@ public function getNbHits() /** * Sets nbHits * - * @param int $nbHits Number of hits that the search query matched. + * @param int $nbHits number of hits that the search query matched * * @return self */ @@ -278,7 +278,7 @@ public function getPage() /** * Sets page * - * @param int $page Specify the page to retrieve. + * @param int $page specify the page to retrieve * * @return self */ @@ -326,7 +326,7 @@ public function getUpdatedAt() /** * Sets updatedAt * - * @param \DateTime $updatedAt Date of last update (ISO-8601 format). + * @param \DateTime $updatedAt date of last update (ISO-8601 format) * * @return self */ @@ -339,9 +339,9 @@ public function setUpdatedAt($updatedAt) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -351,7 +351,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -380,7 +380,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -391,14 +391,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -425,4 +426,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchUserIdsResponseHighlightResult.php b/clients/algoliasearch-client-php/lib/Model/SearchUserIdsResponseHighlightResult.php index c51f5eb88d..70e0bf88c0 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchUserIdsResponseHighlightResult.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchUserIdsResponseHighlightResult.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchUserIdsResponseHighlightResult Class Doc Comment @@ -32,7 +32,7 @@ class SearchUserIdsResponseHighlightResult implements ModelInterface, ArrayAcces */ protected static $openAPITypes = [ 'userID' => '\Algolia\AlgoliaSearch\Model\HighlightResult', - 'clusterName' => '\Algolia\AlgoliaSearch\Model\HighlightResult' + 'clusterName' => '\Algolia\AlgoliaSearch\Model\HighlightResult', ]; /** @@ -44,7 +44,7 @@ class SearchUserIdsResponseHighlightResult implements ModelInterface, ArrayAcces */ protected static $openAPIFormats = [ 'userID' => null, - 'clusterName' => null + 'clusterName' => null, ]; /** @@ -75,7 +75,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'userID' => 'userID', - 'clusterName' => 'clusterName' + 'clusterName' => 'clusterName', ]; /** @@ -85,7 +85,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'userID' => 'setUserID', - 'clusterName' => 'setClusterName' + 'clusterName' => 'setClusterName', ]; /** @@ -95,7 +95,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'userID' => 'getUserID', - 'clusterName' => 'getClusterName' + 'clusterName' => 'getClusterName', ]; /** @@ -139,7 +139,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -174,6 +173,7 @@ public function listInvalidProperties() if ($this->container['clusterName'] === null) { $invalidProperties[] = "'clusterName' can't be null"; } + return $invalidProperties; } @@ -188,7 +188,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets userID * @@ -239,9 +238,9 @@ public function setClusterName($clusterName) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -251,7 +250,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -280,7 +279,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -291,14 +290,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -325,4 +325,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SearchUserIdsResponseHits.php b/clients/algoliasearch-client-php/lib/Model/SearchUserIdsResponseHits.php index 66c19bf600..a0c622479c 100644 --- a/clients/algoliasearch-client-php/lib/Model/SearchUserIdsResponseHits.php +++ b/clients/algoliasearch-client-php/lib/Model/SearchUserIdsResponseHits.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SearchUserIdsResponseHits Class Doc Comment @@ -36,7 +36,7 @@ class SearchUserIdsResponseHits implements ModelInterface, ArrayAccess, \JsonSer 'nbRecords' => 'int', 'dataSize' => 'int', 'objectID' => 'string', - 'highlightResult' => '\Algolia\AlgoliaSearch\Model\SearchUserIdsResponseHighlightResult' + 'highlightResult' => '\Algolia\AlgoliaSearch\Model\SearchUserIdsResponseHighlightResult', ]; /** @@ -52,7 +52,7 @@ class SearchUserIdsResponseHits implements ModelInterface, ArrayAccess, \JsonSer 'nbRecords' => null, 'dataSize' => null, 'objectID' => null, - 'highlightResult' => null + 'highlightResult' => null, ]; /** @@ -87,7 +87,7 @@ public static function openAPIFormats() 'nbRecords' => 'nbRecords', 'dataSize' => 'dataSize', 'objectID' => 'objectID', - 'highlightResult' => '_highlightResult' + 'highlightResult' => '_highlightResult', ]; /** @@ -101,7 +101,7 @@ public static function openAPIFormats() 'nbRecords' => 'setNbRecords', 'dataSize' => 'setDataSize', 'objectID' => 'setObjectID', - 'highlightResult' => 'setHighlightResult' + 'highlightResult' => 'setHighlightResult', ]; /** @@ -115,7 +115,7 @@ public static function openAPIFormats() 'nbRecords' => 'getNbRecords', 'dataSize' => 'getDataSize', 'objectID' => 'getObjectID', - 'highlightResult' => 'getHighlightResult' + 'highlightResult' => 'getHighlightResult', ]; /** @@ -159,7 +159,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -210,6 +209,7 @@ public function listInvalidProperties() if ($this->container['highlightResult'] === null) { $invalidProperties[] = "'highlightResult' can't be null"; } + return $invalidProperties; } @@ -224,7 +224,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets userID * @@ -262,7 +261,7 @@ public function getClusterName() /** * Sets clusterName * - * @param string $clusterName Name of the cluster. + * @param string $clusterName name of the cluster * * @return self */ @@ -286,7 +285,7 @@ public function getNbRecords() /** * Sets nbRecords * - * @param int $nbRecords Number of records in the cluster. + * @param int $nbRecords number of records in the cluster * * @return self */ @@ -310,7 +309,7 @@ public function getDataSize() /** * Sets dataSize * - * @param int $dataSize Data size taken by all the users assigned to the cluster. + * @param int $dataSize data size taken by all the users assigned to the cluster * * @return self */ @@ -371,9 +370,9 @@ public function setHighlightResult($highlightResult) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -383,7 +382,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -412,7 +411,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -423,14 +422,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -457,4 +457,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SnippetResult.php b/clients/algoliasearch-client-php/lib/Model/SnippetResult.php index a508bd46e3..7a700a298d 100644 --- a/clients/algoliasearch-client-php/lib/Model/SnippetResult.php +++ b/clients/algoliasearch-client-php/lib/Model/SnippetResult.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SnippetResult Class Doc Comment @@ -32,7 +32,7 @@ class SnippetResult implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'value' => 'string', - 'matchLevel' => 'string' + 'matchLevel' => 'string', ]; /** @@ -44,7 +44,7 @@ class SnippetResult implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'value' => null, - 'matchLevel' => null + 'matchLevel' => null, ]; /** @@ -75,7 +75,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'value' => 'value', - 'matchLevel' => 'matchLevel' + 'matchLevel' => 'matchLevel', ]; /** @@ -85,7 +85,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'value' => 'setValue', - 'matchLevel' => 'setMatchLevel' + 'matchLevel' => 'setMatchLevel', ]; /** @@ -95,7 +95,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'value' => 'getValue', - 'matchLevel' => 'getMatchLevel' + 'matchLevel' => 'getMatchLevel', ]; /** @@ -208,7 +208,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets value * @@ -222,7 +221,7 @@ public function getValue() /** * Sets value * - * @param string|null $value Markup text with occurrences highlighted. + * @param string|null $value markup text with occurrences highlighted * * @return self */ @@ -246,7 +245,7 @@ public function getMatchLevel() /** * Sets matchLevel * - * @param string|null $matchLevel Indicates how well the attribute matched the search query. + * @param string|null $matchLevel indicates how well the attribute matched the search query * * @return self */ @@ -269,9 +268,9 @@ public function setMatchLevel($matchLevel) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -281,7 +280,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -310,7 +309,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -321,14 +320,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -355,4 +355,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/Source.php b/clients/algoliasearch-client-php/lib/Model/Source.php index f78c6ba8fe..7aeceabdb5 100644 --- a/clients/algoliasearch-client-php/lib/Model/Source.php +++ b/clients/algoliasearch-client-php/lib/Model/Source.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * Source Class Doc Comment * * @category Class * @description The source. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -33,7 +34,7 @@ class Source implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'source' => 'string', - 'description' => 'string' + 'description' => 'string', ]; /** @@ -45,7 +46,7 @@ class Source implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'source' => null, - 'description' => null + 'description' => null, ]; /** @@ -76,7 +77,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'source' => 'source', - 'description' => 'description' + 'description' => 'description', ]; /** @@ -86,7 +87,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'source' => 'setSource', - 'description' => 'setDescription' + 'description' => 'setDescription', ]; /** @@ -96,7 +97,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'source' => 'getSource', - 'description' => 'getDescription' + 'description' => 'getDescription', ]; /** @@ -140,7 +141,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -172,6 +172,7 @@ public function listInvalidProperties() if ($this->container['source'] === null) { $invalidProperties[] = "'source' can't be null"; } + return $invalidProperties; } @@ -186,7 +187,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets source * @@ -200,7 +200,7 @@ public function getSource() /** * Sets source * - * @param string $source The IP range of the source. + * @param string $source the IP range of the source * * @return self */ @@ -224,7 +224,7 @@ public function getDescription() /** * Sets description * - * @param string|null $description The description of the source. + * @param string|null $description the description of the source * * @return self */ @@ -237,9 +237,9 @@ public function setDescription($description) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -249,7 +249,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -278,7 +278,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -289,14 +289,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -323,4 +324,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/StandardEntries.php b/clients/algoliasearch-client-php/lib/Model/StandardEntries.php index 88e8918f9f..6f5806400e 100644 --- a/clients/algoliasearch-client-php/lib/Model/StandardEntries.php +++ b/clients/algoliasearch-client-php/lib/Model/StandardEntries.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * StandardEntries Class Doc Comment * * @category Class * @description Map of language ISO code supported by the dictionary (e.g., \"en\" for English) to a boolean value. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -34,7 +35,7 @@ class StandardEntries implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'plurals' => 'array', 'stopwords' => 'array', - 'compounds' => 'array' + 'compounds' => 'array', ]; /** @@ -47,7 +48,7 @@ class StandardEntries implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'plurals' => null, 'stopwords' => null, - 'compounds' => null + 'compounds' => null, ]; /** @@ -79,7 +80,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'plurals' => 'plurals', 'stopwords' => 'stopwords', - 'compounds' => 'compounds' + 'compounds' => 'compounds', ]; /** @@ -90,7 +91,7 @@ public static function openAPIFormats() protected static $setters = [ 'plurals' => 'setPlurals', 'stopwords' => 'setStopwords', - 'compounds' => 'setCompounds' + 'compounds' => 'setCompounds', ]; /** @@ -101,7 +102,7 @@ public static function openAPIFormats() protected static $getters = [ 'plurals' => 'getPlurals', 'stopwords' => 'getStopwords', - 'compounds' => 'getCompounds' + 'compounds' => 'getCompounds', ]; /** @@ -145,7 +146,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -189,7 +189,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets plurals * @@ -203,7 +202,7 @@ public function getPlurals() /** * Sets plurals * - * @param array|null $plurals Language ISO code. + * @param array|null $plurals language ISO code * * @return self */ @@ -227,7 +226,7 @@ public function getStopwords() /** * Sets stopwords * - * @param array|null $stopwords Language ISO code. + * @param array|null $stopwords language ISO code * * @return self */ @@ -251,7 +250,7 @@ public function getCompounds() /** * Sets compounds * - * @param array|null $compounds Language ISO code. + * @param array|null $compounds language ISO code * * @return self */ @@ -264,9 +263,9 @@ public function setCompounds($compounds) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -276,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -305,7 +304,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -316,14 +315,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -350,4 +350,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SynonymHit.php b/clients/algoliasearch-client-php/lib/Model/SynonymHit.php index cab013367c..1b049ea917 100644 --- a/clients/algoliasearch-client-php/lib/Model/SynonymHit.php +++ b/clients/algoliasearch-client-php/lib/Model/SynonymHit.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SynonymHit Class Doc Comment * * @category Class * @description Synonym object. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -40,7 +41,7 @@ class SynonymHit implements ModelInterface, ArrayAccess, \JsonSerializable 'corrections' => 'string[]', 'placeholder' => 'string', 'replacements' => 'string[]', - 'highlightResult' => '\Algolia\AlgoliaSearch\Model\SynonymHitHighlightResult' + 'highlightResult' => '\Algolia\AlgoliaSearch\Model\SynonymHitHighlightResult', ]; /** @@ -59,7 +60,7 @@ class SynonymHit implements ModelInterface, ArrayAccess, \JsonSerializable 'corrections' => null, 'placeholder' => null, 'replacements' => null, - 'highlightResult' => null + 'highlightResult' => null, ]; /** @@ -97,7 +98,7 @@ public static function openAPIFormats() 'corrections' => 'corrections', 'placeholder' => 'placeholder', 'replacements' => 'replacements', - 'highlightResult' => '_highlightResult' + 'highlightResult' => '_highlightResult', ]; /** @@ -114,7 +115,7 @@ public static function openAPIFormats() 'corrections' => 'setCorrections', 'placeholder' => 'setPlaceholder', 'replacements' => 'setReplacements', - 'highlightResult' => 'setHighlightResult' + 'highlightResult' => 'setHighlightResult', ]; /** @@ -131,7 +132,7 @@ public static function openAPIFormats() 'corrections' => 'getCorrections', 'placeholder' => 'getPlaceholder', 'replacements' => 'getReplacements', - 'highlightResult' => 'getHighlightResult' + 'highlightResult' => 'getHighlightResult', ]; /** @@ -261,7 +262,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets objectID * @@ -275,7 +275,7 @@ public function getObjectID() /** * Sets objectID * - * @param string $objectID Unique identifier of the synonym object to be created or updated. + * @param string $objectID unique identifier of the synonym object to be created or updated * * @return self */ @@ -299,7 +299,7 @@ public function getType() /** * Sets type * - * @param string $type Type of the synonym object. + * @param string $type type of the synonym object * * @return self */ @@ -333,7 +333,7 @@ public function getSynonyms() /** * Sets synonyms * - * @param string[]|null $synonyms Words or phrases to be considered equivalent. + * @param string[]|null $synonyms words or phrases to be considered equivalent * * @return self */ @@ -357,7 +357,7 @@ public function getInput() /** * Sets input * - * @param string|null $input Word or phrase to appear in query strings (for onewaysynonym). + * @param string|null $input word or phrase to appear in query strings (for onewaysynonym) * * @return self */ @@ -381,7 +381,7 @@ public function getWord() /** * Sets word * - * @param string|null $word Word or phrase to appear in query strings (for altcorrection1 and altcorrection2). + * @param string|null $word word or phrase to appear in query strings (for altcorrection1 and altcorrection2) * * @return self */ @@ -405,7 +405,7 @@ public function getCorrections() /** * Sets corrections * - * @param string[]|null $corrections Words to be matched in records. + * @param string[]|null $corrections words to be matched in records * * @return self */ @@ -429,7 +429,7 @@ public function getPlaceholder() /** * Sets placeholder * - * @param string|null $placeholder Token to be put inside records. + * @param string|null $placeholder token to be put inside records * * @return self */ @@ -453,7 +453,7 @@ public function getReplacements() /** * Sets replacements * - * @param string[]|null $replacements List of query words that will match the token. + * @param string[]|null $replacements list of query words that will match the token * * @return self */ @@ -490,9 +490,9 @@ public function setHighlightResult($highlightResult) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -502,7 +502,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -531,7 +531,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -542,14 +542,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -576,4 +577,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/SynonymHitHighlightResult.php b/clients/algoliasearch-client-php/lib/Model/SynonymHitHighlightResult.php index 5fc7fac8f2..fa78b4ce36 100644 --- a/clients/algoliasearch-client-php/lib/Model/SynonymHitHighlightResult.php +++ b/clients/algoliasearch-client-php/lib/Model/SynonymHitHighlightResult.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * SynonymHitHighlightResult Class Doc Comment * * @category Class * @description Highlighted results + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -33,7 +34,7 @@ class SynonymHitHighlightResult implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openAPITypes = [ 'type' => '\Algolia\AlgoliaSearch\Model\HighlightResult', - 'synonyms' => '\Algolia\AlgoliaSearch\Model\HighlightResult[]' + 'synonyms' => '\Algolia\AlgoliaSearch\Model\HighlightResult[]', ]; /** @@ -45,7 +46,7 @@ class SynonymHitHighlightResult implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openAPIFormats = [ 'type' => null, - 'synonyms' => null + 'synonyms' => null, ]; /** @@ -76,7 +77,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'type' => 'type', - 'synonyms' => 'synonyms' + 'synonyms' => 'synonyms', ]; /** @@ -86,7 +87,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'type' => 'setType', - 'synonyms' => 'setSynonyms' + 'synonyms' => 'setSynonyms', ]; /** @@ -96,7 +97,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'type' => 'getType', - 'synonyms' => 'getSynonyms' + 'synonyms' => 'getSynonyms', ]; /** @@ -140,7 +141,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -183,7 +183,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets type * @@ -234,9 +233,9 @@ public function setSynonyms($synonyms) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -246,7 +245,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -275,7 +274,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -286,14 +285,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -320,4 +320,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/TimeRange.php b/clients/algoliasearch-client-php/lib/Model/TimeRange.php index d9b5b8ff4d..477e431dee 100644 --- a/clients/algoliasearch-client-php/lib/Model/TimeRange.php +++ b/clients/algoliasearch-client-php/lib/Model/TimeRange.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * TimeRange Class Doc Comment @@ -32,7 +32,7 @@ class TimeRange implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'from' => 'int', - 'until' => 'int' + 'until' => 'int', ]; /** @@ -44,7 +44,7 @@ class TimeRange implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'from' => null, - 'until' => null + 'until' => null, ]; /** @@ -75,7 +75,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'from' => 'from', - 'until' => 'until' + 'until' => 'until', ]; /** @@ -85,7 +85,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'from' => 'setFrom', - 'until' => 'setUntil' + 'until' => 'setUntil', ]; /** @@ -95,7 +95,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'from' => 'getFrom', - 'until' => 'getUntil' + 'until' => 'getUntil', ]; /** @@ -139,7 +139,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -174,6 +173,7 @@ public function listInvalidProperties() if ($this->container['until'] === null) { $invalidProperties[] = "'until' can't be null"; } + return $invalidProperties; } @@ -188,7 +188,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets from * @@ -202,7 +201,7 @@ public function getFrom() /** * Sets from * - * @param int $from Lower bound of the time range (Unix timestamp). + * @param int $from lower bound of the time range (Unix timestamp) * * @return self */ @@ -226,7 +225,7 @@ public function getUntil() /** * Sets until * - * @param int $until Upper bound of the time range (Unix timestamp). + * @param int $until upper bound of the time range (Unix timestamp) * * @return self */ @@ -239,9 +238,9 @@ public function setUntil($until) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -251,7 +250,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -280,7 +279,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -291,14 +290,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -325,4 +325,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/UpdateApiKeyResponse.php b/clients/algoliasearch-client-php/lib/Model/UpdateApiKeyResponse.php index 9030ab6488..6e20bb2dd1 100644 --- a/clients/algoliasearch-client-php/lib/Model/UpdateApiKeyResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/UpdateApiKeyResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * UpdateApiKeyResponse Class Doc Comment @@ -32,7 +32,7 @@ class UpdateApiKeyResponse implements ModelInterface, ArrayAccess, \JsonSerializ */ protected static $openAPITypes = [ 'key' => 'string', - 'updatedAt' => '\DateTime' + 'updatedAt' => '\DateTime', ]; /** @@ -44,7 +44,7 @@ class UpdateApiKeyResponse implements ModelInterface, ArrayAccess, \JsonSerializ */ protected static $openAPIFormats = [ 'key' => null, - 'updatedAt' => 'date-time' + 'updatedAt' => 'date-time', ]; /** @@ -75,7 +75,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'key' => 'key', - 'updatedAt' => 'updatedAt' + 'updatedAt' => 'updatedAt', ]; /** @@ -85,7 +85,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'key' => 'setKey', - 'updatedAt' => 'setUpdatedAt' + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -95,7 +95,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'key' => 'getKey', - 'updatedAt' => 'getUpdatedAt' + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -139,7 +139,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -174,6 +173,7 @@ public function listInvalidProperties() if ($this->container['updatedAt'] === null) { $invalidProperties[] = "'updatedAt' can't be null"; } + return $invalidProperties; } @@ -188,7 +188,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets key * @@ -202,7 +201,7 @@ public function getKey() /** * Sets key * - * @param string $key Key string. + * @param string $key key string * * @return self */ @@ -226,7 +225,7 @@ public function getUpdatedAt() /** * Sets updatedAt * - * @param \DateTime $updatedAt Date of last update (ISO-8601 format). + * @param \DateTime $updatedAt date of last update (ISO-8601 format) * * @return self */ @@ -239,9 +238,9 @@ public function setUpdatedAt($updatedAt) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -251,7 +250,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -280,7 +279,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -291,14 +290,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -325,4 +325,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/UpdatedAtResponse.php b/clients/algoliasearch-client-php/lib/Model/UpdatedAtResponse.php index cc85dcb1ac..506732b308 100644 --- a/clients/algoliasearch-client-php/lib/Model/UpdatedAtResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/UpdatedAtResponse.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * UpdatedAtResponse Class Doc Comment * * @category Class * @description The response with a taskID and an updatedAt timestamp. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -33,7 +34,7 @@ class UpdatedAtResponse implements ModelInterface, ArrayAccess, \JsonSerializabl */ protected static $openAPITypes = [ 'taskID' => 'int', - 'updatedAt' => '\DateTime' + 'updatedAt' => '\DateTime', ]; /** @@ -45,7 +46,7 @@ class UpdatedAtResponse implements ModelInterface, ArrayAccess, \JsonSerializabl */ protected static $openAPIFormats = [ 'taskID' => null, - 'updatedAt' => 'date-time' + 'updatedAt' => 'date-time', ]; /** @@ -76,7 +77,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'taskID' => 'taskID', - 'updatedAt' => 'updatedAt' + 'updatedAt' => 'updatedAt', ]; /** @@ -86,7 +87,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'taskID' => 'setTaskID', - 'updatedAt' => 'setUpdatedAt' + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -96,7 +97,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'taskID' => 'getTaskID', - 'updatedAt' => 'getUpdatedAt' + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -140,7 +141,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -175,6 +175,7 @@ public function listInvalidProperties() if ($this->container['updatedAt'] === null) { $invalidProperties[] = "'updatedAt' can't be null"; } + return $invalidProperties; } @@ -189,7 +190,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets taskID * @@ -203,7 +203,7 @@ public function getTaskID() /** * Sets taskID * - * @param int $taskID taskID of the indexing task to wait for. + * @param int $taskID taskID of the indexing task to wait for * * @return self */ @@ -227,7 +227,7 @@ public function getUpdatedAt() /** * Sets updatedAt * - * @param \DateTime $updatedAt Date of last update (ISO-8601 format). + * @param \DateTime $updatedAt date of last update (ISO-8601 format) * * @return self */ @@ -240,9 +240,9 @@ public function setUpdatedAt($updatedAt) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -252,7 +252,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -281,7 +281,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -292,14 +292,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -326,4 +327,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/UpdatedAtWithObjectIdResponse.php b/clients/algoliasearch-client-php/lib/Model/UpdatedAtWithObjectIdResponse.php index 49fafad1cf..99ecebb94b 100644 --- a/clients/algoliasearch-client-php/lib/Model/UpdatedAtWithObjectIdResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/UpdatedAtWithObjectIdResponse.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * UpdatedAtWithObjectIdResponse Class Doc Comment * * @category Class * @description The response with a taskID, an objectID and an updatedAt timestamp. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -34,7 +35,7 @@ class UpdatedAtWithObjectIdResponse implements ModelInterface, ArrayAccess, \Jso protected static $openAPITypes = [ 'taskID' => 'int', 'updatedAt' => '\DateTime', - 'objectID' => 'string' + 'objectID' => 'string', ]; /** @@ -47,7 +48,7 @@ class UpdatedAtWithObjectIdResponse implements ModelInterface, ArrayAccess, \Jso protected static $openAPIFormats = [ 'taskID' => null, 'updatedAt' => 'date-time', - 'objectID' => null + 'objectID' => null, ]; /** @@ -79,7 +80,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'taskID' => 'taskID', 'updatedAt' => 'updatedAt', - 'objectID' => 'objectID' + 'objectID' => 'objectID', ]; /** @@ -90,7 +91,7 @@ public static function openAPIFormats() protected static $setters = [ 'taskID' => 'setTaskID', 'updatedAt' => 'setUpdatedAt', - 'objectID' => 'setObjectID' + 'objectID' => 'setObjectID', ]; /** @@ -101,7 +102,7 @@ public static function openAPIFormats() protected static $getters = [ 'taskID' => 'getTaskID', 'updatedAt' => 'getUpdatedAt', - 'objectID' => 'getObjectID' + 'objectID' => 'getObjectID', ]; /** @@ -145,7 +146,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -189,7 +189,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets taskID * @@ -203,7 +202,7 @@ public function getTaskID() /** * Sets taskID * - * @param int|null $taskID taskID of the indexing task to wait for. + * @param int|null $taskID taskID of the indexing task to wait for * * @return self */ @@ -227,7 +226,7 @@ public function getUpdatedAt() /** * Sets updatedAt * - * @param \DateTime|null $updatedAt Date of last update (ISO-8601 format). + * @param \DateTime|null $updatedAt date of last update (ISO-8601 format) * * @return self */ @@ -251,7 +250,7 @@ public function getObjectID() /** * Sets objectID * - * @param string|null $objectID Unique identifier of the object. + * @param string|null $objectID unique identifier of the object * * @return self */ @@ -264,9 +263,9 @@ public function setObjectID($objectID) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -276,7 +275,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -305,7 +304,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -316,14 +315,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -350,4 +350,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/UpdatedRuleResponse.php b/clients/algoliasearch-client-php/lib/Model/UpdatedRuleResponse.php index 2cc041c7a4..9c649c82d5 100644 --- a/clients/algoliasearch-client-php/lib/Model/UpdatedRuleResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/UpdatedRuleResponse.php @@ -2,8 +2,8 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * UpdatedRuleResponse Class Doc Comment @@ -33,7 +33,7 @@ class UpdatedRuleResponse implements ModelInterface, ArrayAccess, \JsonSerializa protected static $openAPITypes = [ 'objectID' => 'string', 'updatedAt' => '\DateTime', - 'taskID' => 'int' + 'taskID' => 'int', ]; /** @@ -46,7 +46,7 @@ class UpdatedRuleResponse implements ModelInterface, ArrayAccess, \JsonSerializa protected static $openAPIFormats = [ 'objectID' => null, 'updatedAt' => 'date-time', - 'taskID' => null + 'taskID' => null, ]; /** @@ -78,7 +78,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'objectID' => 'objectID', 'updatedAt' => 'updatedAt', - 'taskID' => 'taskID' + 'taskID' => 'taskID', ]; /** @@ -89,7 +89,7 @@ public static function openAPIFormats() protected static $setters = [ 'objectID' => 'setObjectID', 'updatedAt' => 'setUpdatedAt', - 'taskID' => 'setTaskID' + 'taskID' => 'setTaskID', ]; /** @@ -100,7 +100,7 @@ public static function openAPIFormats() protected static $getters = [ 'objectID' => 'getObjectID', 'updatedAt' => 'getUpdatedAt', - 'taskID' => 'getTaskID' + 'taskID' => 'getTaskID', ]; /** @@ -144,7 +144,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -183,6 +182,7 @@ public function listInvalidProperties() if ($this->container['taskID'] === null) { $invalidProperties[] = "'taskID' can't be null"; } + return $invalidProperties; } @@ -197,7 +197,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets objectID * @@ -211,7 +210,7 @@ public function getObjectID() /** * Sets objectID * - * @param string $objectID Unique identifier of the object. + * @param string $objectID unique identifier of the object * * @return self */ @@ -235,7 +234,7 @@ public function getUpdatedAt() /** * Sets updatedAt * - * @param \DateTime $updatedAt Date of last update (ISO-8601 format). + * @param \DateTime $updatedAt date of last update (ISO-8601 format) * * @return self */ @@ -259,7 +258,7 @@ public function getTaskID() /** * Sets taskID * - * @param int $taskID taskID of the indexing task to wait for. + * @param int $taskID taskID of the indexing task to wait for * * @return self */ @@ -272,9 +271,9 @@ public function setTaskID($taskID) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -284,7 +283,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -313,7 +312,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -324,14 +323,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -358,4 +358,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/Model/UserId.php b/clients/algoliasearch-client-php/lib/Model/UserId.php index 84d828f010..a38f50c958 100644 --- a/clients/algoliasearch-client-php/lib/Model/UserId.php +++ b/clients/algoliasearch-client-php/lib/Model/UserId.php @@ -2,14 +2,15 @@ namespace Algolia\AlgoliaSearch\Model; -use \ArrayAccess; use \Algolia\AlgoliaSearch\ObjectSerializer; +use \ArrayAccess; /** * UserId Class Doc Comment * * @category Class * @description A userID. + * * @package Algolia\AlgoliaSearch * @implements \ArrayAccess * @template TKey int|null @@ -35,7 +36,7 @@ class UserId implements ModelInterface, ArrayAccess, \JsonSerializable 'userID' => 'string', 'clusterName' => 'string', 'nbRecords' => 'int', - 'dataSize' => 'int' + 'dataSize' => 'int', ]; /** @@ -49,7 +50,7 @@ class UserId implements ModelInterface, ArrayAccess, \JsonSerializable 'userID' => null, 'clusterName' => null, 'nbRecords' => null, - 'dataSize' => null + 'dataSize' => null, ]; /** @@ -82,7 +83,7 @@ public static function openAPIFormats() 'userID' => 'userID', 'clusterName' => 'clusterName', 'nbRecords' => 'nbRecords', - 'dataSize' => 'dataSize' + 'dataSize' => 'dataSize', ]; /** @@ -94,7 +95,7 @@ public static function openAPIFormats() 'userID' => 'setUserID', 'clusterName' => 'setClusterName', 'nbRecords' => 'setNbRecords', - 'dataSize' => 'setDataSize' + 'dataSize' => 'setDataSize', ]; /** @@ -106,7 +107,7 @@ public static function openAPIFormats() 'userID' => 'getUserID', 'clusterName' => 'getClusterName', 'nbRecords' => 'getNbRecords', - 'dataSize' => 'getDataSize' + 'dataSize' => 'getDataSize', ]; /** @@ -150,7 +151,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -193,6 +193,7 @@ public function listInvalidProperties() if ($this->container['dataSize'] === null) { $invalidProperties[] = "'dataSize' can't be null"; } + return $invalidProperties; } @@ -207,7 +208,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets userID * @@ -221,7 +221,7 @@ public function getUserID() /** * Sets userID * - * @param string $userID userID of the user. + * @param string $userID userID of the user * * @return self */ @@ -245,7 +245,7 @@ public function getClusterName() /** * Sets clusterName * - * @param string $clusterName Cluster on which the user is assigned. + * @param string $clusterName cluster on which the user is assigned * * @return self */ @@ -269,7 +269,7 @@ public function getNbRecords() /** * Sets nbRecords * - * @param int $nbRecords Number of records belonging to the user. + * @param int $nbRecords number of records belonging to the user * * @return self */ @@ -293,7 +293,7 @@ public function getDataSize() /** * Sets dataSize * - * @param int $dataSize Data size used by the user. + * @param int $dataSize data size used by the user * * @return self */ @@ -306,9 +306,9 @@ public function setDataSize($dataSize) /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset + * @param int $offset Offset * - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -318,7 +318,7 @@ public function offsetExists($offset) /** * Gets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return mixed|null */ @@ -347,7 +347,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. * - * @param integer $offset Offset + * @param int $offset Offset * * @return void */ @@ -358,14 +358,15 @@ public function offsetUnset($offset) /** * Serializes the object to a value that can be serialized natively by json_encode(). + * * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource */ public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -392,4 +393,3 @@ public function toHeaderValue() } } - diff --git a/clients/algoliasearch-client-php/lib/ObjectSerializer.php b/clients/algoliasearch-client-php/lib/ObjectSerializer.php index 25900ca3fa..b390c5fad0 100644 --- a/clients/algoliasearch-client-php/lib/ObjectSerializer.php +++ b/clients/algoliasearch-client-php/lib/ObjectSerializer.php @@ -48,6 +48,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data as $property => $value) { $data[$property] = self::sanitizeForSerialization($value); } + return $data; } @@ -65,6 +66,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n $allowedEnumTypes = $callable(); if (!in_array($value, $allowedEnumTypes, true)) { $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); } } @@ -74,14 +76,15 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } - return (object)$values; - } else { - return (string)$data; + + return (object) $values; } + + return (string) $data; } /** @@ -96,9 +99,9 @@ public static function sanitizeFilename($filename) { if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { return $match[1]; - } else { - return $filename; } + + return $filename; } /** @@ -128,9 +131,9 @@ public static function toQueryValue($object) { if (is_array($object)) { return implode(',', $object); - } else { - return self::toString($object); } + + return self::toString($object); } /** @@ -165,9 +168,9 @@ public static function toFormValue($value) { if ($value instanceof \SplFileObject) { return $value->getRealPath(); - } else { - return self::toString($value); } + + return self::toString($value); } /** @@ -186,9 +189,9 @@ public static function toString($value) return $value->format(self::$dateTimeFormat); } elseif (is_bool($value)) { return $value ? 'true' : 'false'; - } else { - return $value; } + + return $value; } /** @@ -244,41 +247,45 @@ public static function deserialize($data, $class, $httpHeaders = null) return null; } - if (strcasecmp(substr($class, -2), '[]') === 0) { + if (strcasecmp(mb_substr($class, -2), '[]') === 0) { $data = is_string($data) ? json_decode($data) : $data; if (!is_array($data)) { throw new \InvalidArgumentException("Invalid array '$class'"); } - $subClass = substr($class, 0, -2); + $subClass = mb_substr($class, 0, -2); $values = []; foreach ($data as $key => $value) { $values[] = self::deserialize($value, $subClass, null); } + return $values; } if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array $data = is_string($data) ? json_decode($data) : $data; settype($data, 'array'); - $inner = substr($class, 4, -1); + $inner = mb_substr($class, 4, -1); $deserialized = []; - if (strrpos($inner, ",") !== false) { + if (mb_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; } if ($class === 'object') { settype($data, 'array'); + return $data; - } else if ($class === 'mixed') { + } elseif ($class === 'mixed') { settype($data, gettype($data)); + return $data; } @@ -307,6 +314,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @psalm-suppress ParadoxicalCondition */ if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); + return $data; } @@ -331,35 +339,37 @@ public static function deserialize($data, $class, $httpHeaders = null) } elseif (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues(), true)) { $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); } + return $data; - } else { - $data = is_string($data) ? json_decode($data) : $data; - // 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 = '\Algolia\AlgoliaSearch\Model\\' . $data->{$discriminator}; - if (is_subclass_of($subclass, $class)) { - $class = $subclass; - } + } + $data = is_string($data) ? json_decode($data) : $data; + // 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 = '\Algolia\AlgoliaSearch\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; } + } - /** @var ModelInterface $instance */ - $instance = new $class(); - foreach ($instance::openAPITypes() as $property => $type) { - $propertySetter = $instance::setters()[$property]; + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; - if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { - continue; - } + if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { + continue; + } - if (isset($data->{$instance::attributeMap()[$property]})) { - $propertyValue = $data->{$instance::attributeMap()[$property]}; - $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); - } + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); } - return $instance; } + + return $instance; } } diff --git a/openapitools.json b/openapitools.json index 1d6f4ed672..4b292eb426 100644 --- a/openapitools.json +++ b/openapitools.json @@ -188,7 +188,8 @@ "gitRepoId": "algoliasearch-client-php", "invokerPackage": "Algolia\\AlgoliaSearch", "additionalProperties": { - "variableNamingConvention": "camelCase" + "variableNamingConvention": "camelCase", + "packageName": "algoliasearch-client-php" } } } diff --git a/scripts/post-gen/php.sh b/scripts/post-gen/php.sh new file mode 100755 index 0000000000..ced475c742 --- /dev/null +++ b/scripts/post-gen/php.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e +export GENERATOR=$1 +export CLIENT=$(cat openapitools.json | jq -r --arg generator "$GENERATOR" '."generator-cli".generators[$generator].output' | sed 's/#{cwd}\///g') + +lint_client() { + + echo "> Linting ${GENERATOR}..." + cd $CLIENT + composer install + PHP_CS_FIXER_IGNORE_ENV=1 php vendor/bin/php-cs-fixer fix lib/ -v --using-cache=no --allow-risky=yes + +} + +lint_client diff --git a/templates/php/.php-cs-fixer.php b/templates/php/.php-cs-fixer.php new file mode 100644 index 0000000000..96dde31c05 --- /dev/null +++ b/templates/php/.php-cs-fixer.php @@ -0,0 +1,63 @@ +setUsingCache(true) + ->setRules([ + 'array_syntax' => [ 'syntax' => 'short' ], + 'blank_line_after_namespace' => false, + 'blank_line_after_opening_tag' => true, + 'blank_line_before_statement' => true, + 'braces' => false, + 'cast_spaces' => true, + 'combine_consecutive_unsets' => true, + 'echo_tag_syntax' => true, + 'general_phpdoc_tag_rename' => true, + 'mb_str_functions' => true, + 'no_blank_lines_after_class_opening' => true, + 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, + 'no_extra_blank_lines' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_short_bool_cast' => true, + 'no_trailing_whitespace' => true, + 'no_trailing_whitespace_in_comment' => false, + 'no_unneeded_control_parentheses' => true, + 'no_unreachable_default_argument_value' => true, + 'no_unused_imports' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'normalize_index_brace' => true, + 'not_operator_with_space' => false, + 'object_operator_without_whitespace' => true, + 'ordered_imports' => true, + 'phpdoc_annotation_without_dot' => true, + 'phpdoc_inline_tag_normalizer' => true, + 'phpdoc_order' => true, + 'phpdoc_scalar' => true, + 'phpdoc_separation' => true, + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_tag_type' => true, + 'protected_to_private' => true, + '@PSR2' => true, + 'short_scalar_cast' => true, + 'single_blank_line_at_eof' => false, + 'single_blank_line_before_namespace' => true, + 'single_quote' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'strict_comparison' => true, + 'strict_param' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline' => true, + 'trim_array_spaces' => true, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('test') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/templates/php/.php_cs b/templates/php/.php_cs deleted file mode 100644 index 4fbe53ec5f..0000000000 --- a/templates/php/.php_cs +++ /dev/null @@ -1,23 +0,0 @@ -setUsingCache(true) - ->setRules([ - '@PSR2' => true, - 'ordered_imports' => true, - 'phpdoc_order' => true, - 'array_syntax' => [ 'syntax' => 'short' ], - 'strict_comparison' => true, - 'strict_param' => true, - 'no_trailing_whitespace' => false, - 'no_trailing_whitespace_in_comment' => false, - 'braces' => false, - 'single_blank_line_at_eof' => false, - 'blank_line_after_namespace' => false, - ]) - ->setFinder( - PhpCsFixer\Finder::create() - ->exclude('test') - ->exclude('tests') - ->in(__DIR__) - ); diff --git a/templates/php/gitignore b/templates/php/gitignore index 3d513912a6..aa44c17b5e 100644 --- a/templates/php/gitignore +++ b/templates/php/gitignore @@ -10,3 +10,4 @@ composer.phar .phpunit.result.cache .openapi-generator/ +composer.lock