
| Current Path : /var/www/html/store1/vendor/consolidation/annotated-command/src/Parser/Internal/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store1/vendor/consolidation/annotated-command/src/Parser/Internal/DocBlockUtils.php |
<?php
namespace Consolidation\AnnotatedCommand\Parser\Internal;
/**
* Simple utility methods when working with docblock comments.
*/
class DocBlockUtils
{
public static function stripLeadingCommentCharacters($doc)
{
// Remove the leading /** and the trailing */
$doc = preg_replace('#^\s*/\*+\s*#', '', $doc);
$doc = preg_replace('#\s*\*+/\s*#', '', $doc);
$doc = preg_replace('#^[ \t]*\** ?#m', '', $doc);
return $doc;
}
public static function nextLineIsNotEmpty($lines)
{
if (empty($lines)) {
return false;
}
$nextLine = trim($lines[0]);
return !empty($nextLine);
}
}