Sheet   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getData() 0 10 1
1
<?php
2
namespace Xls\Record;
3
4
use Xls\StringUtils;
5
use Xls\Worksheet;
6
7
class Sheet extends AbstractRecord
8
{
9
    const NAME = 'SHEET';
10
    const ID = 0x0085;
11
12
    /**
13
     * Generate BOUNDSHEET record.
14
     *
15
     * @param string $sheetName Worksheet name
16
     * @param integer $offset Location of worksheet BOF
17
     * @return string
18
     */
19
    public function getData($sheetName, $offset = 0)
20
    {
21
        $sheetState = Worksheet::STATE_VISIBLE;
22
        $sheetType = Worksheet::TYPE_SHEET;
23
24
        $data = pack("VCC", $offset, $sheetState, $sheetType);
25
        $data .= StringUtils::toBiff8UnicodeShort($sheetName);
26
27
        return $this->getFullRecord($data);
28
    }
29
}
30