Code Duplication    Length = 8-9 lines in 2 locations

Excluded/ODM/Document.php 1 location

@@ 138-146 (lines=9) @@
135
136
            $this->dispatch('saved', new EntityEvent($this));
137
138
        } elseif ($this->isSolid() || $this->hasUpdates()) {
139
140
            /*
141
             * Performing an update using ODM class mapper.
142
             */
143
            $this->dispatch('updating', new EntityEvent($this));
144
            $mapper->update($this->primaryKey(), $this->buildAtomics());
145
            $this->dispatch('updated', new EntityEvent($this));
146
        }
147
148
        $this->flushUpdates();
149

Excluded/ORM/Record.php 1 location

@@ 124-131 (lines=8) @@
121
122
            $this->loadedState(true)->dispatch('saved', new EntityEvent($this));
123
124
        } elseif ($this->isSolid() || $this->hasUpdates()) {
125
            $this->dispatch('updating', new EntityEvent($this));
126
127
            //Performing update using associated mapper
128
            $mapper->update($this->stateCriteria(), $this->compileUpdates());
129
130
            $this->dispatch('updated', new EntityEvent($this));
131
        }
132
133
        $this->flushUpdates();
134
        $this->saveRelations();