mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 15:24:05 +02:00
CommentParser: Add var type hint
This commit is contained in:
parent
31e3455c79
commit
804f28ea8a
@ -10,6 +10,7 @@ class CommentParser
|
|||||||
protected $raw;
|
protected $raw;
|
||||||
protected $plain;
|
protected $plain;
|
||||||
protected $title;
|
protected $title;
|
||||||
|
/** @var array $paragraphs */
|
||||||
protected $paragraphs = array();
|
protected $paragraphs = array();
|
||||||
|
|
||||||
public function __construct($raw)
|
public function __construct($raw)
|
||||||
@ -37,6 +38,7 @@ class CommentParser
|
|||||||
$p = null;
|
$p = null;
|
||||||
foreach (preg_split('~\n~', $plain) as $line) {
|
foreach (preg_split('~\n~', $plain) as $line) {
|
||||||
// Strip * at line start
|
// Strip * at line start
|
||||||
|
/** @var string $line */
|
||||||
$line = preg_replace('~^\s*\*\s?~', '', $line);
|
$line = preg_replace('~^\s*\*\s?~', '', $line);
|
||||||
$line = rtrim($line);
|
$line = rtrim($line);
|
||||||
if ($this->title === null) {
|
if ($this->title === null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user