| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | final class CreateQuery |
||
| 10 | { |
||
| 11 | private $manager; |
||
| 12 | |||
| 13 | private $options; |
||
| 14 | |||
| 15 | private $entityClass; |
||
|
|
|||
| 16 | |||
| 17 | 2 | public function __construct( |
|
| 18 | \Doctrine\ORM\EntityManager $manager, |
||
| 19 | QueryBuilderOptions $options, |
||
| 20 | EntityClass $class |
||
| 21 | ) { |
||
| 22 | 2 | $this->manager = $manager; |
|
| 23 | 2 | $this->options = $options; |
|
| 24 | 2 | $this->class = $class; |
|
| 25 | 2 | } |
|
| 26 | |||
| 27 | 2 | private function getQuery() |
|
| 28 | { |
||
| 29 | 2 | return (new BaseRepository($this->manager, |
|
| 30 | 2 | $this->manager->getClassMetadata($this->class->getFQNC()) |
|
| 31 | )) |
||
| 32 | 2 | ->setQueryOptions($this->options) |
|
| 33 | 2 | ->getQueryBuilderFactory() |
|
| 34 | 2 | ->filter() |
|
| 35 | 2 | ->sort() |
|
| 36 | 2 | ->getQueryBuilder() |
|
| 37 | 2 | ->getQuery(); |
|
| 38 | } |
||
| 39 | |||
| 40 | 1 | public function getDql() |
|
| 41 | { |
||
| 42 | 1 | return $this->getQuery()->getDql(); |
|
| 43 | } |
||
| 44 | |||
| 45 | 1 | public function getSql() |
|
| 48 | } |
||
| 49 | } |
||
| 50 |
This check marks private properties in classes that are never used. Those properties can be removed.