@@ -135,8 +135,8 @@ public function testSpatialTypeDocuments(): void
135135 'notEquals ' => Query::notEqual ('pointAttr ' , [[1.0 , 1.0 ]]),
136136 'distanceEqual ' => Query::distanceEqual ('pointAttr ' , [5.0 , 5.0 ], 1.4142135623730951 ),
137137 'distanceNotEqual ' => Query::distanceNotEqual ('pointAttr ' , [1.0 , 1.0 ], 0.0 ),
138- 'intersects ' => Query::intersects ('pointAttr ' , [[ 6.0 , 6.0 ] ]),
139- 'notIntersects ' => Query::notIntersects ('pointAttr ' , [[ 1.0 , 1.0 ] ])
138+ 'intersects ' => Query::intersects ('pointAttr ' , [6.0 , 6.0 ]),
139+ 'notIntersects ' => Query::notIntersects ('pointAttr ' , [1.0 , 1.0 ])
140140 ];
141141
142142 foreach ($ pointQueries as $ queryType => $ query ) {
@@ -151,8 +151,8 @@ public function testSpatialTypeDocuments(): void
151151 'notContains ' => Query::notContains ('lineAttr ' , [[5.0 , 6.0 ]]), // Point not on the line
152152 'equals ' => query::equal ('lineAttr ' , [[[1.0 , 2.0 ], [3.0 , 4.0 ]]]), // Exact same linestring
153153 'notEquals ' => query::notEqual ('lineAttr ' , [[[5.0 , 6.0 ], [7.0 , 8.0 ]]]), // Different linestring
154- 'intersects ' => Query::intersects ('lineAttr ' , [[ 1.0 , 2.0 ] ]), // Point on the line should intersect
155- 'notIntersects ' => Query::notIntersects ('lineAttr ' , [[ 5.0 , 6.0 ] ]) // Point not on the line should not intersect
154+ 'intersects ' => Query::intersects ('lineAttr ' , [1.0 , 2.0 ]), // Point on the line should intersect
155+ 'notIntersects ' => Query::notIntersects ('lineAttr ' , [5.0 , 6.0 ]) // Point not on the line should not intersect
156156 ];
157157
158158 foreach ($ lineQueries as $ queryType => $ query ) {
@@ -182,12 +182,12 @@ public function testSpatialTypeDocuments(): void
182182 $ polyQueries = [
183183 'contains ' => Query::contains ('polyAttr ' , [[5.0 , 5.0 ]]), // Point inside polygon
184184 'notContains ' => Query::notContains ('polyAttr ' , [[15.0 , 15.0 ]]), // Point outside polygon
185- 'intersects ' => Query::intersects ('polyAttr ' , [[ 5.0 , 5.0 ] ]), // Point inside polygon should intersect
186- 'notIntersects ' => Query::notIntersects ('polyAttr ' , [[ 15.0 , 15.0 ] ]), // Point outside polygon should not intersect
185+ 'intersects ' => Query::intersects ('polyAttr ' , [5.0 , 5.0 ]), // Point inside polygon should intersect
186+ 'notIntersects ' => Query::notIntersects ('polyAttr ' , [15.0 , 15.0 ]), // Point outside polygon should not intersect
187187 'equals ' => query::equal ('polyAttr ' , [[[[0.0 , 0.0 ], [0.0 , 10.0 ], [10.0 , 10.0 ], [0.0 , 0.0 ]]]]), // Exact same polygon
188188 'notEquals ' => query::notEqual ('polyAttr ' , [[[[20.0 , 20.0 ], [20.0 , 30.0 ], [30.0 , 30.0 ], [20.0 , 20.0 ]]]]), // Different polygon
189- 'overlaps ' => Query::overlaps ('polyAttr ' , [[[[ 5.0 , 5.0 ], [5.0 , 15.0 ], [15.0 , 15.0 ], [15.0 , 5.0 ], [5.0 , 5.0 ] ]]]), // Overlapping polygon
190- 'notOverlaps ' => Query::notOverlaps ('polyAttr ' , [[[[ 20.0 , 20.0 ], [20.0 , 30.0 ], [30.0 , 30.0 ], [30.0 , 20.0 ], [20.0 , 20.0 ] ]]]) // Non-overlapping polygon
189+ 'overlaps ' => Query::overlaps ('polyAttr ' , [[[5.0 , 5.0 ], [5.0 , 15.0 ], [15.0 , 15.0 ], [15.0 , 5.0 ], [5.0 , 5.0 ]]]), // Overlapping polygon
190+ 'notOverlaps ' => Query::notOverlaps ('polyAttr ' , [[[20.0 , 20.0 ], [20.0 , 30.0 ], [30.0 , 30.0 ], [30.0 , 20.0 ], [20.0 , 20.0 ]]]) // Non-overlapping polygon
191191 ];
192192
193193 foreach ($ polyQueries as $ queryType => $ query ) {
@@ -935,8 +935,8 @@ public function testComplexGeometricShapes(): void
935935 // Test rectangle intersects with another rectangle
936936 $ overlappingRect = $ database ->find ($ collectionName , [
937937 Query::and ([
938- Query::intersects ('rectangle ' , [[[ 15 , 5 ], [15 , 15 ], [25 , 15 ], [25 , 5 ], [15 , 5 ] ]]),
939- Query::notTouches ('rectangle ' , [[[ 15 , 5 ], [15 , 15 ], [25 , 15 ], [25 , 5 ], [15 , 5 ] ]])
938+ Query::intersects ('rectangle ' , [[15 , 5 ], [15 , 15 ], [25 , 15 ], [25 , 5 ], [15 , 5 ]]),
939+ Query::notTouches ('rectangle ' , [[15 , 5 ], [15 , 15 ], [25 , 15 ], [25 , 5 ], [15 , 5 ]])
940940 ]),
941941 ], Database::PERMISSION_READ );
942942 $ this ->assertNotEmpty ($ overlappingRect );
@@ -1042,7 +1042,7 @@ public function testComplexGeometricShapes(): void
10421042 ], Database::PERMISSION_READ );
10431043 } else {
10441044 $ exactSquare = $ database ->find ($ collectionName , [
1045- Query::intersects ('square ' , [[[ 5 , 5 ], [5 , 15 ], [15 , 15 ], [15 , 5 ], [5 , 5 ] ]])
1045+ Query::intersects ('square ' , [[5 , 5 ], [5 , 15 ], [15 , 15 ], [15 , 5 ], [5 , 5 ]])
10461046 ], Database::PERMISSION_READ );
10471047 }
10481048 $ this ->assertNotEmpty ($ exactSquare );
@@ -1089,13 +1089,13 @@ public function testComplexGeometricShapes(): void
10891089
10901090 // Test triangle intersects with point
10911091 $ intersectingTriangle = $ database ->find ($ collectionName , [
1092- Query::intersects ('triangle ' , [[ 25 , 10 ] ]) // Point inside triangle should intersect
1092+ Query::intersects ('triangle ' , [25 , 10 ]) // Point inside triangle should intersect
10931093 ], Database::PERMISSION_READ );
10941094 $ this ->assertNotEmpty ($ intersectingTriangle );
10951095
10961096 // Test triangle doesn't intersect with distant point
10971097 $ nonIntersectingTriangle = $ database ->find ($ collectionName , [
1098- Query::notIntersects ('triangle ' , [[ 100 , 100 ] ]) // Distant point should not intersect
1098+ Query::notIntersects ('triangle ' , [100 , 100 ]) // Distant point should not intersect
10991099 ], Database::PERMISSION_READ );
11001100 $ this ->assertNotEmpty ($ nonIntersectingTriangle );
11011101
@@ -1159,7 +1159,7 @@ public function testComplexGeometricShapes(): void
11591159
11601160 // Test complex polygon intersects with line
11611161 $ intersectingLine = $ database ->find ($ collectionName , [
1162- Query::intersects ('complex_polygon ' , [[[ 0 , 10 ], [20 , 10 ] ]]) // Horizontal line through L-shape
1162+ Query::intersects ('complex_polygon ' , [[0 , 10 ], [20 , 10 ]]) // Horizontal line through L-shape
11631163 ], Database::PERMISSION_READ );
11641164 $ this ->assertNotEmpty ($ intersectingLine );
11651165
@@ -1181,13 +1181,13 @@ public function testComplexGeometricShapes(): void
11811181
11821182 // Test linestring intersects with point
11831183 $ intersectingPoint = $ database ->find ($ collectionName , [
1184- Query::intersects ('multi_linestring ' , [[ 10 , 10 ] ]) // Point on diagonal line
1184+ Query::intersects ('multi_linestring ' , [10 , 10 ]) // Point on diagonal line
11851185 ], Database::PERMISSION_READ );
11861186 $ this ->assertNotEmpty ($ intersectingPoint );
11871187
11881188 // Test linestring intersects with a horizontal line coincident at y=20
11891189 $ touchingLine = $ database ->find ($ collectionName , [
1190- Query::intersects ('multi_linestring ' , [[[ 0 , 20 ], [20 , 20 ] ]])
1190+ Query::intersects ('multi_linestring ' , [[0 , 20 ], [20 , 20 ]])
11911191 ], Database::PERMISSION_READ );
11921192 $ this ->assertNotEmpty ($ touchingLine );
11931193
0 commit comments