Code Duplication    Length = 10-11 lines in 2 locations

src/Query.php 2 locations

@@ 63-72 (lines=10) @@
60
     * @param   array           $criteria
61
     * @return  array|bool
62
     */
63
    public function executeDelete(EntityMetadata $metadata, Store $store, array $criteria)
64
    {
65
        $criteria = $this->getFormatter()->formatQuery($metadata, $store, $criteria);
66
        return $this->createQueryBuilder($metadata)
67
            ->remove()
68
            ->setQueryArray($criteria)
69
            ->getQuery()
70
            ->execute();
71
        ;
72
    }
73
74
    /**
75
     * Finds records from the database based on the provided metadata and criteria.
@@ 129-139 (lines=11) @@
126
     * @param   array           $toUpdate   The data to update.
127
     * @return  array|bool
128
     */
129
    public function executeUpdate(EntityMetadata $metadata, Store $store, array $criteria, array $toUpdate)
130
    {
131
        $criteria = $this->getFormatter()->formatQuery($metadata, $store, $criteria);
132
        return $this->createQueryBuilder($metadata)
133
            ->update()
134
            ->setQueryArray($criteria)
135
            ->setNewObj($toUpdate)
136
            ->getQuery()
137
            ->execute();
138
        ;
139
    }
140
141
    /**
142
     * @return  Formatter