Merge pull request #99 from weirdan/suppress-redundant-casts

Suppressed redundant casts emitted by newest Psalm
This commit is contained in:
Matthew Brown 2020-12-08 17:25:25 -05:00 committed by GitHub
commit f5147be764
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 10 deletions

View File

@ -183,11 +183,7 @@ class TestCaseHandler implements
}
$apparent_provider_method_name = $fq_class_name . '::' . $method_id;
} else {
/**
* @psalm-suppress RedundantConditionGivenDocblockType
* @psalm-suppress RedundantCastGivenDocblockType
*/
$apparent_provider_method_name = $class_storage->name . '::' . (string) $provider;
$apparent_provider_method_name = $class_storage->name . '::' . $provider;
}
$apparent_provider_method_name = preg_replace('/\(\s*\)$/', '', $apparent_provider_method_name);
@ -594,11 +590,7 @@ class TestCaseHandler implements
{
if (method_exists($docblock, 'getStartLine')) {
//typecasting is done on purpose, compatability with psalm old versions
/**
* @psalm-suppress RedundantCondition
* @psalm-suppress RedundantCast
*/
return (int) $docblock->getStartLine();
return $docblock->getStartLine();
}
/** @psalm-suppress DeprecatedMethod */
return $docblock->getLine();

View File

@ -11,6 +11,7 @@ abstract class VersionUtils
public static function packageVersionIs(string $package, string $op, string $ref): bool
{
/**
* @psalm-suppress RedundantCondition
* @psalm-suppress DeprecatedClass
* @psalm-suppress ArgumentTypeCoercion
* @psalm-suppress RedundantCast