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
if (empty($tokens[$stackPtr]['scope_opener']) || empty($tokens[$stackPtr]['scope_closer'])) {
77
-
if (!$docBlockReturnIndex && !$hasInheritDoc) {
78
+
if (!$docBlockReturnIndex && !$hasInheritDoc && !$hasReturnType) {
78
79
$phpcsFile->addError('Method does not have a return statement in doc block: ' . $tokens[$nextIndex]['content'], $nextIndex, 'ReturnMissingInInterface');
79
80
}
80
81
81
82
return;
82
83
}
83
84
84
85
// If inheritDoc is present assume the parent contains it
85
-
if (!$docBlockReturnIndex && $hasInheritDoc) {
86
+
if (!$docBlockReturnIndex && ($hasInheritDoc || $this->hasReturnType($phpcsFile, $stackPtr))) {
86
87
return;
87
88
}
88
89
@@ -378,4 +379,30 @@ protected function documentedReturnType(array $tokens, int $docBlockReturnIndex)
0 commit comments