Completed
Push — issue/72 ( 085764 )
by Alex
18:17
created

Author::setUri()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/*
3
 * This file is part of the feed-io package.
4
 *
5
 * (c) Alexandre Debril <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace FeedIo\Feed\Item;
12
13
class Author implements AuthorInterface
14
{
15
16
    /**
17
     * @var string
18
     */
19
    protected $name;
20
21
    /**
22
     * @var string
23
     */
24
    protected $uri;
25
26
    /**
27
     * @var int
28
     */
29
    protected $email;
30
31
    /**
32
     * @return string
33
     */
34 6
    public function getName()
35
    {
36 6
        return $this->name;
37
    }
38
39
    /**
40
     * @param  string $name
41
     * @return $this
42
     */
43 9
    public function setName($name)
44
    {
45 9
        $this->name = $name;
46
47 9
        return $this;
48
    }
49
50
    /**
51
     * @return string
52
     */
53 3
    public function getUri()
54
    {
55 3
        return $this->uri;
56
    }
57
58
    /**
59
     * @param  string $uri
60
     * @return $this
61
     */
62 4
    public function setUri($uri)
63
    {
64 4
        $this->uri = $uri;
65
66 4
        return $this;
67
    }
68
69
    /**
70
     * @return string
71
     */
72 3
    public function getEmail()
73
    {
74 3
        return $this->email;
75
    }
76
77
    /**
78
     * @param  string $email
79
     * @return $this
80
     */
81 4
    public function setEmail($email)
82
    {
83 4
        $this->email = $email;
0 ignored issues
show
Documentation Bug introduced by
The property $email was declared of type integer, but $email is of type string. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
84
85 4
        return $this;
86
    }
87
88
}
89