HyperlinkInternal::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 6
nc 1
nop 2
1
<?php
2
namespace Xls\Record;
3
4
use Xls\StringUtils;
5
use Xls\Range;
6
7
class HyperlinkInternal extends Hyperlink
8
{
9
    /**
10
     * @param Range $range
11
     * @param $url
12
     *
13
     * @return string
14
     */
15
    public function getData(Range $range, $url)
16
    {
17
        $url = StringUtils::toNullTerminatedWchar($url);
18
19
        $options = $this->getOptions($url);
20
        $data = $this->getCommonData($range, $options);
21
        $data .= $this->getTextMarkData($url);
22
23
        return $this->getFullRecord($data);
24
    }
25
26
    protected function getOptions($url)
27
    {
28
        $options = 0x00;
29
        $options |= 1 << 3; //Has Text mark
30
31
        return $options;
32
    }
33
}
34