You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d2227f8
Browse filesBrowse the repository at this point in the historyBrowse files
if ($scope->isInExpressionAssign($var) || $scope->isUndefinedExpressionAllowed($var)) {
52
+
return [];
53
+
}
54
+
55
+
if ($type->hasOffsetValueType($dimType)->no()) {
56
+
return [
57
+
RuleErrorBuilder::message(sprintf('Offset %s does not exist on %s.', $dimType->describe(VerbosityLevel::value()), $type->describe(VerbosityLevel::value())))->build(),
58
+
];
59
+
}
60
+
61
+
if ($this->reportMaybes) {
62
+
$report = false;
48
63
49
-
if (!$report && $this->reportMaybes) {
50
64
if ($typeinstanceof BenevolentUnionType) {
51
65
$flattenedTypes = [$type];
52
66
} else {
@@ -67,16 +81,17 @@ public function check(
67
81
}
68
82
}
69
83
}
70
-
}
71
84
72
-
if ($report) {
73
-
if ($scope->isInExpressionAssign($var) || $scope->isUndefinedExpressionAllowed($var)) {
74
-
return [];
85
+
if ($report) {
86
+
if ($this->bleedingEdge) {
87
+
return [
88
+
RuleErrorBuilder::message(sprintf('Offset %s might not exist on %s.', $dimType->describe(VerbosityLevel::value()), $type->describe(VerbosityLevel::value())))->build(),
89
+
];
90
+
}
91
+
return [
92
+
RuleErrorBuilder::message(sprintf('Offset %s does not exist on %s.', $dimType->describe(VerbosityLevel::value()), $type->describe(VerbosityLevel::value())))->build(),
93
+
];
75
94
}
76
-
77
-
return [
78
-
RuleErrorBuilder::message(sprintf('Offset %s does not exist on %s.', $dimType->describe(VerbosityLevel::value()), $type->describe(VerbosityLevel::value())))->build(),
$tipText = 'Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.';
$tipText = 'Because the type is coming from a PHPDoc, you can turn off this check by setting <fg=cyan>treatPhpDocTypesAsCertain: false</> in your <fg=cyan>%configurationFile%</>.';
0 commit comments