Completed
Push — master ( a21736...be5db4 )
by Matthew
16:44 queued 07:17
created

ProgressCallbackTrait::updateProgress()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 3
crap 2
1
<?php
2
3
namespace Dtc\QueueBundle\Doctrine;
4
5
trait ProgressCallbackTrait
6
{
7 6
    protected function updateProgress($callback, $count, $totalCount = null)
8
    {
9 6
        if (is_callable($callback)) {
10 2
            call_user_func($callback, $count, $totalCount);
11 2
        }
12 6
    }
13
}
14