SortOutFoldersTask   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
b 0
f 0
dl 0
loc 21
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTitle() 0 3 1
A run() 0 4 1
A getDescription() 0 3 1
1
<?php
2
3
namespace Sunnysideup\PerfectCmsImages\Tasks;
4
5
use SilverStripe\Control\HTTPRequest;
6
use SilverStripe\Dev\BuildTask;
7
use Sunnysideup\PerfectCmsImages\Api\SortOutFolders;
8
9
class SortOutFoldersTask extends BuildTask
10
{
11
    public function getTitle(): string
12
    {
13
        return 'Careful: experimental - MOVE ALL IMAGES THAT ARE IN A FOLDER AND SHOULD NOT BE THERE';
14
    }
15
16
    public function getDescription(): string
17
    {
18
        return 'Goes through all the perfect cms images, checks what folder they write to and moves any images that should not be there.';
19
    }
20
21
    /**
22
     * Create test jobs for the purposes of testing.
23
     *
24
     * @param HTTPRequest $request
25
     */
26
    public function run($request) // phpcs:ignore
27
    {
28
        (new SortOutFolders())
29
            ->runStandard()
30
        ;
31
    }
32
}
33