Passed
Pull Request — master (#8)
by Robert
02:12 queued 30s
created

FetchFile::getMethod()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the overtrue/flysystem-qiniu.
5
 * (c) overtrue <[email protected]>
6
 * This source file is subject to the MIT license that is bundled
7
 * with this source code in the file LICENSE.
8
 */
9
10
namespace Overtrue\Flysystem\Qiniu\Plugins;
11
12
use League\Flysystem\Plugin\AbstractPlugin;
13
14
class FetchFile extends AbstractPlugin
15
{
16
    public function getMethod()
17
    {
18
        return 'fetch';
19
    }
20
21
    public function handle($path, $url)
22
    {
23
        return $this->filesystem->getAdapter()->fetch($path, $url);
24
    }
25
}
26