Completed
Push — master ( 745336...aadd5d )
by Matthew
06:17
created

RunManager   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 2
dl 0
loc 12
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A pruneArchivedRuns() 0 7 1
1
<?php
2
3
namespace Dtc\QueueBundle\ORM;
4
5
use Doctrine\ORM\EntityManager;
6
use Dtc\QueueBundle\Doctrine\BaseRunManager;
7
8
class RunManager extends BaseRunManager
9
{
10
    use CommonTrait;
11
12
    public function pruneArchivedRuns(\DateTime $olderThan)
13
    {
14
        /** @var EntityManager $entityManager */
15
        $entityManager = $this->getObjectManager();
16
17
        return $this->removeOlderThan($entityManager, $this->getRunArchiveClass(), 'endedAt', $olderThan);
18
    }
19
}
20