Skip to content

Commit 3e96ceb

Browse files
authored
Update PhpFunctionsScanner.php
1 parent c2d0496 commit 3e96ceb

1 file changed

Lines changed: 12 additions & 15 deletions

File tree

src/Utils/PhpFunctionsScanner.php

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -150,21 +150,18 @@ protected function parsePhpComment($value)
150150
$value = substr($value, 2, -2);
151151
}
152152
$value = trim($value);
153-
if (
154-
$value !== ''
155-
&& (
156-
$this->extractComments === ''
157-
|| (
158-
!is_array($this->extractComments)
159-
&& strpos($value, $this->extractComments) === 0
160-
)
161-
|| (
162-
is_array($this->extractComments)
163-
&& in_array($value, $this->extractComments)
164-
)
165-
)
166-
) {
167-
$result = $value;
153+
if ($value !== '') {
154+
if ($this->extractComments === '' || strpos($value, $this->extractComments) === 0) {
155+
$result = $value;
156+
}
157+
elseif (is_array($this->extractComments)) {
158+
foreach ($this->extractComments as $string) {
159+
if (strpos($value, $string) === 0) {
160+
$result = $value;
161+
break;
162+
}
163+
}
164+
}
168165
}
169166
}
170167
return $result;

0 commit comments

Comments
 (0)