diff --git a/composer.json b/composer.json index f558f158c..56a0fa19a 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,7 @@ "ext-json": "*", "ext-libxml": "*", "ext-tokenizer": "*", + "ext-mbstring": "*", "amphp/amp": "^2.1", "amphp/byte-stream": "^1.5", "composer/package-versions-deprecated": "^1.8.0", diff --git a/src/Psalm/Internal/Analyzer/Statements/Block/IfAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Block/IfAnalyzer.php index 87398b88c..d677b5b03 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Block/IfAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Block/IfAnalyzer.php @@ -703,7 +703,7 @@ class IfAnalyzer new DocblockTypeContradiction( 'if (false) is impossible', new CodeLocation($statements_analyzer, $cond), - 'false falsy', + 'false falsy' ), $statements_analyzer->getSuppressedIssues() )) { @@ -714,7 +714,7 @@ class IfAnalyzer new TypeDoesNotContainType( 'if (false) is impossible', new CodeLocation($statements_analyzer, $cond), - 'false falsy', + 'false falsy' ), $statements_analyzer->getSuppressedIssues() )) { @@ -727,7 +727,7 @@ class IfAnalyzer new RedundantConditionGivenDocblockType( 'if (true) is redundant', new CodeLocation($statements_analyzer, $cond), - 'true falsy', + 'true falsy' ), $statements_analyzer->getSuppressedIssues() )) { @@ -738,7 +738,7 @@ class IfAnalyzer new RedundantCondition( 'if (true) is redundant', new CodeLocation($statements_analyzer, $cond), - 'true falsy', + 'true falsy' ), $statements_analyzer->getSuppressedIssues() )) { diff --git a/tests/StubTest.php b/tests/StubTest.php index 49c10b808..48a94cd01 100644 --- a/tests/StubTest.php +++ b/tests/StubTest.php @@ -48,7 +48,7 @@ class StubTest extends TestCase new Provider\FakeParserCacheProvider() ) ); - $project_analyzer->setPhpVersion('7.3'); + $project_analyzer->setPhpVersion('7.4'); $config->setIncludeCollector(new IncludeCollector()); $config->visitComposerAutoloadFiles($project_analyzer, null); @@ -1134,13 +1134,13 @@ class StubTest extends TestCase ) ); - $this->project_analyzer->setPhpVersion('7.4'); - $file_path = getcwd() . '/src/somefile.php'; $this->addFile( $file_path, - 'expectException(\Psalm\Exception\InvalidClasslikeOverrideException::class); @@ -1165,13 +1165,13 @@ class StubTest extends TestCase ) ); - $this->project_analyzer->setPhpVersion('7.4'); - $file_path = getcwd() . '/src/somefile.php'; $this->addFile( $file_path, - 'expectException(\Psalm\Exception\InvalidMethodOverrideException::class);