TitleUtility::makeSubTitle()   A
last analyzed

Complexity

Conditions 4
Paths 4

Size

Total Lines 17
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 17
rs 9.2
cc 4
eloc 14
nc 4
nop 1
1
<?php
2
3
/**
4
 * Class TitleUtility
5
 */
6
7
namespace HDNET\OnpageIntegration\Utility;
8
9
/**
10
 * Class TitleUtility
11
 */
12
class TitleUtility
13
{
14
15
    /**
16
     * Generate the $moduleName for the
17
     * detail template
18
     *
19
     * @param $section
20
     *
21
     * @return null|string
22
     */
23
    public static function makeSubTitle($section)
24
    {
25
        switch ($section) {
26
            case 'seoaspects':
27
                return 'SEO Aspekte';
28
                break;
0 ignored issues
show
Unused Code introduced by
break is not strictly necessary here and could be removed.

The break statement is not necessary if it is preceded for example by a return statement:

switch ($x) {
    case 1:
        return 'foo';
        break; // This break is not necessary and can be left off.
}

If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.

Loading history...
29
            case 'contentaspects':
30
                return 'Technische Aspekte';
31
                break;
0 ignored issues
show
Unused Code introduced by
break is not strictly necessary here and could be removed.

The break statement is not necessary if it is preceded for example by a return statement:

switch ($x) {
    case 1:
        return 'foo';
        break; // This break is not necessary and can be left off.
}

If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.

Loading history...
32
            case 'technicalaspects':
33
                return 'Technische Aspekte';
34
                break;
0 ignored issues
show
Unused Code introduced by
break is not strictly necessary here and could be removed.

The break statement is not necessary if it is preceded for example by a return statement:

switch ($x) {
    case 1:
        return 'foo';
        break; // This break is not necessary and can be left off.
}

If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.

Loading history...
35
            default:
36
                return null;
37
                break;
0 ignored issues
show
Unused Code introduced by
break is not strictly necessary here and could be removed.

The break statement is not necessary if it is preceded for example by a return statement:

switch ($x) {
    case 1:
        return 'foo';
        break; // This break is not necessary and can be left off.
}

If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.

Loading history...
38
        }
39
    }
40
}
41