SortOutFoldersTask::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
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