Completed
Pull Request — develop (#274)
by
unknown
39:07
created

ListItem   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTitle() 0 4 1
A getUrl() 0 4 1
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