Code Duplication    Length = 14-15 lines in 2 locations

Moss/Storage/Query/UpdateQuery.php 1 location

@@ 90-103 (lines=14) @@
87
     *
88
     * @return mixed
89
     */
90
    public function execute()
91
    {
92
        $this->dispatcher->fire(self::EVENT_BEFORE, $this->instance);
93
94
        $this->builder->execute();
95
96
        $this->dispatcher->fire(self::EVENT_AFTER, $this->instance);
97
98
        foreach ($this->relations as $relation) {
99
            $relation->write($this->instance);
100
        }
101
102
        return $this->instance;
103
    }
104
105
    /**
106
     * Resets adapter

Moss/Storage/Query/WriteQuery.php 1 location

@@ 91-105 (lines=15) @@
88
     *
89
     * @return mixed
90
     */
91
    public function execute()
92
    {
93
        $this->dispatcher->fire(self::EVENT_BEFORE, $this->instance);
94
95
        $this->buildQuery()
96
            ->execute();
97
98
        $this->dispatcher->fire(self::EVENT_AFTER, $this->instance);
99
100
        foreach ($this->relations as $relation) {
101
            $relation->write($this->instance);
102
        }
103
104
        return $this->instance;
105
    }
106
107
    /**
108
     * Returns current query string