Completed
Push — master ( e48d0b...00d123 )
by Jelly
8s
created

ImagePreviewUrl   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 17
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMethod() 0 4 1
A handle() 0 4 1
1
<?php
2
3
namespace JellyBool\Flysystem\Upyun\Plugins;
4
5
use League\Flysystem\Plugin\AbstractPlugin;
6
7
/**
8
 * Class ImagePreviewUrl
9
 * 
10
 * @package JellyBool\Flysystem\Upyun\Plugins
11
 */
12
class ImagePreviewUrl extends AbstractPlugin
13
{
14
    /**
15
     * Get the method name.
16
     *
17
     * @return string
18
     */
19
    public function getMethod()
20
    {
21
        return 'getUrl';
22
    }
23
24
    public function handle($path = null)
25
    {
26
        return $this->filesystem->getAdapter()->getUrl($path);
27
    }
28
}