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