Filename::filename()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Yaro\Jarboe\Table\Fields\Traits;
4
5
use Closure;
6
7
trait Filename
8
{
9
    private $filenameClosure = null;
10
11
    /**
12
     * Set closure for changing filename upon upload.
13
     *
14
     * @param Closure $filenameClosure
15
     * @return $this
16
     */
17
    public function filename(Closure $filenameClosure)
18
    {
19
        $this->filenameClosure = $filenameClosure;
20
21
        return $this;
22
    }
23
}
24