Passed
Push — master ( 9705e4...84eff8 )
by Robbie
04:07
created

CwpSiteSummaryExtension::updateVersionModules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace CWP\CWP\Extensions;
4
5
use SilverStripe\Core\Extension;
6
7
/**
8
 * Extends the site summary report to list the appropriate versions in the report header
9
 */
10
class CwpSiteSummaryExtension extends Extension
11
{
12
13
    /**
14
     * Updates the modules used for the version label by:
15
     *  - Removing SS Framework
16
     *  - Adding CWP
17
     *  - Relabelling SS CMS
18
     *
19
     * @param array $modules
20
     */
21
    public function updateVersionModules(&$modules)
22
    {
23
        unset($modules['silverstripe/framework']);
24
        $modules = ['cwp/cwp' => 'CWP'] + $modules;
25
        $modules['silverstripe/cms'] = 'SilverStripe CMS';
26
    }
27
}
28