@@ -13,13 +13,13 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | function vendorPath() { |
| 15 | 15 | |
| 16 | - if (file_exists(__DIR__ . '/vendor/')) { |
|
| 17 | - return __DIR__ . '/vendor'; |
|
| 16 | + if (file_exists(__DIR__.'/vendor/')) { |
|
| 17 | + return __DIR__.'/vendor'; |
|
| 18 | 18 | } else { |
| 19 | - if (!file_exists(__DIR__ . '/../../')) { |
|
| 19 | + if (!file_exists(__DIR__.'/../../')) { |
|
| 20 | 20 | return false; |
| 21 | 21 | } else { |
| 22 | - return __DIR__ . '/../..'; |
|
| 22 | + return __DIR__.'/../..'; |
|
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | } |
@@ -60,11 +60,11 @@ |
||
| 60 | 60 | if ($lineSpacing || $entrySpacing || $hangingIndent) { |
| 61 | 61 | $rule = $this->cssRules->getRule(".csl-entry"); |
| 62 | 62 | if (!empty($lineSpacing)) { |
| 63 | - $rule->addDirective("line-height", intval($lineSpacing) . "em"); |
|
| 63 | + $rule->addDirective("line-height", intval($lineSpacing)."em"); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | if (!empty($entrySpacing)) { |
| 67 | - $rule->addDirective("margin-bottom", intval($entrySpacing) . "em"); |
|
| 67 | + $rule->addDirective("margin-bottom", intval($entrySpacing)."em"); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | if (!empty($hangingIndent)) { |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | if (!empty($format)) { |
| 93 | - $text = '<span style="' . $format . '">' . $text . '</span>'; |
|
| 93 | + $text = '<span style="'.$format.'">'.$text.'</span>'; |
|
| 94 | 94 | } |
| 95 | 95 | } |
| 96 | 96 | return $text; |
@@ -41,13 +41,13 @@ |
||
| 41 | 41 | $attr = ""; |
| 42 | 42 | for ($i = count($nameParts) - 1; $i >= 0; --$i) { |
| 43 | 43 | if ($i > 0) { |
| 44 | - $attr = ucfirst($nameParts[$i]) . $attr; |
|
| 44 | + $attr = ucfirst($nameParts[$i]).$attr; |
|
| 45 | 45 | } else { |
| 46 | - $attr = $nameParts[$i] . $attr; |
|
| 46 | + $attr = $nameParts[$i].$attr; |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | if (!isset($this->{$attr})) { |
| 50 | - throw new InvalidArgumentException("Property \"$attr\" ($name) does not exist in " . __CLASS__); |
|
| 50 | + throw new InvalidArgumentException("Property \"$attr\" ($name) does not exist in ".__CLASS__); |
|
| 51 | 51 | } |
| 52 | 52 | $this->{$attr} = $value; |
| 53 | 53 | } |
@@ -146,11 +146,11 @@ discard block |
||
| 146 | 146 | { |
| 147 | 147 | $text = $date->getYear(); |
| 148 | 148 | if ($text > 0 && $text < 1000) { |
| 149 | - $text = $text . CiteProc::getContext()->getLocale()->filter("terms", "ad")->single; |
|
| 149 | + $text = $text.CiteProc::getContext()->getLocale()->filter("terms", "ad")->single; |
|
| 150 | 150 | return $text; |
| 151 | 151 | } elseif ($text < 0) { |
| 152 | 152 | $text = $text * -1; |
| 153 | - $text = $text . CiteProc::getContext()->getLocale()->filter("terms", "bc")->single; |
|
| 153 | + $text = $text.CiteProc::getContext()->getLocale()->filter("terms", "bc")->single; |
|
| 154 | 154 | return $text; |
| 155 | 155 | } |
| 156 | 156 | return $text; |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | if (empty($form)) { |
| 224 | 224 | $form = "long"; |
| 225 | 225 | } |
| 226 | - $month = 'month-' . sprintf('%02d', $text); |
|
| 226 | + $month = 'month-'.sprintf('%02d', $text); |
|
| 227 | 227 | $text = CiteProc::getContext()->getLocale()->filter('terms', $month, $form)->single; |
| 228 | 228 | return $text; |
| 229 | 229 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | foreach ($this->conditionVariables as $variable) { |
| 72 | 72 | $conditionMatched |= $this->matchForVariable($variable, $value); |
| 73 | 73 | } |
| 74 | - return (bool)$conditionMatched; |
|
| 74 | + return (bool) $conditionMatched; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | private function matchAll($value) |
@@ -80,6 +80,6 @@ discard block |
||
| 80 | 80 | foreach ($this->conditionVariables as $variable) { |
| 81 | 81 | $conditionMatched &= $this->matchForVariable($variable, $value); |
| 82 | 82 | } |
| 83 | - return (bool)$conditionMatched; |
|
| 83 | + return (bool) $conditionMatched; |
|
| 84 | 84 | } |
| 85 | 85 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public static function getCompareNumber() |
| 52 | 52 | { |
| 53 | - return function ($numA, $numB, $order) { |
|
| 53 | + return function($numA, $numB, $order) { |
|
| 54 | 54 | if (is_numeric($numA) && is_numeric($numB)) { |
| 55 | 55 | $ret = $numA - $numB; |
| 56 | 56 | } else { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $len = strlen($numStr); |
| 77 | 77 | for ($pos = 0; $pos < $len; $pos++) { |
| 78 | 78 | $n = $numStr[$pos]; |
| 79 | - $ret = self::ROMAN_NUMERALS[$pos][$n] . $ret; |
|
| 79 | + $ret = self::ROMAN_NUMERALS[$pos][$n].$ret; |
|
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | return $ret; |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $className = "YearMonthDayRenderer"; |
| 70 | 70 | break; |
| 71 | 71 | } |
| 72 | - return __NAMESPACE__ . "\\" . $className; |
|
| 72 | + return __NAMESPACE__."\\".$className; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $from = $datePart->renderWithoutAffixes($from, $this->parentDateObject); |
| 95 | 95 | $to = $datePart->renderWithoutAffixes($to, $this->parentDateObject); |
| 96 | 96 | $suffix = !empty($to) ? $datePart->renderSuffix() : ""; |
| 97 | - return $prefix . $from . $delimiter . $to . $suffix; |
|
| 97 | + return $prefix.$from.$delimiter.$to.$suffix; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | protected function renderDateParts($dateParts, $from, $to, $delimiter) |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $renderedTo = $datePart[0]->renderWithoutAffixes($to, $this->parentDateObject); |
| 110 | 110 | $renderedTo .= $datePart[0]->renderSuffix(); |
| 111 | 111 | $renderedTo .= $datePart[1]->render($to, $this->parentDateObject); |
| 112 | - $ret .= $renderedFrom . $delimiter . $renderedTo; |
|
| 112 | + $ret .= $renderedFrom.$delimiter.$renderedTo; |
|
| 113 | 113 | } else { |
| 114 | 114 | $ret .= $datePart->render($from, $this->parentDateObject); |
| 115 | 115 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | { |
| 30 | 30 | $dp = $dateParts->toArray(); |
| 31 | 31 | $dateParts_ = []; |
| 32 | - array_walk($dp, function ($datePart, $key) use (&$dateParts_) { |
|
| 32 | + array_walk($dp, function($datePart, $key) use (&$dateParts_) { |
|
| 33 | 33 | if (strpos($key, "year") !== false || strpos($key, "month") !== false) { |
| 34 | 34 | $dateParts_["yearmonth"][] = $datePart; |
| 35 | 35 | } |