@@ -29,19 +29,19 @@ |
||
| 29 | 29 | |
| 30 | 30 | if (!function_exists('vendorPath')) { |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * @return bool|string returns path of composer vendor folder, and false if folder does not exist |
|
| 34 | - */ |
|
| 35 | - function vendorPath() { |
|
| 32 | + /** |
|
| 33 | + * @return bool|string returns path of composer vendor folder, and false if folder does not exist |
|
| 34 | + */ |
|
| 35 | + function vendorPath() { |
|
| 36 | 36 | |
| 37 | - if (file_exists(__DIR__ . '/vendor/')) { |
|
| 38 | - return __DIR__ . '/vendor'; |
|
| 39 | - } else { |
|
| 40 | - if (!file_exists(__DIR__ . '/../../')) { |
|
| 41 | - return false; |
|
| 42 | - } else { |
|
| 43 | - return __DIR__ . '/../..'; |
|
| 44 | - } |
|
| 45 | - } |
|
| 46 | - } |
|
| 37 | + if (file_exists(__DIR__ . '/vendor/')) { |
|
| 38 | + return __DIR__ . '/vendor'; |
|
| 39 | + } else { |
|
| 40 | + if (!file_exists(__DIR__ . '/../../')) { |
|
| 41 | + return false; |
|
| 42 | + } else { |
|
| 43 | + return __DIR__ . '/../..'; |
|
| 44 | + } |
|
| 45 | + } |
|
| 46 | + } |
|
| 47 | 47 | } |
| 48 | 48 | \ No newline at end of file |
@@ -48,15 +48,12 @@ |
||
| 48 | 48 | { |
| 49 | 49 | if (is_numeric($evalValue)) { |
| 50 | 50 | return true; |
| 51 | - } |
|
| 52 | - else if (preg_match(Number::PATTERN_ORDINAL, $evalValue)) { |
|
| 51 | + } else if (preg_match(Number::PATTERN_ORDINAL, $evalValue)) { |
|
| 53 | 52 | $numberFormatter = new NumberFormatter(CiteProc::getContext()->getLocale()->getLanguage(), NumberFormatter::ORDINAL); |
| 54 | 53 | return $numberFormatter->parse($evalValue) !== false; |
| 55 | - } |
|
| 56 | - else if (preg_match(Number::PATTERN_ROMAN, $evalValue)) { |
|
| 54 | + } else if (preg_match(Number::PATTERN_ROMAN, $evalValue)) { |
|
| 57 | 55 | return Number::roman2Dec($evalValue) !== false; |
| 58 | - } |
|
| 59 | - else if (preg_match(Number::PATTERN_COMMA_AMPERSAND_RANGE, $evalValue)){ |
|
| 56 | + } else if (preg_match(Number::PATTERN_COMMA_AMPERSAND_RANGE, $evalValue)){ |
|
| 60 | 57 | return true; |
| 61 | 58 | } |
| 62 | 59 | return false; |
@@ -58,8 +58,7 @@ |
||
| 58 | 58 | foreach ($this->formattingOptions as $option => $optionValue) { |
| 59 | 59 | if ($optionValue === "italic") { |
| 60 | 60 | $text = "<i>$text</i>"; |
| 61 | - } |
|
| 62 | - else if ($optionValue === "bold") { |
|
| 61 | + } else if ($optionValue === "bold") { |
|
| 63 | 62 | $text = "<b>$text</b>"; |
| 64 | 63 | } else { |
| 65 | 64 | $format .= "$option:$optionValue;"; |