Passed
Push — master ( bcdf9c...292b00 )
by Luo
02:34
created

SignatureConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 24
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMethod() 0 3 1
A handle() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the iidestiny/flysystem-oss.
5
 *
6
 * (c) iidestiny <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Iidestiny\Flysystem\Oss\Plugins;
13
14
use League\Flysystem\Plugin\AbstractPlugin;
15
16
class SignatureConfig extends AbstractPlugin
17
{
18
    /**
19
     * sign url.
20
     *
21
     * @return string
22
     */
23
    public function getMethod()
24
    {
25
        return 'signatureConfig';
26
    }
27
28
    /**
29
     * handle.
30
     *
31
     * @param string $prefix
32
     * @param null   $callBackUrl
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $callBackUrl is correct as it would always require null to be passed?
Loading history...
33
     * @param int    $expire
34
     *
35
     * @return mixed
36
     */
37
    public function handle($prefix = '', $callBackUrl = null, $expire = 30)
38
    {
39
        return $this->filesystem->getAdapter()->signatureConfig($prefix, $callBackUrl, $expire);
40
    }
41
}
42