Sharing/SharingManager.php
private function buildSharingEntries(array $subjects)
    {
        $entries = [];

        if (!empty($subjects)) {
            $res = $this->provider->getSharingEntries(array_values($subjects));

            foreach ($res as $sharing) {
                $id = SharingUtils::getSharingCacheId($sharing);
                $entries[$id][] = $sharing;
            }
        }

        return $entries;
    }
private function buildSharingEntries(array $subjects)
    {
        $entries = [];

        if (!empty($subjects)) {
            $res = $this->provider->getSharingEntries(array_values($subjects));

            foreach ($res as $sharing) {
                $id = SharingUtils::getSharingCacheId($sharing);
                $entries[$id][] = $sharing;
            }
        }

        return $entries;
    }
private function buildSharingEntries ( array $ subjects ) { $ entries = [ ] ; if ( ! empty ( $ subjects ) ) { $ res = $ this -> provider -> getSharingEntries ( array_values ( $ subjects ) ) ; foreach ( $ res as $ sharing ) { $ id = SharingUtils :: getSharingCacheId ( $ sharing ) ; $ entries [ $ id ] [ ] = $ sharing ; } } return $ entries ; }
Build the sharing entries with the subject identities.

@param SubjectIdentityInterface[] $subjects The subjects

@return array The map of cache id and sharing instance
Build the sharing entries with the subject identities .