CommentRepository::deleteByCommentIds()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 10
rs 9.4285
cc 1
eloc 7
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Rafidion Michael
5
 * Date: 04/09/2015
6
 * Time: 14:31
7
 */
8
9
namespace Mykees\CommentBundle\Repository;
10
11
use Doctrine\ORM\EntityRepository;
12
13
class CommentRepository extends EntityRepository
14
{
15
	public function deleteByCommentIds(array $ids)
16
	{
17
		return $this->_em->createQueryBuilder()
18
			->delete("MykeesCommentBundle:Comment",'c')
19
			->where("c.id IN(:ids)")
20
			->setParameter('ids', array_values($ids))
21
			->getQuery()
22
			->execute()
23
		;
24
	}
25
}
26