From 9f3f7bb9468e7fe0faaa036a48d0a2f307adfda2 Mon Sep 17 00:00:00 2001 From: Brown Date: Thu, 14 May 2020 23:44:22 -0400 Subject: [PATCH] Consolidate ThreadData types --- src/Psalm/Internal/Codebase/Scanner.php | 48 ++++++++----------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/src/Psalm/Internal/Codebase/Scanner.php b/src/Psalm/Internal/Codebase/Scanner.php index ca3af9ada..9c4529cec 100644 --- a/src/Psalm/Internal/Codebase/Scanner.php +++ b/src/Psalm/Internal/Codebase/Scanner.php @@ -25,6 +25,18 @@ use function strtolower; use function substr; /** + * @psalm-type ThreadData = array{ + * 0: array, + * 1: array, + * 2: array, + * 3: array, + * 4: array, + * 5: array, + * 6: array, + * 7: array, + * 8: array + * } + * * @psalm-type PoolData = array{ * classlikes_data:array{ * 0:array, @@ -35,17 +47,7 @@ use function substr; * 5:array, * 6:array * }, - * scanner_data:array{ - * 0:array, - * 1:array, - * 2:array, - * 3:array, - * 4:array, - * 5:array, - * 6:array, - * 7:array, - * 8:array - * }, + * scanner_data: ThreadData, * issues:array>, * changed_members:array>, * unchanged_signature_members:array>, @@ -761,17 +763,7 @@ class Scanner } /** - * @return array{ - * 0: array, - * 1: array, - * 2: array, - * 3: array, - * 4: array, - * 5: array, - * 6: array, - * 7: array, - * 8: array - * } + * @return ThreadData */ public function getThreadData() { @@ -789,17 +781,7 @@ class Scanner } /** - * @param array{ - * 0: array, - * 1: array, - * 2: array, - * 3: array, - * 4: array, - * 5: array, - * 6: array, - * 7: array, - * 8: array - * } $thread_data + * @param ThreadData $thread_data * * @return void */