private function processInlineComments(MethodObject $method, array $stmts) { foreach($stmts as $stmt) { if ($stmt->hasAttribute('comments')) { foreach($stmt->getAttribute('comments') as $comment) { $inline = new InlineComment($comment->getLine(), $comment->getText()); if ($inline->getCount() != 0) { $method->addInlineComment($inline); } } } if ($stmt->stmts) { $this->processInlineComments($method, $stmt->stmts); } } }