Completed
Pull Request — master (#10)
by
unknown
04:44
created

PrivateDownloadUrl   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 13
ccs 0
cts 9
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMethod() 0 4 1
A handle() 0 5 1
1
<?php
2
3
namespace Overtrue\Flysystem\Qiniu\Plugins;
4
5
use League\Flysystem\Plugin\AbstractPlugin;
6
7
/**
8
 * Class PrivateDownloadUrl
9
 *
10
 * @package \Overtrue\Flysystem\Qiniu\Plugins
11
 */
12
class PrivateDownloadUrl extends AbstractPlugin
13
{
14
    public function getMethod()
15
    {
16
        return 'privateDownloadUrl';
17
    }
18
19
    public function handle($path, $expires = 3600)
20
    {
21
        $adapter = $this->filesystem->getAdapter();
22
        return $adapter->privateDownloadUrl($path, $expires);
23
    }
24
}
25