diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 3b7cc671c..f83429905 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -53,4 +53,8 @@ tests/Ticket/*.php + + + src/Schema/Blueprint.php + diff --git a/src/Schema/Blueprint.php b/src/Schema/Blueprint.php index 961c9e1cb..65f53784a 100644 --- a/src/Schema/Blueprint.php +++ b/src/Schema/Blueprint.php @@ -17,6 +17,7 @@ use function key; /** + * @link https://www.mongodb.com/docs/atlas/atlas-search/define-field-mappings/#std-label-fts-field-mappings * @phpstan-type TypeSearchIndexField array{ * type: 'boolean'|'date'|'dateFacet'|'objectId'|'stringFacet'|'uuid', * } | array{ @@ -51,6 +52,7 @@ * multi?: array>, * norms?: 'include'|'omit', * } + * @link https://www.mongodb.com/docs/atlas/atlas-search/analyzers/character-filters/ * @phpstan-type TypeSearchIndexCharFilter array{ * type: 'icuNormalize'|'persian', * } | array{ @@ -60,18 +62,22 @@ * type: 'mapping', * mappings?: array, * } + * @link https://www.mongodb.com/docs/atlas/atlas-search/analyzers/token-filters/ * @phpstan-type TypeSearchIndexTokenFilter array{type: string, ...} + * @link https://www.mongodb.com/docs/atlas/atlas-search/analyzers/custom/ * @phpstan-type TypeSearchIndexAnalyzer array{ * name: string, * charFilters?: TypeSearchIndexCharFilter, * tokenizer: array{type: string}, * tokenFilters?: TypeSearchIndexTokenFilter, * } + * @link https://www.mongodb.com/docs/atlas/atlas-search/stored-source-definition/#std-label-fts-stored-source-definition * @phpstan-type TypeSearchIndexStoredSource bool | array{ * includes: array, * } | array{ * excludes: array, * } + * @link https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/#std-label-search-index-definition-create * @phpstan-type TypeSearchIndexDefinition array{ * analyser?: string, * analyzers?: TypeSearchIndexAnalyzer[], @@ -79,6 +85,7 @@ * mappings: array{dynamic: true} | array{dynamic?: bool, fields: array}, * storedSource?: TypeSearchIndexStoredSource, * } + * @link https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-type/#atlas-vector-search-index-fields * @phpstan-type TypeVectorSearchIndexField array{ * type: 'vector', * path: string, @@ -89,6 +96,7 @@ * type: 'filter', * path: string, * } + * @link https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-type/#atlas-vector-search-index-fields * @phpstan-type TypeVectorSearchIndexDefinition array{ * fields: array, * } @@ -383,7 +391,7 @@ public function sparse_and_unique($columns = null, $options = []) /** * Create an Atlas Search Index. * - * @see https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/ + * @see https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/#std-label-search-index-definition-create * * @phpstan-param TypeSearchIndexDefinition $definition */ @@ -397,7 +405,7 @@ public function searchIndex(array $definition, string $name = 'default'): static /** * Create an Atlas Vector Search Index. * - * @see https://www.mongodb.com/docs/atlas/atlas-vector-search/ + * @see https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/#std-label-vector-search-index-definition-create * * @phpstan-param TypeVectorSearchIndexDefinition $definition */