Window1   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 38
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 38
rs 10

1 Method

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