Completed
Push — master ( cebd6a...4982e0 )
by Simon
01:36
created

PartialSubmissionTask::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Firesphere\PartialUserforms\Tasks;
4
5
use Firesphere\PartialUserforms\Jobs\PartialSubmissionJob;
6
use SilverStripe\Control\HTTPRequest;
7
use SilverStripe\Core\Injector\Injector;
8
use SilverStripe\Dev\BuildTask;
9
10
class PartialSubmissionTask extends BuildTask
11
{
12
    private static $segment = 'partialsubmissiontask';
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
Unused Code introduced by
The property $segment is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
13
14
    public function __construct()
15
    {
16
        $this->title = _t(__CLASS__ . '.Title', 'Export partial form submissions to email address');
17
        parent::__construct();
18
    }
19
20
    /**
21
     * Implement this method in the task subclass to
22
     * execute via the TaskRunner
23
     *
24
     * @param HTTPRequest $request
25
     * @return void
26
     */
27
    public function run($request)
28
    {
29
        Injector::inst()->get(PartialSubmissionJob::class)->process();
30
    }
31
}
32