Test Failed
Push — master ( b264ea...85a9d8 )
by Julien
12:07
created

BlameAt::getDateCallback()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 2
c 1
b 1
f 0
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
/**
4
 * This file is part of the Zemit Framework.
5
 *
6
 * (c) Zemit Team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE.txt
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zemit\Mvc\Model\Blameable;
13
14
trait BlameAt
15
{
16
    public function getDateCallback(...$args): \Closure
17
    {
18
        return function () use ($args) {
19
            return date(...$args);
0 ignored issues
show
Bug introduced by
$args is expanded, but the parameter $format of date() does not expect variable arguments. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

19
            return date(/** @scrutinizer ignore-type */ ...$args);
Loading history...
20
        };
21
    }
22
}
23