Code Duplication    Length = 7-7 lines in 3 locations

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

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