@@ -28,7 +28,8 @@ public function __construct()
2828 * The name of the person.
2929 *
3030 * @param string $sName
31- * @return object this
31+ *
32+ * @return self
3233 */
3334 public function name ($ sName )
3435 {
@@ -40,7 +41,8 @@ public function name($sName)
4041 * The full name of the person.
4142 *
4243 * @param string $sFullName
43- * @return object this
44+ *
45+ * @return self this
4446 */
4547 public function fullName ($ sFullName )
4648 {
@@ -49,22 +51,21 @@ public function fullName($sFullName)
4951 }
5052
5153 /**
52- * Delivery address.
53- *
5454 * @param string $sAddress
55- * @return object this
55+ *
56+ * @return self
5657 */
5758 public function address ($ sAddress )
5859 {
5960 $ this ->_sData .= 'ADR: ' . $ sAddress . "\n" ;
61+
6062 return $ this ;
6163 }
6264
6365 /**
64- * Nickname.
65- *
6666 * @param string $sNickname
67- * @return object this
67+ *
68+ * @return self
6869 */
6970 public function nickName ($ sNickname )
7071 {
@@ -73,10 +74,9 @@ public function nickName($sNickname)
7374 }
7475
7576 /**
76- * Email address.
77- *
7877 * @param string $sMail
79- * @return object this
78+ *
79+ * @return self
8080 */
8181 public function email ($ sMail )
8282 {
@@ -85,10 +85,9 @@ public function email($sMail)
8585 }
8686
8787 /**
88- * Work Phone.
89- *
9088 * @param string $sVal
91- * @return object this
89+ *
90+ * @return self
9291 */
9392 public function workPhone ($ sVal )
9493 {
@@ -97,10 +96,9 @@ public function workPhone($sVal)
9796 }
9897
9998 /**
100- * Home Phone.
101- *
10299 * @param string $sVal
103- * @return object this
100+ *
101+ * @return self
104102 */
105103 public function homePhone ($ sVal )
106104 {
@@ -109,10 +107,9 @@ public function homePhone($sVal)
109107 }
110108
111109 /**
112- * URL address.
113- *
114110 * @param string $sUrl
115- * @return object this
111+ *
112+ * @return self
116113 */
117114 public function url ($ sUrl )
118115 {
@@ -122,11 +119,10 @@ public function url($sUrl)
122119 }
123120
124121 /**
125- * SMS code.
126- *
127122 * @param string $sPhone
128123 * @param string $sText
129- * @return object this
124+ *
125+ * @return self
130126 */
131127 public function sms ($ sPhone , $ sText )
132128 {
@@ -135,10 +131,9 @@ public function sms($sPhone, $sText)
135131 }
136132
137133 /**
138- * Birthday.
139- *
140134 * @param string $sBirthday Date in the format YYYY-MM-DD or ISO 8601
141- * @return object this
135+ *
136+ * @return self
142137 */
143138 public function birthday ($ sBirthday )
144139 {
@@ -147,10 +142,9 @@ public function birthday($sBirthday)
147142 }
148143
149144 /**
150- * Anniversary.
151- *
152145 * @param string $sBirthDate Date in the format YYYY-MM-DD or ISO 8601
153- * @return object this
146+ *
147+ * @return self
154148 */
155149 public function anniversary ($ sBirthDate )
156150 {
@@ -159,10 +153,9 @@ public function anniversary($sBirthDate)
159153 }
160154
161155 /**
162- * Gender.
163- *
164156 * @param string $sSex F = Female. M = Male
165- * @return object this
157+ *
158+ * @return self
166159 */
167160 public function gender ($ sSex )
168161 {
@@ -173,8 +166,9 @@ public function gender($sSex)
173166 /**
174167 * A list of "tags" that can be used to describe the object represented by this vCard.
175168 *
176- * @param string $sCategory
177- * @return object this
169+ * @param string $sCategories
170+ *
171+ * @return self
178172 */
179173 public function categories ($ sCategories )
180174 {
@@ -186,39 +180,45 @@ public function categories($sCategories)
186180 * The instant messenger (Instant Messaging and Presence Protocol).
187181 *
188182 * @param string $sVal
189- * @return object this
183+ *
184+ * @return self
190185 */
191186 public function impp ($ sVal )
192187 {
193- $ this ->_sData .= 'IMPP: ' . $ sVal . "\n" ;
194- return $ this ;
188+ $ this ->_sData .= 'IMPP: ' . $ sVal . "\n" ;
189+ return $ this ;
195190 }
196191
197192 /**
198193 * Photo (avatar).
199194 *
200195 * @param string $sImgUrl URL of the image.
201- * @return object this
196+ *
197+ * @return self
198+ *
202199 * @throws InvalidArgumentException If the image format is invalid.
203200 */
204201 public function photo ($ sImgUrl )
205202 {
206203 $ bIsImgExt = strtolower (substr (strrchr ($ sImgUrl , '. ' ), 1 )); // Get the file extension.
207204
208- if ($ bIsImgExt == 'jpeg ' || $ bIsImgExt == 'jpg ' || $ bIsImgExt == 'png ' || $ bIsImgExt == 'gif ' )
205+ if ($ bIsImgExt == 'jpeg ' || $ bIsImgExt == 'jpg ' || $ bIsImgExt == 'png ' || $ bIsImgExt == 'gif ' ) {
209206 $ sExt = strtoupper ($ bIsImgExt );
210- else
207+ } else {
211208 throw new InvalidArgumentException ('Invalid format Image! ' );
209+ }
212210
213211 $ this ->_sData .= 'PHOTO;VALUE=URL;TYPE= ' . $ sExt . ': ' . $ sImgUrl . "\n" ;
212+
214213 return $ this ;
215214 }
216215
217216 /**
218217 * The role, occupation, or business category of the vCard object within an organization.
219218 *
220219 * @param string $sRole e.g., Executive
221- * @return object this
220+ *
221+ * @return self
222222 */
223223 public function role ($ sRole )
224224 {
@@ -234,7 +234,8 @@ public function role($sRole)
234234 * attribute and the X.520 Organization Unit attribute.
235235 *
236236 * @param string $sOrg e.g., Google;GMail Team;Spam Detection Squad
237- * @return object this
237+ *
238+ * @return self
238239 */
239240 public function organization ($ sOrg )
240241 {
@@ -246,7 +247,8 @@ public function organization($sOrg)
246247 * The supplemental information or a comment that is associated with the vCard.
247248 *
248249 * @param string $sText
249- * @return object this
250+ *
251+ * @return self
250252 */
251253 public function note ($ sText )
252254 {
@@ -255,11 +257,10 @@ public function note($sText)
255257 }
256258
257259 /**
258- * Bookmark.
259- *
260260 * @param string $sTitle
261261 * @param string $sUrl
262- * @return object this
262+ *
263+ * @return self
263264 */
264265 public function bookmark ($ sTitle , $ sUrl )
265266 {
@@ -273,7 +274,8 @@ public function bookmark($sTitle, $sUrl)
273274 * @param string $sLat Latitude
274275 * @param string $sLon Longitude
275276 * @param integer $iHeight Height
276- * @return object this
277+ *
278+ * @return self
277279 */
278280 public function geo ($ sLat , $ sLon , $ iHeight )
279281 {
@@ -285,7 +287,8 @@ public function geo($sLat, $sLon, $iHeight)
285287 * The language that the person speaks.
286288 *
287289 * @param string $sLang e.g., en-US
288- * @return object this
290+ *
291+ * @return self
289292 */
290293 public function lang ($ sLang )
291294 {
@@ -294,12 +297,11 @@ public function lang($sLang)
294297 }
295298
296299 /**
297- * Wifi.
298- *
299300 * @param string $sType
300301 * @param string $sSsid
301302 * @param string $sPwd
302- * @return object this
303+ *
304+ * @return self
303305 */
304306 public function wifi ($ sType , $ sSsid , $ sPwd )
305307 {
@@ -310,7 +312,7 @@ public function wifi($sType, $sSsid, $sPwd)
310312 /**
311313 * Generate the QR code.
312314 *
313- * @return object this
315+ * @return self
314316 */
315317 public function finish ()
316318 {
0 commit comments