diff --git a/src/Context.php b/src/Context.php index 9eaa82f1a..698ad817b 100644 --- a/src/Context.php +++ b/src/Context.php @@ -209,7 +209,7 @@ public function phpdocDescription() */ public function phpdocContent() { - $comment = preg_split('/(\n|\r\n)/', $this->comment); + $comment = preg_split('/(\n|\r\n)/', (string) $this->comment); $comment[0] = preg_replace('/[ \t]*\\/\*\*/', '', $comment[0]); // strip '/**' $i = count($comment) -1; $comment[$i] = preg_replace('/\*\/[ \t]*$/', '', $comment[$i]); // strip '*/' diff --git a/src/Processors/AugmentProperties.php b/src/Processors/AugmentProperties.php index 695bddc86..2a92ca53b 100644 --- a/src/Processors/AugmentProperties.php +++ b/src/Processors/AugmentProperties.php @@ -58,7 +58,7 @@ public function __invoke(Analysis $analysis) $property->property = $context->property; } - if (preg_match('/@var\s+(?[^\s]+)([ \t])?(?.+)?$/im', $context->comment, $varMatches)) { + if (preg_match('/@var\s+(?[^\s]+)([ \t])?(?.+)?$/im', (string) $context->comment, $varMatches)) { if ($property->description === null && isset($varMatches['description'])) { $property->description = trim($varMatches['description']); }