From 5905171b79746425ea57331f9e484d1c55927616 Mon Sep 17 00:00:00 2001 From: Brown Date: Mon, 31 Aug 2020 16:40:16 -0400 Subject: [PATCH] Fix api --- src/Psalm/Internal/Analyzer/ClassLikeAnalyzer.php | 3 ++- .../Internal/Provider/PropertyVisibilityProvider.php | 12 ++++++------ .../Hook/PropertyVisibilityProviderInterface.php | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Psalm/Internal/Analyzer/ClassLikeAnalyzer.php b/src/Psalm/Internal/Analyzer/ClassLikeAnalyzer.php index 065813239..4b1752ce5 100644 --- a/src/Psalm/Internal/Analyzer/ClassLikeAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/ClassLikeAnalyzer.php @@ -566,7 +566,8 @@ abstract class ClassLikeAnalyzer extends SourceAnalyzer implements StatementsSou $fq_class_name, $property_name, true, - $context + $context, + $code_location ); if ($property_visible !== null) { diff --git a/src/Psalm/Internal/Provider/PropertyVisibilityProvider.php b/src/Psalm/Internal/Provider/PropertyVisibilityProvider.php index eabaee516..604bacb87 100644 --- a/src/Psalm/Internal/Provider/PropertyVisibilityProvider.php +++ b/src/Psalm/Internal/Provider/PropertyVisibilityProvider.php @@ -18,8 +18,8 @@ class PropertyVisibilityProvider * string, * string, * bool, - * ?Context=, - * ?CodeLocation= + * Context, + * CodeLocation * ) : ?bool> * > */ @@ -51,8 +51,8 @@ class PropertyVisibilityProvider * string, * string, * bool, - * ?Context=, - * ?CodeLocation= + * Context, + * CodeLocation * ) : ?bool $c * * @return void @@ -77,8 +77,8 @@ class PropertyVisibilityProvider string $fq_classlike_name, string $property_name, bool $read_mode, - Context $context = null, - CodeLocation $code_location = null + Context $context, + CodeLocation $code_location ) { foreach (self::$handlers[strtolower($fq_classlike_name)] as $property_handler) { $property_visible = $property_handler( diff --git a/src/Psalm/Plugin/Hook/PropertyVisibilityProviderInterface.php b/src/Psalm/Plugin/Hook/PropertyVisibilityProviderInterface.php index 3bc543b0b..0957695f2 100644 --- a/src/Psalm/Plugin/Hook/PropertyVisibilityProviderInterface.php +++ b/src/Psalm/Plugin/Hook/PropertyVisibilityProviderInterface.php @@ -20,7 +20,7 @@ interface PropertyVisibilityProviderInterface string $fq_classlike_name, string $property_name, bool $read_mode, - ?Context $context = null, - ?CodeLocation $code_location = null + Context $context, + CodeLocation $code_location ); }