Skip to content

Commit b74b077

Browse files
committed
Add links to custom types
1 parent f593e6a commit b74b077

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

phpcs.xml.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,8 @@
5353
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
5454
<exclude-pattern>tests/Ticket/*.php</exclude-pattern>
5555
</rule>
56+
57+
<rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing.IncorrectAnnotationsGroup">
58+
<exclude-pattern>src/Schema/Blueprint.php</exclude-pattern>
59+
</rule>
5660
</ruleset>

src/Schema/Blueprint.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use function key;
1818

1919
/**
20+
* @link https://www.mongodb.com/docs/atlas/atlas-search/define-field-mappings/#std-label-fts-field-mappings
2021
* @phpstan-type TypeSearchIndexField array{
2122
* type: 'boolean'|'date'|'dateFacet'|'objectId'|'stringFacet'|'uuid',
2223
* } | array{
@@ -51,6 +52,7 @@
5152
* multi?: array<string, array<mixed>>,
5253
* norms?: 'include'|'omit',
5354
* }
55+
* @link https://www.mongodb.com/docs/atlas/atlas-search/analyzers/character-filters/
5456
* @phpstan-type TypeSearchIndexCharFilter array{
5557
* type: 'icuNormalize'|'persian',
5658
* } | array{
@@ -60,25 +62,30 @@
6062
* type: 'mapping',
6163
* mappings?: array<string, string>,
6264
* }
65+
* @link https://www.mongodb.com/docs/atlas/atlas-search/analyzers/token-filters/
6366
* @phpstan-type TypeSearchIndexTokenFilter array{type: string, ...}
67+
* @link https://www.mongodb.com/docs/atlas/atlas-search/analyzers/custom/
6468
* @phpstan-type TypeSearchIndexAnalyzer array{
6569
* name: string,
6670
* charFilters?: TypeSearchIndexCharFilter,
6771
* tokenizer: array{type: string},
6872
* tokenFilters?: TypeSearchIndexTokenFilter,
6973
* }
74+
* @link https://www.mongodb.com/docs/atlas/atlas-search/stored-source-definition/#std-label-fts-stored-source-definition
7075
* @phpstan-type TypeSearchIndexStoredSource bool | array{
7176
* includes: array<string>,
7277
* } | array{
7378
* excludes: array<string>,
7479
* }
80+
* @link https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/#std-label-search-index-definition-create
7581
* @phpstan-type TypeSearchIndexDefinition array{
7682
* analyser?: string,
7783
* analyzers?: TypeSearchIndexAnalyzer[],
7884
* searchAnalyzer?: string,
7985
* mappings: array{dynamic: true} | array{dynamic?: bool, fields: array<string, TypeSearchIndexField>},
8086
* storedSource?: TypeSearchIndexStoredSource,
8187
* }
88+
* @link https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-type/#atlas-vector-search-index-fields
8289
* @phpstan-type TypeVectorSearchIndexField array{
8390
* type: 'vector',
8491
* path: string,
@@ -89,6 +96,7 @@
8996
* type: 'filter',
9097
* path: string,
9198
* }
99+
* @link https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-type/#atlas-vector-search-index-fields
92100
* @phpstan-type TypeVectorSearchIndexDefinition array{
93101
* fields: array<string, TypeVectorSearchIndexField>,
94102
* }
@@ -383,7 +391,7 @@ public function sparse_and_unique($columns = null, $options = [])
383391
/**
384392
* Create an Atlas Search Index.
385393
*
386-
* @see https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/
394+
* @see https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/#std-label-search-index-definition-create
387395
*
388396
* @phpstan-param TypeSearchIndexDefinition $definition
389397
*/
@@ -397,7 +405,7 @@ public function searchIndex(array $definition, string $name = 'default'): static
397405
/**
398406
* Create an Atlas Vector Search Index.
399407
*
400-
* @see https://www.mongodb.com/docs/atlas/atlas-vector-search/
408+
* @see https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/#std-label-vector-search-index-definition-create
401409
*
402410
* @phpstan-param TypeVectorSearchIndexDefinition $definition
403411
*/

0 commit comments

Comments
 (0)