Firestore/src/SnapshotTrait.php
private function createSnapshotWithData(
        ValueMapper $valueMapper,
        DocumentReference $reference,
        array $document,
        $exists = true
    ) {
        $fields = $exists
            ? $valueMapper->decodeValues($this->pluck('fields', $document))
            : [];

        $document = $this->transformSnapshotTimestamps($document);

        return new DocumentSnapshot($reference, $valueMapper, $document, $fields, $exists);
    }
private function createSnapshotWithData(
        ValueMapper $valueMapper,
        DocumentReference $reference,
        array $document,
        $exists = true
    ) {
        $fields = $exists
            ? $valueMapper->decodeValues($this->pluck('fields', $document))
            : [];

        $document = $this->transformSnapshotTimestamps($document);

        return new DocumentSnapshot($reference, $valueMapper, $document, $fields, $exists);
    }
private function createSnapshotWithData ( ValueMapper $ valueMapper , DocumentReference $ reference , array $ document , $ exists = true ) { $ fields = $ exists ? $ valueMapper -> decodeValues ( $ this -> pluck ( 'fields' , $ document ) ) : [ ] ; $ document = $ this -> transformSnapshotTimestamps ( $ document ) ; return new DocumentSnapshot ( $ reference , $ valueMapper , $ document , $ fields , $ exists ) ; }
Create a document snapshot by providing a dataset.

This method will not perform a service request.

@codingStandardsIgnoreStart
@param ValueMapper $valueMapper A Firestore Value Mapper.
@param DocumentReference $reference The parent document.
@param array $document [Document](https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1beta1#google.firestore.v1beta1.Document)
@param bool $exists Whether the document exists. **Defaults to** `true`.
@codingStandardsIgnoreEnd
Create a document snapshot by providing a dataset .