src/ChangeSet.php
public function isSynced()
    {
        $implicit = $this->calculateImplicit();

        // Check the existing implicit ChangeSetItems for this ChangeSet

        foreach ($this->Changes()->filter(['Added' => ChangeSetItem::IMPLICITLY]) as $item) {
            $objectKey = $this->implicitKey($item);

            // If a ChangeSetItem exists, but isn't in $implicit -> validation failure
            if (!array_key_exists($objectKey, $implicit)) {
                return false;
            }
            // Exists, remove from $implicit
            unset($implicit[$objectKey]);
        }

        // If there's anything left in $implicit -> validation failure
        return empty($implicit);
    }
public function isSynced()
    {
        $implicit = $this->calculateImplicit();

        // Check the existing implicit ChangeSetItems for this ChangeSet

        foreach ($this->Changes()->filter(['Added' => ChangeSetItem::IMPLICITLY]) as $item) {
            $objectKey = $this->implicitKey($item);

            // If a ChangeSetItem exists, but isn't in $implicit -> validation failure
            if (!array_key_exists($objectKey, $implicit)) {
                return false;
            }
            // Exists, remove from $implicit
            unset($implicit[$objectKey]);
        }

        // If there's anything left in $implicit -> validation failure
        return empty($implicit);
    }
public function isSynced ( ) { $ implicit = $ this -> calculateImplicit ( ) ; // Check the existing implicit ChangeSetItems for this ChangeSet foreach ( $ this -> Changes ( ) -> filter ( [ 'Added' => ChangeSetItem :: IMPLICITLY ] ) as $ item ) { $ objectKey = $ this -> implicitKey ( $ item ) ; // If a ChangeSetItem exists, but isn't in $implicit -> validation failure if ( ! array_key_exists ( $ objectKey , $ implicit ) ) { return false ; } // Exists, remove from $implicit unset ( $ implicit [ $ objectKey ] ) ; } // If there's anything left in $implicit -> validation failure return empty ( $ implicit ) ; }
Verify that any objects in this changeset include all owned changes
Verify that any objects in this changeset include all owned changes