1 | <?php |
||
15 | class PersonContact |
||
16 | { |
||
17 | /** |
||
18 | * @var MongoId $id |
||
19 | */ |
||
20 | protected $id; |
||
21 | |||
22 | /** |
||
23 | * @var string $type |
||
24 | */ |
||
25 | protected $type; |
||
26 | |||
27 | /** |
||
28 | * @var string $ri |
||
29 | */ |
||
30 | protected $value; |
||
31 | |||
32 | /** |
||
33 | * @var string $protocol |
||
34 | */ |
||
35 | protected $protocol; |
||
36 | |||
37 | /** |
||
38 | * @var string $uri |
||
39 | */ |
||
40 | protected $uri; |
||
41 | |||
42 | /** |
||
43 | * Get id |
||
44 | * |
||
45 | * @return id $id |
||
|
|||
46 | */ |
||
47 | 25 | public function getId() |
|
51 | |||
52 | /** |
||
53 | * Set type |
||
54 | * |
||
55 | * @param string $type type of contact (ie. phone, email, web, xmpp) |
||
56 | * |
||
57 | * @return self |
||
58 | */ |
||
59 | 24 | public function setType($type) |
|
60 | { |
||
61 | 24 | $this->type = $type; |
|
62 | |||
63 | 24 | return $this; |
|
64 | } |
||
65 | |||
66 | /** |
||
67 | * Get type |
||
68 | * |
||
69 | * @return string $type |
||
70 | */ |
||
71 | 25 | public function getType() |
|
75 | |||
76 | /** |
||
77 | * Set value |
||
78 | * |
||
79 | * @param string $value value to contact resource (starting with tel:, http:, ...) |
||
80 | * |
||
81 | * @return self |
||
82 | */ |
||
83 | 23 | public function setValue($value) |
|
84 | { |
||
85 | 23 | $this->value = $value; |
|
86 | |||
87 | 23 | return $this; |
|
88 | } |
||
89 | |||
90 | /** |
||
91 | * Get value |
||
92 | * |
||
93 | * @return string $value |
||
94 | */ |
||
95 | 25 | public function getValue() |
|
99 | |||
100 | /** |
||
101 | * Set protocol |
||
102 | * |
||
103 | * @param string $protocol protocol |
||
104 | * |
||
105 | * @return self |
||
106 | */ |
||
107 | 23 | public function setProtocol($protocol) |
|
108 | { |
||
109 | 23 | $this->protocol = $protocol; |
|
110 | |||
111 | 23 | return $this; |
|
112 | } |
||
113 | |||
114 | /** |
||
115 | * Get protocol |
||
116 | * |
||
117 | * @return string $protocol |
||
118 | */ |
||
119 | 25 | public function getProtocol() |
|
123 | |||
124 | /** |
||
125 | * Set uri |
||
126 | * |
||
127 | * @param string $uri uri |
||
128 | * |
||
129 | * @return self |
||
130 | */ |
||
131 | 23 | public function setUri($uri) |
|
132 | { |
||
133 | 23 | $this->uri = $uri; |
|
134 | |||
135 | 23 | return $this; |
|
136 | } |
||
137 | |||
138 | /** |
||
139 | * Get uri |
||
140 | * |
||
141 | * @return string $uri |
||
142 | */ |
||
143 | 25 | public function getUri() |
|
147 | } |
||
148 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.