From 25ff1d668c182469d597a61fd34e80ac78095388 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Thu, 3 Sep 2020 21:10:00 -0400 Subject: [PATCH 1/7] Fix docblocks in App Frankly, I don't understand why the typing was removed from these methods in https://github.com/beyondcode/laravel-websockets/pull/471, seems like a strange decision. --- src/Apps/App.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Apps/App.php b/src/Apps/App.php index ae23f4d..fa3d4af 100644 --- a/src/Apps/App.php +++ b/src/Apps/App.php @@ -39,7 +39,7 @@ class App /** * Find the app by id. * - * @param mixed $appId + * @param int $appId * @return \BeyondCode\LaravelWebSockets\Apps\App|null */ public static function findById($appId) @@ -50,7 +50,7 @@ class App /** * Find the app by app key. * - * @param mixed $appId + * @param string $appKey * @return \BeyondCode\LaravelWebSockets\Apps\App|null */ public static function findByKey($appKey): ?self @@ -61,7 +61,7 @@ class App /** * Find the app by app secret. * - * @param mixed $appId + * @param string $appSecret * @return \BeyondCode\LaravelWebSockets\Apps\App|null */ public static function findBySecret($appSecret): ?self @@ -72,9 +72,9 @@ class App /** * Initialize the Web Socket app instance. * - * @param mixed $appId - * @param mixed $key - * @param mixed $secret + * @param int $appId + * @param string $key + * @param string $secret * @return void * @throws \BeyondCode\LaravelWebSockets\Exceptions\InvalidApp */ From 349fb54ae654059a58723ad599be2fe1466988d9 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Thu, 3 Sep 2020 21:10:50 -0400 Subject: [PATCH 2/7] Update AppManager.php --- src/Apps/AppManager.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Apps/AppManager.php b/src/Apps/AppManager.php index 03c0c9e..2b7b283 100644 --- a/src/Apps/AppManager.php +++ b/src/Apps/AppManager.php @@ -14,7 +14,7 @@ interface AppManager /** * Get app by id. * - * @param mixed $appId + * @param int $appId * @return \BeyondCode\LaravelWebSockets\Apps\App|null */ public function findById($appId): ?App; @@ -22,7 +22,7 @@ interface AppManager /** * Get app by app key. * - * @param mixed $appKey + * @param string $appKey * @return \BeyondCode\LaravelWebSockets\Apps\App|null */ public function findByKey($appKey): ?App; @@ -30,7 +30,7 @@ interface AppManager /** * Get app by secret. * - * @param mixed $appSecret + * @param string $appSecret * @return \BeyondCode\LaravelWebSockets\Apps\App|null */ public function findBySecret($appSecret): ?App; From 1389b6ca0a87663c869cfd84ef81b9a33f116689 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Thu, 3 Sep 2020 21:11:45 -0400 Subject: [PATCH 3/7] Update ConfigAppManager.php --- src/Apps/ConfigAppManager.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Apps/ConfigAppManager.php b/src/Apps/ConfigAppManager.php index 3136ad6..6d8513e 100644 --- a/src/Apps/ConfigAppManager.php +++ b/src/Apps/ConfigAppManager.php @@ -38,7 +38,7 @@ class ConfigAppManager implements AppManager /** * Get app by id. * - * @param mixed $appId + * @param int $appId * @return \BeyondCode\LaravelWebSockets\Apps\App|null */ public function findById($appId): ?App @@ -53,7 +53,7 @@ class ConfigAppManager implements AppManager /** * Get app by app key. * - * @param mixed $appKey + * @param string $appKey * @return \BeyondCode\LaravelWebSockets\Apps\App|null */ public function findByKey($appKey): ?App @@ -68,7 +68,7 @@ class ConfigAppManager implements AppManager /** * Get app by secret. * - * @param mixed $appSecret + * @param string $appSecret * @return \BeyondCode\LaravelWebSockets\Apps\App|null */ public function findBySecret($appSecret): ?App From c51a9806cb4d33139398abc6db9e15f1dda647c0 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Fri, 4 Sep 2020 09:23:03 -0400 Subject: [PATCH 4/7] Update App.php --- src/Apps/App.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Apps/App.php b/src/Apps/App.php index fa3d4af..4dd8b10 100644 --- a/src/Apps/App.php +++ b/src/Apps/App.php @@ -6,7 +6,7 @@ use BeyondCode\LaravelWebSockets\Exceptions\InvalidApp; class App { - /** @var int */ + /** @var string|int */ public $id; /** @var string */ @@ -39,7 +39,7 @@ class App /** * Find the app by id. * - * @param int $appId + * @param string|int $appId * @return \BeyondCode\LaravelWebSockets\Apps\App|null */ public static function findById($appId) @@ -72,9 +72,9 @@ class App /** * Initialize the Web Socket app instance. * - * @param int $appId - * @param string $key - * @param string $secret + * @param string|int $appId + * @param string $key + * @param string $secret * @return void * @throws \BeyondCode\LaravelWebSockets\Exceptions\InvalidApp */ From 5cb398f6727e15fd7218c2aa812d518e56fe782d Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Fri, 4 Sep 2020 09:23:24 -0400 Subject: [PATCH 5/7] Update AppManager.php --- src/Apps/AppManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Apps/AppManager.php b/src/Apps/AppManager.php index 2b7b283..86497c0 100644 --- a/src/Apps/AppManager.php +++ b/src/Apps/AppManager.php @@ -14,7 +14,7 @@ interface AppManager /** * Get app by id. * - * @param int $appId + * @param string|int $appId * @return \BeyondCode\LaravelWebSockets\Apps\App|null */ public function findById($appId): ?App; From f2a30bcb6f8f3e26e6b14bd9f1872132183c8719 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Fri, 4 Sep 2020 09:23:43 -0400 Subject: [PATCH 6/7] Update ConfigAppManager.php --- src/Apps/ConfigAppManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Apps/ConfigAppManager.php b/src/Apps/ConfigAppManager.php index 6d8513e..03e5458 100644 --- a/src/Apps/ConfigAppManager.php +++ b/src/Apps/ConfigAppManager.php @@ -38,7 +38,7 @@ class ConfigAppManager implements AppManager /** * Get app by id. * - * @param int $appId + * @param string|int $appId * @return \BeyondCode\LaravelWebSockets\Apps\App|null */ public function findById($appId): ?App From a391f5afb2ff640d44205fd86f7edf01dd4d53d4 Mon Sep 17 00:00:00 2001 From: rennokki Date: Fri, 4 Sep 2020 16:53:42 +0300 Subject: [PATCH 7/7] formatting --- src/Apps/App.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Apps/App.php b/src/Apps/App.php index 4dd8b10..acb2150 100644 --- a/src/Apps/App.php +++ b/src/Apps/App.php @@ -73,8 +73,8 @@ class App * Initialize the Web Socket app instance. * * @param string|int $appId - * @param string $key - * @param string $secret + * @param string $key + * @param string $secret * @return void * @throws \BeyondCode\LaravelWebSockets\Exceptions\InvalidApp */