mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 09:37:59 +01:00
Improve message
This commit is contained in:
parent
1c14600c03
commit
febec21f34
@ -50,7 +50,7 @@ class CastAnalyzer
|
|||||||
if ($maybe_type->isInt()) {
|
if ($maybe_type->isInt()) {
|
||||||
if ($maybe_type->from_docblock) {
|
if ($maybe_type->from_docblock) {
|
||||||
$issue = new RedundantCastGivenDocblockType(
|
$issue = new RedundantCastGivenDocblockType(
|
||||||
'Redundant cast to ' . $maybe_type->getKey(),
|
'Redundant cast to ' . $maybe_type->getKey() . ' given docblock-provided type',
|
||||||
new CodeLocation($statements_analyzer->getSource(), $stmt)
|
new CodeLocation($statements_analyzer->getSource(), $stmt)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -102,7 +102,7 @@ class CastAnalyzer
|
|||||||
if ($maybe_type->isFloat()) {
|
if ($maybe_type->isFloat()) {
|
||||||
if ($maybe_type->from_docblock) {
|
if ($maybe_type->from_docblock) {
|
||||||
$issue = new RedundantCastGivenDocblockType(
|
$issue = new RedundantCastGivenDocblockType(
|
||||||
'Redundant cast to ' . $maybe_type->getKey(),
|
'Redundant cast to ' . $maybe_type->getKey() . ' given docblock-provided type',
|
||||||
new CodeLocation($statements_analyzer->getSource(), $stmt)
|
new CodeLocation($statements_analyzer->getSource(), $stmt)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -142,7 +142,7 @@ class CastAnalyzer
|
|||||||
if ($maybe_type->isBool()) {
|
if ($maybe_type->isBool()) {
|
||||||
if ($maybe_type->from_docblock) {
|
if ($maybe_type->from_docblock) {
|
||||||
$issue = new RedundantCastGivenDocblockType(
|
$issue = new RedundantCastGivenDocblockType(
|
||||||
'Redundant cast to ' . $maybe_type->getKey(),
|
'Redundant cast to ' . $maybe_type->getKey() . ' given docblock-provided type',
|
||||||
new CodeLocation($statements_analyzer->getSource(), $stmt)
|
new CodeLocation($statements_analyzer->getSource(), $stmt)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -182,7 +182,7 @@ class CastAnalyzer
|
|||||||
if ($stmt_expr_type->isString()) {
|
if ($stmt_expr_type->isString()) {
|
||||||
if ($stmt_expr_type->from_docblock) {
|
if ($stmt_expr_type->from_docblock) {
|
||||||
$issue = new RedundantCastGivenDocblockType(
|
$issue = new RedundantCastGivenDocblockType(
|
||||||
'Redundant cast to ' . $stmt_expr_type->getKey(),
|
'Redundant cast to ' . $stmt_expr_type->getKey() . ' given docblock-provided type',
|
||||||
new CodeLocation($statements_analyzer->getSource(), $stmt)
|
new CodeLocation($statements_analyzer->getSource(), $stmt)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -251,7 +251,7 @@ class CastAnalyzer
|
|||||||
if ($stmt_expr_type->isArray()) {
|
if ($stmt_expr_type->isArray()) {
|
||||||
if ($stmt_expr_type->from_docblock) {
|
if ($stmt_expr_type->from_docblock) {
|
||||||
$issue = new RedundantCastGivenDocblockType(
|
$issue = new RedundantCastGivenDocblockType(
|
||||||
'Redundant cast to ' . $stmt_expr_type->getKey(),
|
'Redundant cast to ' . $stmt_expr_type->getKey() . ' given docblock-provided type',
|
||||||
new CodeLocation($statements_analyzer->getSource(), $stmt)
|
new CodeLocation($statements_analyzer->getSource(), $stmt)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user