Completed
Push — master ( 5289b1...66334b )
by Xu
06:18
created

NullAdapter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A displayName() 0 3 1
A prepareAdapter() 0 3 1
1
<?php
2
/**
3
 * @link http://www.tintsoft.com/
4
 * @copyright Copyright (c) 2012 TintSoft Technology Co. Ltd.
5
 * @license http://www.tintsoft.com/license/
6
 */
7
8
9
namespace yuncms\filesystem\adapters;
10
11
use Yii;
12
use yuncms\filesystem\Adapter;
13
14
/**
15
 * Class NullAdapter
16
 *
17
 * @author Tongle Xu <[email protected]>
18
 * @since 3.0
19
 */
20
class NullAdapter extends Adapter
21
{
22
    /**
23
     * @inheritdoc
24
     */
25
    public static function displayName(): string
26
    {
27
        return Yii::t('yuncms', 'Null');
28
    }
29
30
    /**
31
     * @return \League\Flysystem\Adapter\NullAdapter
32
     */
33
    protected function prepareAdapter()
34
    {
35
        return new \League\Flysystem\Adapter\NullAdapter();
36
    }
37
}