src/ChangeSet.php
protected function calculateImplicit()
    {
        /** @var string[][] $explicit List of all items that have been explicitly added to this ChangeSet */
        $explicit = [];

        /** @var string[][] $referenced List of all items that are "referenced" by items in $explicit */
        $referenced = [];

        /** @var string[][] $references List of which explicit items reference each thing in referenced */
        $references = [];

        /** @var ChangeSetItem $item */
        foreach ($this->Changes()->filter(['Added' => ChangeSetItem::EXPLICITLY]) as $item) {
            $explicitKey = $this->implicitKey($item);
            $explicit[$explicitKey] = true;

            foreach ($item->findReferenced() as $referee) {
                try {
                    /** @var DataObject $referee */
                    $key = $this->implicitKey($referee);

                    $referenced[$key] = [
                        'ObjectID' => $referee->ID,
                        'ObjectClass' => $referee->baseClass(),
                    ];

                    $references[$key][] = $item->ID;

                    // Skip any bad records
                } catch (UnexpectedDataException $e) {
                }
            }
        }

        /** @var string[][] $explicit List of all items that are either in $explicit, $referenced or both */
        $all = array_merge($referenced, $explicit);

        /** @var string[][] $implicit Anything that is in $all, but not in $explicit, is an implicit inclusion */
        $implicit = array_diff_key($all, $explicit);

        foreach ($implicit as $key => $object) {
            $implicit[$key]['ReferencedBy'] = $references[$key];
        }

        return $implicit;
    }
protected function calculateImplicit()
    {
        /** @var string[][] $explicit List of all items that have been explicitly added to this ChangeSet */
        $explicit = [];

        /** @var string[][] $referenced List of all items that are "referenced" by items in $explicit */
        $referenced = [];

        /** @var string[][] $references List of which explicit items reference each thing in referenced */
        $references = [];

        /** @var ChangeSetItem $item */
        foreach ($this->Changes()->filter(['Added' => ChangeSetItem::EXPLICITLY]) as $item) {
            $explicitKey = $this->implicitKey($item);
            $explicit[$explicitKey] = true;

            foreach ($item->findReferenced() as $referee) {
                try {
                    /** @var DataObject $referee */
                    $key = $this->implicitKey($referee);

                    $referenced[$key] = [
                        'ObjectID' => $referee->ID,
                        'ObjectClass' => $referee->baseClass(),
                    ];

                    $references[$key][] = $item->ID;

                    // Skip any bad records
                } catch (UnexpectedDataException $e) {
                }
            }
        }

        /** @var string[][] $explicit List of all items that are either in $explicit, $referenced or both */
        $all = array_merge($referenced, $explicit);

        /** @var string[][] $implicit Anything that is in $all, but not in $explicit, is an implicit inclusion */
        $implicit = array_diff_key($all, $explicit);

        foreach ($implicit as $key => $object) {
            $implicit[$key]['ReferencedBy'] = $references[$key];
        }

        return $implicit;
    }
protected function calculateImplicit ( ) { /** @var string[][] $explicit List of all items that have been explicitly added to this ChangeSet */ $ explicit = [ ] ; /** @var string[][] $referenced List of all items that are "referenced" by items in $explicit */ $ referenced = [ ] ; /** @var string[][] $references List of which explicit items reference each thing in referenced */ $ references = [ ] ; /** @var ChangeSetItem $item */ foreach ( $ this -> Changes ( ) -> filter ( [ 'Added' => ChangeSetItem :: EXPLICITLY ] ) as $ item ) { $ explicitKey = $ this -> implicitKey ( $ item ) ; $ explicit [ $ explicitKey ] = true ; foreach ( $ item -> findReferenced ( ) as $ referee ) { try { /** @var DataObject $referee */ $ key = $ this -> implicitKey ( $ referee ) ; $ referenced [ $ key ] = [ 'ObjectID' => $ referee -> ID , 'ObjectClass' => $ referee -> baseClass ( ) , ] ; $ references [ $ key ] [ ] = $ item -> ID ; // Skip any bad records } catch ( UnexpectedDataException $ e ) { } } } /** @var string[][] $explicit List of all items that are either in $explicit, $referenced or both */ $ all = array_merge ( $ referenced , $ explicit ) ; /** @var string[][] $implicit Anything that is in $all, but not in $explicit, is an implicit inclusion */ $ implicit = array_diff_key ( $ all , $ explicit ) ; foreach ( $ implicit as $ key => $ object ) { $ implicit [ $ key ] [ 'ReferencedBy' ] = $ references [ $ key ] ; } return $ implicit ; }
List of all implicit items inferred from all currently assigned explicit changes

@return array
List of all implicit items inferred from all currently assigned explicit changes