Skip to content

Commit 0da6156

Browse files
committed
Add return type hints.
1 parent 21e1511 commit 0da6156

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/MicrodataPhp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function __construct($config) {
6161
/**
6262
* Retrieve microdata as a PHP object.
6363
*
64-
* @return
64+
* @return object
6565
* An object with an 'items' property, which is an array of top level
6666
* microdata items as objects with the following properties:
6767
* - type: An array of itemtype(s) for the item, if specified.
@@ -86,7 +86,7 @@ public function obj() {
8686
/**
8787
* Retrieve microdata in JSON format.
8888
*
89-
* @return
89+
* @return string
9090
* See obj().
9191
*
9292
* @todo MicrodataJS allows callers to pass in a function to format the JSON.

src/MicrodataPhpDOMDocument.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class MicrodataPhpDOMDocument extends \DOMDocument {
99
/**
1010
* Retrieves a list of microdata items.
1111
*
12-
* @return
12+
* @return DOMNodeList
1313
* A DOMNodeList containing all top level microdata items.
1414
*
1515
* @todo Allow restriction by type string.
@@ -22,7 +22,7 @@ public function getItems() {
2222
/**
2323
* Creates a DOMXPath to query this document.
2424
*
25-
* @return
25+
* @return DOMXPath
2626
* DOMXPath object.
2727
*/
2828
public function xpath() {

src/MicrodataPhpDOMElement.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class MicrodataPhpDOMElement extends \DOMElement {
1010
/**
1111
* Determine whether the itemscope attribute is present on this element.
1212
*
13-
* @return
14-
* boolean TRUE if this is an item, FALSE if it is not.
13+
* @return bool
14+
* TRUE if this is an item, FALSE if it is not.
1515
*/
1616
public function itemScope() {
1717
return $this->hasAttribute('itemscope');
@@ -20,7 +20,7 @@ public function itemScope() {
2020
/**
2121
* Retrieve this item's itemtypes.
2222
*
23-
* @return
23+
* @return array
2424
* An array of itemtype tokens.
2525
*/
2626
public function itemType() {
@@ -36,7 +36,7 @@ public function itemType() {
3636
/**
3737
* Retrieve this item's itemid.
3838
*
39-
* @return
39+
* @return string
4040
* A string with the itemid.
4141
*/
4242
public function itemId() {
@@ -52,7 +52,7 @@ public function itemId() {
5252
/**
5353
* Retrieve this item's itemprops.
5454
*
55-
* @return
55+
* @return array
5656
* An array of itemprop tokens.
5757
*/
5858
public function itemProp() {
@@ -66,7 +66,7 @@ public function itemProp() {
6666
/**
6767
* Retrieve the ids of other items which this item references.
6868
*
69-
* @return
69+
* @return array
7070
* An array of ids as contained in the itemref attribute.
7171
*/
7272
public function itemRef() {
@@ -80,7 +80,7 @@ public function itemRef() {
8080
/**
8181
* Retrieve the properties
8282
*
83-
* @return
83+
* @return array
8484
* An array of MicrodataPhpDOMElements which are properties of this
8585
* element.
8686
*/
@@ -107,7 +107,7 @@ public function properties() {
107107
/**
108108
* Retrieve the element's value, determined by the element type.
109109
*
110-
* @return
110+
* @return string
111111
* The string value if the element is not an item, or $this if it is
112112
* an item.
113113
*/

0 commit comments

Comments
 (0)