1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Fix various things

This commit is contained in:
Brown 2020-09-13 22:39:03 -04:00 committed by Daniil Gentili
parent d53a9313a5
commit e9fb3dcad2
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
3 changed files with 12 additions and 11 deletions

View File

@ -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",

View File

@ -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()
)) {

View File

@ -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,
'<?php'
'<?php
echo "hello";'
);
$this->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,
'<?php'
'<?php
echo "hello";'
);
$this->expectException(\Psalm\Exception\InvalidMethodOverrideException::class);