BitmapCoreHeader   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 1
c 3
b 0
f 0
lcom 0
cbo 1
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getData() 0 9 1
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