Helper::setCharset()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of Biurad opensource projects.
7
 *
8
 * PHP version 7.2 and above required
9
 *
10
 * @author    Divine Niiquaye Ibok <[email protected]>
11
 * @copyright 2019 Biurad Group (https://biurad.com/)
12
 * @license   https://opensource.org/licenses/BSD-3-Clause License
13
 *
14
 * For the full copyright and license information, please view the LICENSE
15
 * file that was distributed with this source code.
16
 */
17
18
namespace Biurad\UI\Helper;
19
20
use Biurad\UI\Interfaces\HelperInterface;
21
22
/**
23
 * Helper is the base class for all helper classes.
24
 *
25
 * Most of the time, a Helper is an adapter around an existing
26
 * class that exposes a read-only interface for templates.
27
 *
28
 * @author Divine Niiquaye Ibok <[email protected]>
29
 */
30
abstract class Helper implements HelperInterface
31
{
32
    /** @var string */
33
    protected $charset = 'UTF-8';
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    public function setCharset(string $charset): void
39
    {
40
        $this->charset = $charset;
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function getCharset(): string
47
    {
48
        return $this->charset;
49
    }
50
}
51