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

TitleUtility   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 23
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A makeSubTitle() 0 14 4
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