Completed
Push — master ( 0eab77...b2f729 )
by Paul
05:35
created

BusinessEntityRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getByAvailableWidgets() 0 8 1
1
<?php
2
3
namespace Victoire\Bundle\BusinessEntityBundle\Entity;
4
5
use Doctrine\ORM\EntityRepository;
6
7
/**
8
 * The BusinessEntity Repository.
9
 */
10
class BusinessEntityRepository extends EntityRepository
11
{
12
    /**
13
     * @param array $widgetType
14
     */
15
    public function getByAvailableWidgets($widgetType)
16
    {
17
        return $this->createQueryBuilder('be')
18
            ->where('be.availableWidgets LIKE :widgetType')
19
            ->setParameter(':widgetType', '%'.$widgetType.'%')
20
            ->getQuery()
21
            ->execute();
22
    }
23
}
24