Completed
Pull Request — develop (#274)
by
unknown
11:40
created

ListItem::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
/**
3
 * @filesource
4
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
5
 * @license MIT
6
 * @author Miroslav Fedeleš <[email protected]>
7
 * @since 0.27
8
 */
9
namespace Auth\Dependency;
10
11
class ListItem
12
{
13
14
    /**
15
     * @var string
16
     */
17
    protected $title;
18
19
    /**
20
     * @var string
21
     */
22
    protected $url;
23
24
    /**
25
     * @param string $title
26
     * @param string $url
0 ignored issues
show
Documentation introduced by
Should the type for parameter $url not be string|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
27
     */
28
    public function __construct($title, $url = null)
29
    {
30
        $this->title = $title;
31
        $this->url = $url;
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getTitle()
38
    {
39
        return $this->title;
40
    }
41
42
    /**
43
     * @return string|null
44
     */
45
    public function getUrl()
46
    {
47
        return $this->url;
48
    }
49
}
50