Firestore/src/SnapshotTrait.php
private function transformSnapshotTimestamps(array $data)
    {
        foreach (['createTime', 'updateTime', 'readTime'] as $timestampField) {
            if (!isset($data[$timestampField])) {
                continue;
            }

            list ($dt, $nanos) = $this->parseTimeString($data[$timestampField]);

            $data[$timestampField] = new Timestamp($dt, $nanos);
        }

        return $data;
    }
private function transformSnapshotTimestamps(array $data)
    {
        foreach (['createTime', 'updateTime', 'readTime'] as $timestampField) {
            if (!isset($data[$timestampField])) {
                continue;
            }

            list ($dt, $nanos) = $this->parseTimeString($data[$timestampField]);

            $data[$timestampField] = new Timestamp($dt, $nanos);
        }

        return $data;
    }
private function transformSnapshotTimestamps ( array $ data ) { foreach ( [ 'createTime' , 'updateTime' , 'readTime' ] as $ timestampField ) { if ( ! isset ( $ data [ $ timestampField ] ) ) { continue ; } list ( $ dt , $ nanos ) = $ this -> parseTimeString ( $ data [ $ timestampField ] ) ; $ data [ $ timestampField ] = new Timestamp ( $ dt , $ nanos ) ; } return $ data ; }
Convert snapshot timestamps to Google Cloud PHP types.

@param array $data The snapshot data.
@return array
Convert snapshot timestamps to Google Cloud PHP types .