@@ -213,8 +213,7 @@ discard block |
||
| 213 | 213 | $CurrentBlock = $Block; |
| 214 | 214 | |
| 215 | 215 | continue; |
| 216 | - } |
|
| 217 | - else |
|
| 216 | + } else |
|
| 218 | 217 | { |
| 219 | 218 | if ($this->isBlockCompletable($CurrentBlock['type'])) |
| 220 | 219 | { |
@@ -282,8 +281,7 @@ discard block |
||
| 282 | 281 | if (isset($Block)) |
| 283 | 282 | { |
| 284 | 283 | $CurrentBlock = $Block; |
| 285 | - } |
|
| 286 | - else |
|
| 284 | + } else |
|
| 287 | 285 | { |
| 288 | 286 | if (isset($CurrentBlock)) |
| 289 | 287 | { |
@@ -323,8 +321,7 @@ discard block |
||
| 323 | 321 | if (isset($Component['markup'])) |
| 324 | 322 | { |
| 325 | 323 | $Component['element'] = array('rawHtml' => $Component['markup']); |
| 326 | - } |
|
| 327 | - elseif (isset($Component['hidden'])) |
|
| 324 | + } elseif (isset($Component['hidden'])) |
|
| 328 | 325 | { |
| 329 | 326 | $Component['element'] = array(); |
| 330 | 327 | } |
@@ -584,8 +581,7 @@ discard block |
||
| 584 | 581 | $contentIndent -= 1; |
| 585 | 582 | $matches[1] = substr($matches[1], 0, -$contentIndent); |
| 586 | 583 | $matches[3] = str_repeat(' ', $contentIndent) . $matches[3]; |
| 587 | - } |
|
| 588 | - elseif ($contentIndent === 0) |
|
| 584 | + } elseif ($contentIndent === 0) |
|
| 589 | 585 | { |
| 590 | 586 | $matches[1] .= ' '; |
| 591 | 587 | } |
@@ -687,8 +683,7 @@ discard block |
||
| 687 | 683 | $Block['element']['elements'] []= & $Block['li']; |
| 688 | 684 | |
| 689 | 685 | return $Block; |
| 690 | - } |
|
| 691 | - elseif ($Line['indent'] < $requiredIndent and $this->blockList($Line)) |
|
| 686 | + } elseif ($Line['indent'] < $requiredIndent and $this->blockList($Line)) |
|
| 692 | 687 | { |
| 693 | 688 | return null; |
| 694 | 689 | } |
@@ -1316,12 +1311,10 @@ discard block |
||
| 1316 | 1311 | if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches)) |
| 1317 | 1312 | { |
| 1318 | 1313 | $emphasis = 'strong'; |
| 1319 | - } |
|
| 1320 | - elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) |
|
| 1314 | + } elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) |
|
| 1321 | 1315 | { |
| 1322 | 1316 | $emphasis = 'em'; |
| 1323 | - } |
|
| 1324 | - else |
|
| 1317 | + } else |
|
| 1325 | 1318 | { |
| 1326 | 1319 | return; |
| 1327 | 1320 | } |
@@ -1412,8 +1405,7 @@ discard block |
||
| 1412 | 1405 | $extent += strlen($matches[0]); |
| 1413 | 1406 | |
| 1414 | 1407 | $remainder = substr($remainder, $extent); |
| 1415 | - } |
|
| 1416 | - else |
|
| 1408 | + } else |
|
| 1417 | 1409 | { |
| 1418 | 1410 | return; |
| 1419 | 1411 | } |
@@ -1428,8 +1420,7 @@ discard block |
||
| 1428 | 1420 | } |
| 1429 | 1421 | |
| 1430 | 1422 | $extent += strlen($matches[0]); |
| 1431 | - } |
|
| 1432 | - else |
|
| 1423 | + } else |
|
| 1433 | 1424 | { |
| 1434 | 1425 | if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) |
| 1435 | 1426 | { |
@@ -1437,8 +1428,7 @@ discard block |
||
| 1437 | 1428 | $definition = strtolower($definition); |
| 1438 | 1429 | |
| 1439 | 1430 | $extent += strlen($matches[0]); |
| 1440 | - } |
|
| 1441 | - else |
|
| 1431 | + } else |
|
| 1442 | 1432 | { |
| 1443 | 1433 | $definition = strtolower($Element['handler']['argument']); |
| 1444 | 1434 | } |
@@ -1603,8 +1593,7 @@ discard block |
||
| 1603 | 1593 | $argument = $Element['text']; |
| 1604 | 1594 | unset($Element['text']); |
| 1605 | 1595 | $destination = 'rawHtml'; |
| 1606 | - } |
|
| 1607 | - else |
|
| 1596 | + } else |
|
| 1608 | 1597 | { |
| 1609 | 1598 | $function = $Element['handler']['function']; |
| 1610 | 1599 | $argument = $Element['handler']['argument']; |
@@ -1641,8 +1630,7 @@ discard block |
||
| 1641 | 1630 | if (isset($Element['elements'])) |
| 1642 | 1631 | { |
| 1643 | 1632 | $Element['elements'] = $this->elementsApplyRecursive($closure, $Element['elements']); |
| 1644 | - } |
|
| 1645 | - elseif (isset($Element['element'])) |
|
| 1633 | + } elseif (isset($Element['element'])) |
|
| 1646 | 1634 | { |
| 1647 | 1635 | $Element['element'] = $this->elementApplyRecursive($closure, $Element['element']); |
| 1648 | 1636 | } |
@@ -1655,8 +1643,7 @@ discard block |
||
| 1655 | 1643 | if (isset($Element['elements'])) |
| 1656 | 1644 | { |
| 1657 | 1645 | $Element['elements'] = $this->elementsApplyRecursiveDepthFirst($closure, $Element['elements']); |
| 1658 | - } |
|
| 1659 | - elseif (isset($Element['element'])) |
|
| 1646 | + } elseif (isset($Element['element'])) |
|
| 1660 | 1647 | { |
| 1661 | 1648 | $Element['element'] = $this->elementsApplyRecursiveDepthFirst($closure, $Element['element']); |
| 1662 | 1649 | } |
@@ -1743,26 +1730,22 @@ discard block |
||
| 1743 | 1730 | if (isset($Element['elements'])) |
| 1744 | 1731 | { |
| 1745 | 1732 | $markup .= $this->elements($Element['elements']); |
| 1746 | - } |
|
| 1747 | - elseif (isset($Element['element'])) |
|
| 1733 | + } elseif (isset($Element['element'])) |
|
| 1748 | 1734 | { |
| 1749 | 1735 | $markup .= $this->element($Element['element']); |
| 1750 | - } |
|
| 1751 | - else |
|
| 1736 | + } else |
|
| 1752 | 1737 | { |
| 1753 | 1738 | if (!$permitRawHtml) |
| 1754 | 1739 | { |
| 1755 | 1740 | $markup .= self::escape($text, true); |
| 1756 | - } |
|
| 1757 | - else |
|
| 1741 | + } else |
|
| 1758 | 1742 | { |
| 1759 | 1743 | $markup .= $text; |
| 1760 | 1744 | } |
| 1761 | 1745 | } |
| 1762 | 1746 | |
| 1763 | 1747 | $markup .= $hasName ? '</' . $Element['name'] . '>' : ''; |
| 1764 | - } |
|
| 1765 | - elseif ($hasName) |
|
| 1748 | + } elseif ($hasName) |
|
| 1766 | 1749 | { |
| 1767 | 1750 | $markup .= ' />'; |
| 1768 | 1751 | } |
@@ -1928,8 +1911,7 @@ discard block |
||
| 1928 | 1911 | if ($len > strlen($string)) |
| 1929 | 1912 | { |
| 1930 | 1913 | return false; |
| 1931 | - } |
|
| 1932 | - else |
|
| 1914 | + } else |
|
| 1933 | 1915 | { |
| 1934 | 1916 | return strtolower(substr($string, 0, $len)) === strtolower($needle); |
| 1935 | 1917 | } |