Completed
Push — master ( fb692e...c26f50 )
by ignace nyamagana
03:48
created

User   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 3
c 4
b 0
f 0
lcom 1
cbo 1
dl 0
loc 24
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getContent() 0 8 2
A getValue() 0 4 1
1
<?php
2
/**
3
 * League.Uri (http://uri.thephpleague.com)
4
 *
5
 * @package   League.uri
6
 * @author    Ignace Nyamagana Butera <[email protected]>
7
 * @copyright 2013-2015 Ignace Nyamagana Butera
8
 * @license   https://github.com/thephpleague/uri/blob/master/LICENSE (MIT License)
9
 * @version   4.2.0
10
 * @link      https://github.com/thephpleague/uri/
11
 */
12
namespace League\Uri\Components;
13
14
use League\Uri\Interfaces\User as UserInterface;
15
16
/**
17
 * Value object representing a URI user component.
18
 *
19
 * @package League.uri
20
 * @author  Ignace Nyamagana Butera <[email protected]>
21
 * @since   1.0.0
22
 */
23
class User extends AbstractComponent implements UserInterface
24
{
25
    /**
26
     * @inheritdoc
27
     */
28 792
    public function getContent()
29
    {
30 792
        if (null === $this->data) {
31 615
            return $this->data;
32
        }
33
34 225
        return $this->encode((string) $this->data, self::$subdelimChars);
35
    }
36
37
    /**
38
     * Return the decoded string representation of the component
39
     *
40
     * @return string
41
     */
42 30
    public function getValue()
43
    {
44 30
        return (string) $this->data;
45
    }
46
}
47