Window1::getData()   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 25
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 25
rs 8.8571
cc 1
eloc 19
nc 1
nop 3
1
<?php
2
3
namespace Xls\Record;
4
5
class Window1 extends AbstractRecord
6
{
7
    const NAME = 'WINDOW1';
8
    const ID = 0x003D;
9
10
    /**
11
     * @param $selectedSheetsCount Number of workbook tabs selected
12
     * @param $firstSheet 1st displayed worksheet
13
     * @param $activeSheet 1st displayed worksheet
14
     *
15
     * @return string
16
     */
17
    public function getData($selectedSheetsCount, $firstSheet, $activeSheet)
18
    {
19
        $xWn = 0x0000; // Horizontal position of window
20
        $yWn = 0x0000; // Vertical position of window
21
        $dxWn = 0x25BC; // Width of window
22
        $dyWn = 0x1572; // Height of window
23
24
        $grbit = 0x0038; // Option flags
25
        $wTabRatio = 0x0258; // Tab to scrollbar ratio
26
27
        $data = pack(
28
            "vvvvvvvvv",
29
            $xWn,
30
            $yWn,
31
            $dxWn,
32
            $dyWn,
33
            $grbit,
34
            $activeSheet,
35
            $firstSheet,
36
            $selectedSheetsCount,
37
            $wTabRatio
38
        );
39
40
        return $this->getFullRecord($data);
41
    }
42
}
43