Skip to content
Permalink
Browse files

Fix issues found by Psalm

  • Loading branch information...
muglug committed Jun 30, 2019
1 parent 6b7788b commit 9ab316167597fa1f7626607bbe1edb578d3d70c7
@@ -624,8 +624,9 @@ public function getFirstStatementOffset() : int
return $this->first_statement_offset;
}
public function clearSourceBeforeDestruction()
public function clearSourceBeforeDestruction() : void
{
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
$this->source = null;
}
}
@@ -17,7 +17,8 @@ abstract class SourceAnalyzer implements StatementsSource
*/
protected $source;
public function __destruct() {
public function __destruct()
{
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
$this->source = null;
}
@@ -256,6 +256,7 @@ private static function handleCase(
if ($case->cond) {
if (ExpressionAnalyzer::analyze($statements_analyzer, $case->cond, $case_context) === false) {
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
$case_scope->parent_context = null;
$case_context->case_scope = null;
$case_context->parent_context = null;
@@ -367,6 +368,7 @@ private static function handleCase(
$switch_scope->leftover_statements = [$case_if_stmt];
}
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
$case_scope->parent_context = null;
$case_context->case_scope = null;
$case_context->parent_context = null;
@@ -530,6 +532,7 @@ private static function handleCase(
$switch_scope,
$case_scope
) === false) {
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
$case_scope->parent_context = null;
$case_context->case_scope = null;
$case_context->parent_context = null;
@@ -591,6 +594,7 @@ private static function handleCase(
}
}
/** @psalm-suppress PossiblyNullPropertyAssignmentValue */
$case_scope->parent_context = null;
$case_context->case_scope = null;
$case_context->parent_context = null;

0 comments on commit 9ab3161

Please sign in to comment.
You can’t perform that action at this time.