/** * If the class definitions begins, all previous parsed lines * are added as preceding block * so we keep all includes, definition and other stuff * @return void */ protected function onClassDefinitionFound() { $classPreComment = ''; foreach (array_values($this->lines) as $line) { if (strlen(trim($line)) > 0) { $classPreComment .= $line; } } $this->classObject->setPrecedingBlock($classPreComment); }