mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Merge pull request #8883 from weirdan/unused-messages-duplicates
Fixes https://github.com/vimeo/psalm/issues/8874
This commit is contained in:
commit
ca0b2a1b65
@ -2144,7 +2144,8 @@ class ClassLikes
|
||||
'Cannot find ' . ($has_variable_calls ? 'explicit' : 'any')
|
||||
. ' references to property ' . $property_id
|
||||
. ($has_variable_calls ? ' (but did find some potential references)' : ''),
|
||||
$property_storage->location
|
||||
$property_storage->location,
|
||||
$property_id
|
||||
);
|
||||
|
||||
if ($codebase->alter_code) {
|
||||
@ -2173,7 +2174,8 @@ class ClassLikes
|
||||
'Cannot find ' . ($has_variable_calls ? 'explicit' : 'any')
|
||||
. ' references to private property ' . $property_id
|
||||
. ($has_variable_calls ? ' (but did find some potential references)' : ''),
|
||||
$property_storage->location
|
||||
$property_storage->location,
|
||||
$property_id
|
||||
);
|
||||
|
||||
if ($codebase->alter_code) {
|
||||
|
@ -2,8 +2,21 @@
|
||||
|
||||
namespace Psalm\Issue;
|
||||
|
||||
use Psalm\CodeLocation;
|
||||
|
||||
use function strtolower;
|
||||
|
||||
final class PossiblyUnusedMethod extends MethodIssue
|
||||
{
|
||||
public const ERROR_LEVEL = -2;
|
||||
public const SHORTCODE = 87;
|
||||
|
||||
public function __construct(
|
||||
string $message,
|
||||
CodeLocation $code_location,
|
||||
string $method_id
|
||||
) {
|
||||
parent::__construct($message, $code_location, $method_id);
|
||||
$this->dupe_key = strtolower($method_id);
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,19 @@
|
||||
|
||||
namespace Psalm\Issue;
|
||||
|
||||
final class PossiblyUnusedProperty extends CodeIssue
|
||||
use Psalm\CodeLocation;
|
||||
|
||||
final class PossiblyUnusedProperty extends PropertyIssue
|
||||
{
|
||||
public const ERROR_LEVEL = -2;
|
||||
public const SHORTCODE = 149;
|
||||
|
||||
public function __construct(
|
||||
string $message,
|
||||
CodeLocation $code_location,
|
||||
string $property_id
|
||||
) {
|
||||
parent::__construct($message, $code_location, $property_id);
|
||||
$this->dupe_key = $property_id;
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,21 @@
|
||||
|
||||
namespace Psalm\Issue;
|
||||
|
||||
use Psalm\CodeLocation;
|
||||
|
||||
use function strtolower;
|
||||
|
||||
final class UnusedMethod extends MethodIssue
|
||||
{
|
||||
public const ERROR_LEVEL = -2;
|
||||
public const SHORTCODE = 76;
|
||||
|
||||
public function __construct(
|
||||
string $message,
|
||||
CodeLocation $code_location,
|
||||
string $method_id
|
||||
) {
|
||||
parent::__construct($message, $code_location, $method_id);
|
||||
$this->dupe_key = strtolower($method_id);
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,19 @@
|
||||
|
||||
namespace Psalm\Issue;
|
||||
|
||||
final class UnusedProperty extends CodeIssue
|
||||
use Psalm\CodeLocation;
|
||||
|
||||
final class UnusedProperty extends PropertyIssue
|
||||
{
|
||||
public const ERROR_LEVEL = -2;
|
||||
public const SHORTCODE = 150;
|
||||
|
||||
public function __construct(
|
||||
string $message,
|
||||
CodeLocation $code_location,
|
||||
string $property_id
|
||||
) {
|
||||
parent::__construct($message, $code_location, $property_id);
|
||||
$this->dupe_key = $property_id;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user