Passed
Push — new-api ( 5677f6...2a03a6 )
by Sebastian
04:12
created
src/Locale/Locale.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,12 +53,12 @@
 block discarded – undo
53 53
      */
54 54
     public function __construct(Config\Locale $localeConfig, $xmlString = null)
55 55
     {
56
-        $this->language = (string)$localeConfig;
56
+        $this->language = (string) $localeConfig;
57 57
 
58 58
         if (!empty($xmlString)) {
59 59
             $this->localeXml = new SimpleXMLElement($xmlString);
60 60
         } else {
61
-            $this->localeXml = new SimpleXMLElement(loadLocales((string)$localeConfig));
61
+            $this->localeXml = new SimpleXMLElement(loadLocales((string) $localeConfig));
62 62
         }
63 63
 
64 64
         $this->initLocaleXmlParser();
Please login to merge, or discard this patch.
src/Styles/StylesRenderer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
                     $textCase = new TextCase((string) $attribute);
45 45
                     break;
46 46
                 case 'display':
47
-                    $display = new Display((string )$attribute);
47
+                    $display = new Display((string) $attribute);
48 48
                     break;
49 49
                 case 'quotes':
50 50
                     $quotes = "true" === (string) $attribute;
Please login to merge, or discard this patch.
src/Util/StringHelper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     public static function capitalizeForTitle($titleString)
93 93
     {
94 94
         if (preg_match('/(.+[^\<\>][\.:\/;\?\!]\s?)([a-z])(.+)/', $titleString, $match)) {
95
-            $titleString = $match[1].StringHelper::mb_ucfirst($match[2]).$match[3];
95
+            $titleString = $match[1] . StringHelper::mb_ucfirst($match[2]) . $match[3];
96 96
         }
97 97
 
98 98
         $wordArray = explode(" ", $titleString);
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         /** @noinspection PhpInternalEntityUsedInspection */
141 141
         $encoding = Mbstring::mb_detect_encoding($firstChar, self::ISO_ENCODINGS, true);
142 142
         return in_array($encoding, self::ISO_ENCODINGS) ?
143
-            Mbstring::mb_strtoupper($firstChar, $encoding).$then : $firstChar.$then;
143
+            Mbstring::mb_strtoupper($firstChar, $encoding) . $then : $firstChar . $then;
144 144
     }
145 145
     // phpcs:disable
146 146
     public static function mb_strrev($string)
@@ -189,13 +189,13 @@  discard block
 block discarded – undo
189 189
             foreach ($spaceExploded as $givenPart) {
190 190
                 $firstLetter = mb_substr($givenPart, 0, 1, "UTF-8");
191 191
                 if (StringHelper::isLatinString($firstLetter)) {
192
-                    $res .= ctype_upper($firstLetter) ? $firstLetter.$initializeSign : " ".$givenPart." ";
192
+                    $res .= ctype_upper($firstLetter) ? $firstLetter . $initializeSign : " " . $givenPart . " ";
193 193
                 } else {
194
-                    $res .= $firstLetter.$initializeSign;
194
+                    $res .= $firstLetter . $initializeSign;
195 195
                 }
196 196
             }
197 197
             if ($i < count($exploded) - 1 && $initializeWithHyphen) {
198
-                $res = rtrim($res)."-";
198
+                $res = rtrim($res) . "-";
199 199
             }
200 200
             ++$i;
201 201
         }
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         $innerCloseQuote
259 259
     ) {
260 260
         if (preg_match("/(.*)$outerOpenQuote(.+)$outerCloseQuote(.*)/u", $text, $match)) {
261
-            return $match[1].$innerOpenQuote.$match[2].$innerCloseQuote.$match[3];
261
+            return $match[1] . $innerOpenQuote . $match[2] . $innerCloseQuote . $match[3];
262 262
         }
263 263
         return $text;
264 264
     }
Please login to merge, or discard this patch.
src/Rendering/Date/Date.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -182,15 +182,15 @@  discard block
 block discarded – undo
182 182
                 $toRender = 0;
183 183
                 if ($interval->y > 0 && in_array('year', $dateParts)) {
184 184
                     $toRender |= self::DATE_RANGE_STATE_YEAR;
185
-                    $delimiter = $this->dateParts->get($this->form."-year")->getRangeDelimiter();
185
+                    $delimiter = $this->dateParts->get($this->form . "-year")->getRangeDelimiter();
186 186
                 }
187 187
                 if ($interval->m > 0 && $from->getMonth() - $to->getMonth() !== 0 && in_array('month', $dateParts)) {
188 188
                     $toRender |= self::DATE_RANGE_STATE_MONTH;
189
-                    $delimiter = $this->dateParts->get($this->form."-month")->getRangeDelimiter();
189
+                    $delimiter = $this->dateParts->get($this->form . "-month")->getRangeDelimiter();
190 190
                 }
191 191
                 if ($interval->d > 0 && $from->getDay() - $to->getDay() !== 0 && in_array('day', $dateParts)) {
192 192
                     $toRender |= self::DATE_RANGE_STATE_DAY;
193
-                    $delimiter = $this->dateParts->get($this->form."-day")->getRangeDelimiter();
193
+                    $delimiter = $this->dateParts->get($this->form . "-day")->getRangeDelimiter();
194 194
                 }
195 195
                 if ($toRender === self::DATE_RANGE_STATE_NONE) {
196 196
                     $ret .= $this->iterateAndRenderDateParts($dateParts, $data_);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
             }
201 201
 
202 202
             if (isset($var->raw) && preg_match("/(\p{L}+)\s?([\-\–&,])\s?(\p{L}+)/u", $var->raw, $matches)) {
203
-                return $matches[1].$matches[2].$matches[3];
203
+                return $matches[1] . $matches[2] . $matches[3];
204 204
             }
205 205
         } elseif (!empty($this->datePartsAttribute)) {
206 206
             // fallback:
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
                     $this->dateParts->add(
359 359
                         "$form-$datePart",
360 360
                         new DatePart(
361
-                            new SimpleXMLElement('<date-part name="'.$datePart.'" form="'.$form.'" />')
361
+                            new SimpleXMLElement('<date-part name="' . $datePart . '" form="' . $form . '" />')
362 362
                         )
363 363
                     );
364 364
                 }
Please login to merge, or discard this patch.
src/Rendering/Group.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         $stylesRenderer = StylesRenderer::factory($node);
69 69
         $group->setChildren($children);
70 70
         $group->setStylesRenderer($stylesRenderer);
71
-        $group->setDelimiter((string)$node->attributes()['delimiter']);
71
+        $group->setDelimiter((string) $node->attributes()['delimiter']);
72 72
         return $group;
73 73
     }
74 74
 
Please login to merge, or discard this patch.
src/Rendering/Layout.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $stylesRenderer = StylesRenderer::factory($node);
74 74
         $layout->setChildren($children);
75 75
         $layout->setStylesRenderer($stylesRenderer);
76
-        $layout->setDelimiter((string)$node->attributes()['delimiter']);
76
+        $layout->setDelimiter((string) $node->attributes()['delimiter']);
77 77
         return $layout;
78 78
     }
79 79
 
@@ -98,15 +98,14 @@  discard block
 block discarded – undo
98 98
         }
99 99
 
100 100
         if (CiteProc::getContext()->isModeBibliography()) {
101
-            foreach ($data as $citationNumber => $item) {
102
-                ++self::$numberOfCitedItems;
101
+            foreach ($data as $citationNumber => $item) {++self::$numberOfCitedItems;
103 102
                 CiteProc::getContext()->getResults()->append(
104 103
                     $this->wrapBibEntry($item, $this->renderSingle($item, $citationNumber))
105 104
                 );
106 105
             }
107 106
             $ret .= implode($this->delimiter, CiteProc::getContext()->getResults()->toArray());
108 107
             $ret = StringHelper::clearApostrophes($ret);
109
-            return "<div class=\"csl-bib-body\">".$ret."\n</div>";
108
+            return "<div class=\"csl-bib-body\">" . $ret . "\n</div>";
110 109
         } elseif (CiteProc::getContext()->isModeCitation()) {
111 110
             if ($citationItems->count() > 0) { //is there a filter for specific citations?
112 111
                 if ($this->isGroupedCitations($citationItems)) { //if citation items grouped?
@@ -184,7 +183,7 @@  discard block
 block discarded – undo
184 183
     private function wrapBibEntry($dataItem, $value): string
185 184
     {
186 185
         $value = $this->stylesRenderer->renderAffixes($value);
187
-        return "\n  ".
186
+        return "\n  " .
188 187
             "<div class=\"csl-entry\">" .
189 188
             $renderedItem = CiteProcHelper::applyAdditionMarkupFunction($dataItem, "csl-entry", $value) .
190 189
             "</div>";
Please login to merge, or discard this patch.