UpdateSilverStripeVersionsTask   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 36
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A run() 0 4 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