Code Duplication    Length = 7-7 lines in 3 locations

src/Kunstmaan/DashboardBundle/Repository/AnalyticsConfigRepository.php 3 locations

@@ 164-170 (lines=7) @@
161
     *
162
     * @param string $profileId
163
     */
164
    public function saveProfileId($profileId, $id = false)
165
    {
166
        $em = $this->getEntityManager();
167
        $config = $id ? $this->find($id) : $this->findFirst();
168
        $config->setProfileId($profileId);
169
        $em->persist($config);
170
        $em->flush();
171
    }
172
173
    /**
@@ 178-184 (lines=7) @@
175
     *
176
     * @param string $profileId
177
     */
178
    public function saveConfigName($name, $id = false)
179
    {
180
        $em = $this->getEntityManager();
181
        $config = $id ? $this->find($id) : $this->findFirst();
182
        $config->setName($name);
183
        $em->persist($config);
184
        $em->flush();
185
    }
186
187
    /**
@@ 192-198 (lines=7) @@
189
     *
190
     * @param int id
191
     */
192
    public function resetProfileId($id = false)
193
    {
194
        $em = $this->getEntityManager();
195
        $config = $id ? $this->find($id) : $this->findFirst();
196
        $config->setProfileId('');
197
        $em->persist($config);
198
        $em->flush();
199
    }
200
201
    /**