File tree Expand file tree Collapse file tree 7 files changed +21
-19
lines changed Expand file tree Collapse file tree 7 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class Article extends Api
14
14
15
15
/**
16
16
* @see Swader\Diffbot\Entity\Article::getSentiment()
17
- * @param $bool
17
+ * @param bool|mixed $bool
18
18
* @return $this
19
19
*/
20
20
public function setSentiment ($ bool )
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ public function setUrlCrawlPatterns(array $pattern = null)
137
137
* The use of a urlCrawlRegEx will allow Crawlbot to spider outside of the
138
138
* seed domain; it will follow all matching URLs regardless of domain.
139
139
*
140
- * @param $regex
140
+ * @param string $regex
141
141
* @return $this
142
142
*/
143
143
public function setUrlCrawlRegEx ($ regex )
@@ -172,7 +172,7 @@ public function setUrlProcessPatterns(array $pattern = null)
172
172
* Specify a regular expression to limit pages processed to those URLs that
173
173
* match your expression. This will override any urlProcessPattern value.
174
174
*
175
- * @param $regex
175
+ * @param string $regex
176
176
* @return $this
177
177
*/
178
178
public function setUrlProcessRegEx ($ regex )
@@ -262,7 +262,7 @@ public function setMaxToProcess($input = 100000)
262
262
* X-Crawl-Status in the headers, and the full JSON response in the
263
263
* POST body.
264
264
*
265
- * @param $string
265
+ * @param string $string
266
266
* @return $this
267
267
* @throws InvalidArgumentException
268
268
*/
@@ -309,11 +309,12 @@ public function setCrawlDelay($input = 0.25)
309
309
*
310
310
* @param int|float $input
311
311
* @return $this
312
+ * @throws \InvalidArgumentException
312
313
*/
313
314
public function setRepeat ($ input )
314
315
{
315
316
if (!is_numeric ($ input ) || !$ input ) {
316
- throw new InvalidArgumentException ('Only positive numbers allowed. ' );
317
+ throw new \ InvalidArgumentException ('Only positive numbers allowed. ' );
317
318
}
318
319
$ this ->otherOptions ['repeat ' ] = (float )$ input ;
319
320
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public function setMaxPages($max = 1)
32
32
33
33
/**
34
34
* @see Swader\Diffbot\Entity\Discussion::getSentiment()
35
- * @param $bool
35
+ * @param bool|mixed $bool
36
36
* @return $this
37
37
*/
38
38
public function setSentiment ($ bool )
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class Image extends Api
15
15
/**
16
16
* Tells the API call to return the mentions field
17
17
* @see https://www.diffbot.com/dev/docs/image/
18
- * @param $bool
18
+ * @param bool|mixed $bool
19
19
* @return $this
20
20
*/
21
21
public function setMentions ($ bool )
@@ -27,7 +27,7 @@ public function setMentions($bool)
27
27
/**
28
28
* Sets the API call to return the faces field
29
29
* @see https://www.diffbot.com/dev/docs/image/
30
- * @param $bool
30
+ * @param bool|mixed $bool
31
31
* @return $this
32
32
*/
33
33
public function setFaces ($ bool )
@@ -39,7 +39,7 @@ public function setFaces($bool)
39
39
/**
40
40
* Sets the API call to return the ocr field.
41
41
* @see https://www.diffbot.com/dev/docs/image/
42
- * @param $bool
42
+ * @param bool|mixed $bool
43
43
* @return $this
44
44
*/
45
45
public function setOcr ($ bool )
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public function setDiscussion($bool = true)
27
27
28
28
/**
29
29
* @see Swader\Diffbot\Entity\Product::getColors()
30
- * @param $bool
30
+ * @param bool|mixed $bool
31
31
* @return $this
32
32
*/
33
33
public function setColors ($ bool )
@@ -39,7 +39,7 @@ public function setColors($bool)
39
39
40
40
/**
41
41
* @see Swader\Diffbot\Entity\Product::getSize()
42
- * @param $bool
42
+ * @param bool|mixed $bool
43
43
* @return $this
44
44
*/
45
45
public function setSize ($ bool )
@@ -51,7 +51,7 @@ public function setSize($bool)
51
51
52
52
/**
53
53
* @see Swader\Diffbot\Entity\Product::isAvailable()
54
- * @param $bool
54
+ * @param bool|mixed $bool
55
55
* @return $this
56
56
*/
57
57
public function setAvailability ($ bool )
Original file line number Diff line number Diff line change 5
5
use Swader \Diffbot \Abstracts \Api ;
6
6
use Swader \Diffbot \Entity \SearchInfo ;
7
7
use Swader \Diffbot \Traits \DiffbotAware ;
8
+ use Swader \Diffbot \Entity \EntityIterator ;
8
9
9
10
/**
10
11
* Class Search
@@ -32,7 +33,7 @@ class Search extends Api
32
33
/**
33
34
* Search query.
34
35
* @see https://www.diffbot.com/dev/docs/search/#query
35
- * @param string $q
36
+ * @param string string $q
36
37
*/
37
38
public function __construct ($ q )
38
39
{
@@ -129,7 +130,7 @@ public function buildUrl()
129
130
*
130
131
* @todo: remove error avoidance when issue 12 is fixed: https://github.com/Swader/diffbot-php-client/issues/12
131
132
* @param bool $info
132
- * @return \Swader\Diffbot\Entity\ EntityIterator|SearchInfo
133
+ * @return EntityIterator|SearchInfo
133
134
*/
134
135
public function call ($ info = false )
135
136
{
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ trait StandardApi {
11
11
12
12
/**
13
13
* Makes the API call return the links field, common to all standard API types
14
- * @param $bool
14
+ * @param bool|mixed $bool
15
15
* @return $this
16
16
*/
17
17
public function setLinks ($ bool )
@@ -22,7 +22,7 @@ public function setLinks($bool)
22
22
23
23
/**
24
24
* Makes the API call return the meta field, common to all standard API types
25
- * @param $bool
25
+ * @param bool|mixed $bool
26
26
* @return $this
27
27
*/
28
28
public function setMeta ($ bool )
@@ -33,7 +33,7 @@ public function setMeta($bool)
33
33
34
34
/**
35
35
* Makes the API call return the querystring field, common to all standard API types
36
- * @param $bool
36
+ * @param bool|mixed $bool
37
37
* @return $this
38
38
*/
39
39
public function setQuerystring ($ bool )
@@ -44,12 +44,12 @@ public function setQuerystring($bool)
44
44
45
45
/**
46
46
* Makes the API call return the breadcrumb field, common to all standard API types
47
- * @param $bool
47
+ * @param bool|mixed $bool
48
48
* @return $this
49
49
*/
50
50
public function setBreadcrumb ($ bool )
51
51
{
52
52
$ this ->fieldSettings ['breadcrumb ' ] = (bool )$ bool ;
53
53
return $ this ;
54
54
}
55
- }
55
+ }
You can’t perform that action at this time.
0 commit comments