Passed
Push — master ( 6c10ed...067306 )
by Taosikai
05:29 queued 02:54
created

Processor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 17
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A process() 0 5 1
A __construct() 0 3 1
1
<?php
2
3
namespace Slince\Upload\Processing;
4
5
use Slince\Upload\File;
6
7
class Processor implements ProcessorInterface
8
{
9
    protected $closure;
10
11
    public function __construct(\Closure $closure)
12
    {
13
        $this->closure = $closure;
14
    }
15
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function process(File $file): File
20
    {
21
        call_user_func($this->closure, $file);
22
23
        return $file;
24
    }
25
}
26