ThemeHelper   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
eloc 6
c 1
b 0
f 1
dl 0
loc 22
ccs 0
cts 6
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setTheme() 0 3 1
A theme() 0 6 2
1
<?php
2
3
namespace ByTIC\Hello\Utility;
4
5
/**
6
 * Class ThemeHelper
7
 * @package ByTIC\Hello\Utility
8
 */
9
class ThemeHelper
10
{
11
    protected static $theme = 'bootstrap5';
12
13
    /**
14
     * @param null $new
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $new is correct as it would always require null to be passed?
Loading history...
15
     * @return string|void
16
     */
17
    public static function theme($new = null)
18
    {
19
        if ($new !== null) {
0 ignored issues
show
introduced by
The condition $new !== null is always false.
Loading history...
20
            return static::setTheme($new);
21
        }
22
        return static::$theme;
23
    }
24
25
    /**
26
     * @param string $new
27
     */
28
    protected static function setTheme($new)
29
    {
30
        static::$theme = $new;
31
    }
32
}
33