Skip to content

Commit b9f38f5

Browse files
committed
add typehints
1 parent 585fdf3 commit b9f38f5

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

src/BaseStream.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ protected function createStream(
2323
);
2424
}
2525

26-
public static function create($accessToken, $accessSecret, $consumerKey, $consumerSecret)
26+
public static function create(
27+
string $accessToken,
28+
string $accessSecret,
29+
string $consumerKey,
30+
string $consumerSecret)
2731
{
2832
return new static(...func_get_args());
2933
}

src/PhirehoseWrapper.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ class PhirehoseWrapper extends OauthPhirehose
1010
/** @var callable */
1111
protected $onStreamActivity;
1212

13+
/**
14+
* @param string $accessToken
15+
* @param string $accessSecret
16+
* @param string $consumerKey
17+
* @param string $consumerSecret
18+
*
19+
* @param string $method
20+
*/
1321
public function __construct($accessToken, $accessSecret, $consumerKey, $consumerSecret, $method = Phirehose::METHOD_FILTER)
1422
{
1523
parent::__construct($accessToken, $accessSecret, $method);
@@ -25,6 +33,9 @@ public function __construct($accessToken, $accessSecret, $consumerKey, $consumer
2533
};
2634
}
2735

36+
/**
37+
* @param mixed $status
38+
*/
2839
public function enqueueStatus($status)
2940
{
3041
($this->onStreamActivity)(json_decode($status, true));

src/PublicStream.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66

77
class PublicStream extends BaseStream
88
{
9-
public function __construct($accessToken, $accessSecret, $consumerKey, $consumerSecret)
9+
public function __construct(
10+
string $accessToken,
11+
string $accessSecret,
12+
string $consumerKey,
13+
string $consumerSecret
14+
)
1015
{
1116
$this->stream = $this->createStream(
1217
$accessToken,

src/UserStream.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66

77
class UserStream extends BaseStream
88
{
9-
public function __construct($accessToken, $accessSecret, $consumerKey, $consumerSecret)
9+
public function __construct(
10+
string $accessToken,
11+
string $accessSecret,
12+
string $consumerKey,
13+
string $consumerSecret
14+
)
1015
{
1116
$this->stream = $this->createStream(
1217
$accessToken,

0 commit comments

Comments
 (0)