mirror of
https://github.com/danog/psalm-plugin-phpunit.git
synced 2024-11-26 12:04:52 +01:00
Merge pull request #99 from weirdan/suppress-redundant-casts
Suppressed redundant casts emitted by newest Psalm
This commit is contained in:
commit
f5147be764
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user