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

CwpSiteSummaryExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateVersionModules() 0 5 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