Completed
Push — develop ( 840c69...29c45a )
by René
03:26
created

TitleUtility::makeSubTitle()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 14
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 14
rs 9.2
cc 4
eloc 11
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
     * @param $section
17
     *
18
     * @return string
19
     */
20
    static public function makeSubTitle($section)
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
21
    {
22
        switch ($section) {
23
            case 'seoaspects':
24
                return 'SEO Aspekte';
25
                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...
26
            case 'contentaspects':
27
                return 'Technische 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 'technicalaspects':
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
        }
33
    }
34
}
35