HyperlinkInternal   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getData() 0 10 1
A getOptions() 0 7 1
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