CommentRepository   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 1
cbo 3
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A deleteByCommentIds() 0 10 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