CommentParser: Wrap descriptions after the available screen columns
Well, what should I say, the PHP code sniffer allows us up to 120 characters line length and when you code/format based on these rules, e.g the description of a cli command, it will mess everything up when you run `icingacli module --help`. So, we can just wrap the output after the available screen columns.
This commit is contained in:
parent
bb4b53e90c
commit
8cb0976c5b
|
@ -3,6 +3,8 @@
|
|||
|
||||
namespace Icinga\Cli\Documentation;
|
||||
|
||||
use Icinga\Cli\Screen;
|
||||
|
||||
class CommentParser
|
||||
{
|
||||
protected $raw;
|
||||
|
@ -75,7 +77,7 @@ class CommentParser
|
|||
}
|
||||
|
||||
foreach ($this->paragraphs as $p) {
|
||||
$res .= wordwrap($p, 72) . "\n\n";
|
||||
$res .= wordwrap($p, Screen::instance()->getColumns()) . "\n\n";
|
||||
}
|
||||
|
||||
return $res;
|
||||
|
|
Loading…
Reference in New Issue