Completed
Push — 1 ( ab4b0e...812d6a )
by Robbie
10s
created

CwpSiteSummaryExtension::updateVersionModules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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