Passed
Pull Request — master (#10)
by
unknown
01:57
created

PrivateDownloadUrl::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 2
1
<?php
2
3
namespace Overtrue\Flysystem\Qiniu\Plugins;
4
5
use League\Flysystem\Plugin\AbstractPlugin;
6
7
class PrivateDownloadUrl extends AbstractPlugin
8
{
9
    public function getMethod()
10
    {
11
        return 'privateDownloadUrl';
12
    }
13
14
    public function handle($path, $expires = 3600)
15
    {
16
        $adapter = $this->filesystem->getAdapter();
17
        return $adapter->privateDownloadUrl($path, $expires);
18
    }
19
}
20