diff options
Diffstat (limited to 'inc/Parsing/Handler/Quote.php')
-rw-r--r-- | inc/Parsing/Handler/Quote.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/inc/Parsing/Handler/Quote.php b/inc/Parsing/Handler/Quote.php index 74861b1b2..caa04cc02 100644 --- a/inc/Parsing/Handler/Quote.php +++ b/inc/Parsing/Handler/Quote.php @@ -4,13 +4,13 @@ namespace dokuwiki\Parsing\Handler; class Quote extends AbstractRewriter { - protected $quoteCalls = array(); + protected $quoteCalls = []; /** @inheritdoc */ public function finalise() { $last_call = end($this->calls); - $this->writeCall(array('quote_end',array(), $last_call[2])); + $this->writeCall(['quote_end', [], $last_call[2]]); $this->process(); $this->callWriter->finalise(); @@ -28,7 +28,7 @@ class Quote extends AbstractRewriter /** @noinspection PhpMissingBreakStatementInspection */ case 'quote_start': - $this->quoteCalls[] = array('quote_open',array(),$call[2]); + $this->quoteCalls[] = ['quote_open', [], $call[2]]; // fallthrough case 'quote_newline': $quoteLength = $this->getDepth($call[1][0]); @@ -36,15 +36,15 @@ class Quote extends AbstractRewriter if ($quoteLength > $quoteDepth) { $quoteDiff = $quoteLength - $quoteDepth; for ($i = 1; $i <= $quoteDiff; $i++) { - $this->quoteCalls[] = array('quote_open',array(),$call[2]); + $this->quoteCalls[] = ['quote_open', [], $call[2]]; } } elseif ($quoteLength < $quoteDepth) { $quoteDiff = $quoteDepth - $quoteLength; for ($i = 1; $i <= $quoteDiff; $i++) { - $this->quoteCalls[] = array('quote_close',array(),$call[2]); + $this->quoteCalls[] = ['quote_close', [], $call[2]]; } - } else { - if ($call[0] != 'quote_start') $this->quoteCalls[] = array('linebreak',array(),$call[2]); + } elseif ($call[0] != 'quote_start') { + $this->quoteCalls[] = ['linebreak', [], $call[2]]; } $quoteDepth = $quoteLength; @@ -55,11 +55,11 @@ class Quote extends AbstractRewriter if ($quoteDepth > 1) { $quoteDiff = $quoteDepth - 1; for ($i = 1; $i <= $quoteDiff; $i++) { - $this->quoteCalls[] = array('quote_close',array(),$call[2]); + $this->quoteCalls[] = ['quote_close', [], $call[2]]; } } - $this->quoteCalls[] = array('quote_close',array(),$call[2]); + $this->quoteCalls[] = ['quote_close', [], $call[2]]; $this->callWriter->writeCalls($this->quoteCalls); break; |