@@ -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 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | $openQuote = CiteProc::getContext()->getLocale()->filter("terms", "open-quote")->single; |
47 | 47 | $closeQuote = CiteProc::getContext()->getLocale()->filter("terms", "close-quote")->single; |
48 | 48 | $text = $this->replaceOuterQuotes($text, $openQuote, $closeQuote); |
49 | - return $openQuote . $text . $closeQuote; |
|
49 | + return $openQuote.$text.$closeQuote; |
|
50 | 50 | } |
51 | 51 | return $text; |
52 | 52 | } |
@@ -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)) { |
@@ -84,12 +84,12 @@ |
||
84 | 84 | $lastChar = mb_substr($text, -1, 1); |
85 | 85 | if ($closeQuote === $lastChar) { // last char is closing quote? |
86 | 86 | $text = mb_substr($text, 0, mb_strlen($text) - 1); //set suffix before |
87 | - return $text . $suffix . $lastChar; |
|
87 | + return $text.$suffix.$lastChar; |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | } |
91 | 91 | |
92 | - return $prefix . $text . $suffix; |
|
92 | + return $prefix.$text.$suffix; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -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; |