Skip to content

Commit

Permalink
style: cs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Jul 19, 2018
1 parent 7ef550e commit 2efb8d9
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/HtmlUp.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public function __toString()
/**
* Parse markdown.
*
* @param string $markdown
* @param int $indentWidth
* @param string $markdown
* @param int $indentWidth
*
* @return string
*/
Expand Down Expand Up @@ -140,8 +140,8 @@ protected function init()
$this->line = $this->lines[$this->pointer];
$this->trimmedLine = \trim($this->line);

$this->indent = \strlen($this->line) - \strlen(\ltrim($this->line));
$this->nextLine = isset($this->lines[$this->pointer + 1])
$this->indent = \strlen($this->line) - \strlen(\ltrim($this->line));
$this->nextLine = isset($this->lines[$this->pointer + 1])
? $this->lines[$this->pointer + 1]
: '';
$this->trimmedNextLine = \trim($this->nextLine);
Expand Down Expand Up @@ -206,7 +206,7 @@ protected function quote()

$this->stackBlock[] = "\n</blockquote>";

++$this->quoteLevel;
$this->quoteLevel++;
}

return $this->inQuote = \true;
Expand All @@ -233,7 +233,7 @@ protected function setext()

$this->markup .= "\n<h{$level}>{$this->trimmedLine}</h{$level}>";

++$this->pointer;
$this->pointer++;

return \true;
}
Expand All @@ -257,7 +257,7 @@ protected function code()

$this->codeInternal($codeBlock);

++$this->pointer;
$this->pointer++;

$this->markup .= '</code></pre>';

Expand All @@ -276,7 +276,7 @@ public function codeInternal($codeBlock)
$this->markup .= "\n"; // @todo: donot use \n for first line
$this->markup .= $codeBlock ? $this->line : \substr($this->line, $this->indentLen);

++$this->pointer;
$this->pointer++;
} else {
break;
}
Expand All @@ -303,10 +303,10 @@ protected function listt()

if (!$this->inList) {
$this->stackList[] = "</$wrapper>";
$this->markup .= "\n<$wrapper>\n";
$this->markup .= "\n<$wrapper>\n";
$this->inList = \true;

++$this->listLevel;
$this->listLevel++;
}

$this->markup .= '<li>' . \ltrim($this->trimmedLine, '+-*0123456789. ');
Expand All @@ -326,9 +326,9 @@ protected function listInternal()
if ($this->nextIndent > $this->indent) {
$this->stackList[] = "</li>\n";
$this->stackList[] = "</$wrapper>";
$this->markup .= "\n<$wrapper>\n";
$this->markup .= "\n<$wrapper>\n";

++$this->listLevel;
$this->listLevel++;
} else {
$this->markup .= "</li>\n";
}
Expand All @@ -344,7 +344,7 @@ protected function listInternal()
}
}
}
} else {
} else {
$this->markup .= "</li>\n";
}
}
Expand Down Expand Up @@ -388,10 +388,10 @@ protected function tableInternal($headerCount)
$columnCount = \preg_match_all(static::RE_MD_TCOL, \trim($this->trimmedNextLine, '|'));

if ($headerCount > 0 && $headerCount <= $columnCount) {
++$this->pointer;
$this->pointer++;

$this->inTable = \true;
$this->markup .= "<table>\n<thead>\n<tr>\n";
$this->markup .= "<table>\n<thead>\n<tr>\n";
$this->trimmedLine = \trim($this->trimmedLine, '|');

foreach (\explode('|', $this->trimmedLine) as $hdr) {
Expand Down

0 comments on commit 2efb8d9

Please sign in to comment.