Datemode::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Xls\Record;
4
5
class Datemode extends AbstractRecord
6
{
7
    const NAME = 'DATEMODE';
8
    const ID = 0x0022;
9
10
    /**
11
     * Generate DATEMODE record to indicate the date system in use (1904 or 1900).
12
     *
13
     * @param integer $f1904 Flag for 1904 date system (0 => base date is 1900, 1 => base date is 1904)
14
     * @return string
15
     */
16
    public function getData($f1904)
17
    {
18
        $data = pack("v", $f1904);
19
20
        return $this->getFullRecord($data);
21
    }
22
}
23