Number::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 0 Features 0
Metric Value
c 4
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 4
1
<?php
2
namespace Xls\Record;
3
4
class Number extends AbstractRecord
5
{
6
    const NAME = 'NUMBER';
7
    const ID = 0x0203;
8
9
    /**
10
     * @param integer $row
11
     * @param integer $col
12
     * @param float $num
13
     * @param null $format
14
     *
15
     * @return string
16
     */
17
    public function getData($row, $col, $num, $format = null)
18
    {
19
        $xf = $this->xf($format);
20
        $data = pack("vvv", $row, $col, $xf);
21
        $data .= pack("d", $num);
22
23
        return $this->getFullRecord($data);
24
    }
25
}
26