Note::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 9
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 9
loc 9
rs 9.6666
cc 1
eloc 6
nc 1
nop 3
1
<?php
2
namespace Xls\Record;
3
4
use Xls\StringUtils;
5
6 View Code Duplication
class Note extends AbstractRecord
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
7
{
8
    const NAME = 'NOTE';
9
    const ID = 0x001C;
10
11
    /**
12
     * Generate a note associated with the cell given by the row and column.
13
     * NOTE records don't have a length limit
14
     * @param integer $row
15
     * @param integer $col
16
     * @param integer $objId
17
     *
18
     * @return string
19
     */
20
    public function getData($row, $col, $objId)
21
    {
22
        $grbit = 0x00;
23
        $data = pack("vvvv", $row, $col, $grbit, $objId);
24
        $author = 'xls-writer';
25
        $data .= StringUtils::toBiff8UnicodeLong($author);
26
27
        return $this->getFullRecord($data);
28
    }
29
}
30