Skip to content

Commit

Permalink
fix relationship detection when the datetime property immediatelly en…
Browse files Browse the repository at this point in the history
…ds with newline
  • Loading branch information
hrach committed Mar 23, 2024
1 parent 00735a8 commit 3c1c702
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public function hasProperty(ClassReflection $classReflection, string $propertyNa
return false;
}

$hasRelationship = preg_match('#\$' . $propertyName . '\s(?:[^\n]*)\{[1m]:1.+\}.*$#m', $phpDoc) === 1;
$regexp = '#\$' . preg_quote($propertyName, '#') . '[^\n]+\{[1m]:1.+}.*$#m';
$hasRelationship = preg_match($regexp, $phpDoc) === 1;
return $hasRelationship;
}

Expand Down

0 comments on commit 3c1c702

Please sign in to comment.