Passed
Push — master ( 85f21d...13109f )
by Angel Fernando Quiroz
09:54 queued 17s
created

CleanDeletedFilesPlugin   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get_name() 0 3 1
A __construct() 0 6 1
A create() 0 5 2
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
/**
6
 * Clean deleted files plugin.
7
 *
8
 * @author Jose Angel Ruiz
9
 */
10
class CleanDeletedFilesPlugin extends Plugin
11
{
12
    public $isAdminPlugin = true;
13
14
    /**
15
     * Class constructor.
16
     */
17
    protected function __construct()
18
    {
19
        $version = '1.0';
20
        $author = 'José Angel Ruiz (NOSOLORED)';
21
        parent::__construct($version, $author, ['enabled' => 'boolean']);
22
        $this->isAdminPlugin = true;
23
    }
24
25
    /**
26
     * @return RedirectionPlugin
27
     */
28
    public static function create()
29
    {
30
        static $result = null;
31
32
        return $result ? $result : $result = new self();
33
    }
34
35
    public function get_name()
36
    {
37
        return 'CleanDeletedFiles';
38
    }
39
}
40