Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
Co-authored-by: Jeremy Mikola <[email protected]>
  • Loading branch information
GromNaN and jmikola authored Nov 26, 2024
1 parent 339b357 commit 2b43e27
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion generator/config/search/autocomplete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arguments:
name: tokenOrder
optional: true
type:
- string #tokenOrder
- string # any|sequential
-
name: fuzzy
optional: true
Expand Down
2 changes: 1 addition & 1 deletion generator/config/search/compound.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# $schema: ../schema.json
name: compound
link: 'https://www.mongodb.com/docs/atlas/atlas-search/equals/'
link: 'https://www.mongodb.com/docs/atlas/atlas-search/compound/'
type:
- searchOperator
encode: object
Expand Down
2 changes: 1 addition & 1 deletion generator/config/search/embeddedDocument.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# $schema: ../schema.json
name: embeddedDocument
link: 'https://www.mongodb.com/docs/atlas/atlas-search/embeddedDocument/'
link: 'https://www.mongodb.com/docs/atlas/atlas-search/embedded-document/'
type:
- searchOperator
encode: object
Expand Down
4 changes: 2 additions & 2 deletions generator/config/search/exists.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# $schema: ../schema.json
name: exists
link: 'https://www.mongodb.com/docs/atlas/atlas-search/equals/'
link: 'https://www.mongodb.com/docs/atlas/atlas-search/exists/'
type:
- searchOperator
encode: object
description: |
The equals operator checks whether a field matches a value you specify.
The exists operator tests if a path to a specified indexed field name exists in a document.
arguments:
-
name: path
Expand Down
2 changes: 1 addition & 1 deletion generator/config/search/facet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ arguments:
-
name: facets
type:
- object # of facetDefinition
- object # map of facetDefinition
-
name: operator
optional: true
Expand Down
2 changes: 1 addition & 1 deletion generator/src/OperatorTestGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private function convertYamlTaggedValues(mixed $object): mixed
'bson_utcdatetime' => new UTCDateTime(is_numeric($value) ? $value : new DateTimeImmutable($value)),
'bson_binary' => new Binary(base64_decode($value)),
'bson_objectId' => new ObjectId($value),
'bson_uuid' => new Binary(pack('h*', str_replace('-', '', $value)), Binary::TYPE_UUID),
'bson_uuid' => new Binary(bin2hex(str_replace('-', '', $value)), Binary::TYPE_UUID),

Check failure on line 151 in generator/src/OperatorTestGenerator.php

View workflow job for this annotation

GitHub Actions / phpcs

Function bin2hex() should not be referenced via a fallback global name, but via a use statement.
default => throw new InvalidArgumentException(sprintf('Yaml tag "%s" is not supported.', $object->getTag())),
};
}
Expand Down

0 comments on commit 2b43e27

Please sign in to comment.