1010class OGM
1111{
1212 /**
13- * @param array{'$type': string, '_value': mixed} $object
13+ * @param array{'$type': string, ' $object _value': mixed} $object
1414 * @return mixed
1515 */
1616 public function map (array $ object ): mixed
@@ -21,8 +21,8 @@ public function map(array $object): mixed
2121 'String ' => $ object ['_value ' ],
2222 'Boolean ' => $ object ['_value ' ],
2323 'Null ' => $ object ['_value ' ],
24- 'Array ' => $ object ['_value ' ], // Handle generic arrays
25- 'List ' => array_map ([$ this , 'map ' ], $ object ['_value ' ]), // Recursively map lists
24+ 'Array ' => $ object ['_value ' ],
25+ 'List ' => array_map ([$ this , 'map ' ], $ object ['_value ' ]),
2626 'Duration ' => $ object ['_value ' ],
2727 'OffsetDateTime ' => $ object ['_value ' ],
2828 'Node ' => $ this ->mapNode ($ object ['_value ' ]),
@@ -40,7 +40,7 @@ public static function parseWKT(string $wkt): Point
4040 $ srid = (int )str_replace ('SRID= ' , '' , $ sridPart );
4141
4242 $ pointPart = substr ($ wkt , strpos ($ wkt , 'POINT ' ) + 6 );
43- if (strpos ($ pointPart , 'Z ' ) !== false ) {
43+ if (str_contains ($ pointPart , 'Z ' )) {
4444 $ pointPart = str_replace ('Z ' , '' , $ pointPart );
4545 }
4646 $ pointPart = trim ($ pointPart , ' () ' );
@@ -64,8 +64,8 @@ public static function parseWKT(string $wkt): Point
6464 private function mapNode (array $ nodeData ): Node
6565 {
6666 return new Node (
67- $ nodeData ['_labels ' ], // Labels of the node
68- $ this ->mapProperties ($ nodeData ['_properties ' ]) // Mapped properties
67+ $ nodeData ['_labels ' ],
68+ $ this ->mapProperties ($ nodeData ['_properties ' ])
6969 );
7070 }
7171
0 commit comments