BitmapCoreHeader::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 9
rs 9.6666
cc 1
eloc 5
nc 1
nop 2
1
<?php
2
3
namespace Xls\Record;
4
5
class BitmapCoreHeader extends AbstractRecord
6
{
7
    const NAME = 'BITMAPCOREHEADER';
8
9
    /**
10
     * @param $width
11
     * @param $height
12
     * @return string
13
     */
14
    public function getData($width, $height)
15
    {
16
        $planesCount = 1;
17
        $colorDepth = 24;
18
19
        $data = pack("vvvv", $width, $height, $planesCount, $colorDepth);
20
21
        return pack("V", strlen($data) + 4) . $data;
22
    }
23
}
24