UpdateSilverStripeVersionsTask::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Updates the available SilverStripe versions.
4
 *
5
 * @package mysite
6
 */
7
class UpdateSilverStripeVersionsTask extends BuildTask
8
{
9
    /**
10
     * {@inheritDoc}
11
     * @var string
12
     */
13
    protected $title = 'Update SilverStripe Versions';
14
15
    /**
16
     * {@inheritDoc}
17
     * @var string
18
     */
19
    protected $description = 'Updates the available SilverStripe versions';
20
21
    /**
22
     * @var SilverStripeVersionUpdater
23
     */
24
    private $updater;
25
26
    /**
27
     * @param SilverStripeVersionUpdater $updater
28
     */
29
    public function __construct(SilverStripeVersionUpdater $updater)
30
    {
31
        $this->updater = $updater;
32
    }
33
34
    /**
35
     * {@inheritDoc}
36
     * @param SS_HTTPRequest $request
37
     */
38
    public function run($request)
39
    {
40
        $this->updater->update();
41
    }
42
}
43