FormatTrait::getFormatCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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