From 738f62273e571f16be4c61b91d78f7b8bcf211a3 Mon Sep 17 00:00:00 2001 From: Freek Van der Herten Date: Thu, 12 Jan 2017 20:03:48 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/BaseStream.php | 5 ++--- src/PhirehoseWrapper.php | 7 ++++--- src/PublicStream.php | 4 +--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/BaseStream.php b/src/BaseStream.php index 34b76e6..60cd350 100644 --- a/src/BaseStream.php +++ b/src/BaseStream.php @@ -4,7 +4,7 @@ abstract class BaseStream { - /** @var \Spatie\TwitterStreamingApi\PhirehoseWrapper */ + /** @var \Spatie\TwitterStreamingApi\PhirehoseWrapper */ protected $stream; protected function createStream( @@ -13,8 +13,7 @@ protected function createStream( string $consumerKey, string $consumerSecret, string $filter - ) : PhirehoseWrapper - { + ) : PhirehoseWrapper { return new PhirehoseWrapper( $accessToken, $accessSecret, diff --git a/src/PhirehoseWrapper.php b/src/PhirehoseWrapper.php index ef031ed..8969d18 100644 --- a/src/PhirehoseWrapper.php +++ b/src/PhirehoseWrapper.php @@ -2,8 +2,8 @@ namespace Spatie\TwitterStreamingApi; -use OauthPhirehose; use Phirehose; +use OauthPhirehose; class PhirehoseWrapper extends OauthPhirehose { @@ -17,11 +17,12 @@ public function __construct($accessToken, $accessSecret, $consumerKey, $consumer $this->consumerKey = $consumerKey; $this->consumerSecret = $consumerSecret; - $this->onStreamActivity = function($status) {}; + $this->onStreamActivity = function ($status) { + }; } /** - * Enqueue each status + * Enqueue each status. * * @param string $status */ diff --git a/src/PublicStream.php b/src/PublicStream.php index abb5fa0..c4f2265 100644 --- a/src/PublicStream.php +++ b/src/PublicStream.php @@ -8,8 +8,6 @@ class PublicStream extends BaseStream { public function __construct($accessToken, $accessSecret, $consumerKey, $consumerSecret) { - - $this->stream = $this->createStream( $accessToken, $accessSecret, @@ -27,7 +25,7 @@ public function __construct($accessToken, $accessSecret, $consumerKey, $consumer */ public function whenHears($listenFor, callable $whenHears) { - if (!is_array($listenFor)) { + if (! is_array($listenFor)) { $listenFor = [$listenFor]; }