FormatTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFormatCode() 0 3 1
A setFormatCode() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace MisterIcy\ExcelWriter\Properties\Traits;
5
6
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
7
8
/**
9
 * Trait FormatTrait
10
 * @author Alexandros Koutroulis
11
 * @license MIT
12
 *
13
 * @package MisterIcy\ExcelWriter\Properties
14
 */
15
trait FormatTrait
16
{
17
    /** @var string  */
18
    protected $formatCode = NumberFormat::FORMAT_GENERAL;
19
20
    /**
21
     * @return string
22
     */
23
    public function getFormatCode() : string
24
    {
25
        return $this->formatCode;
26
    }
27
28
    /**
29
     * @param string $formatCode
30
     * @return self
31
     */
32
    public function setFormatCode(string $formatCode)
33
    {
34
        $this->formatCode = $formatCode;
35
        return $this;
36
    }
37
}
38