Skip to content

Commit 294da8d

Browse files
committed
More guard conditions.
1 parent 99f196b commit 294da8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

visitor.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ private function getAdditionFromParam(Param $tag): ?string
104104
$tagVariableName = $tag->getVariableName();
105105
$tagVariableType = $tag->getType();
106106

107-
// Skip if the parameter variable name or type are missing.
108-
if (!$tagVariableName || !$tagVariableType) {
107+
// Skip if information we need is missing.
108+
if (!$tagDescription || !$tagVariableName || !$tagVariableType) {
109109
return null;
110110
}
111111

@@ -138,8 +138,8 @@ private function getAdditionFromReturn(Return_ $tag): ?string
138138
$tagDescription = $tag->getDescription();
139139
$tagVariableType = $tag->getType();
140140

141-
// Skip if the return type is missing.
142-
if (!$tagVariableType) {
141+
// Skip if information we need is missing.
142+
if (!$tagDescription || !$tagVariableType) {
143143
return null;
144144
}
145145

0 commit comments

Comments
 (0)