Passed
Push — feature/106-Comma-character-in... ( 1520b9...3456fd )
by Sebastian
13:40 queued 08:14
created
src/Rendering/Date/DateRange/MonthDayRenderer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     {
29 29
         $dp = $dateParts->toArray();
30 30
         $dateParts_ = [];
31
-        array_walk($dp, function ($datePart, $key) use (&$dateParts_) {
31
+        array_walk($dp, function($datePart, $key) use (&$dateParts_) {
32 32
             //$bit = sprintf("%03d", decbin($differentParts));
33 33
             if (strpos($key, "month") !== false || strpos($key, "day") !== false) {
34 34
                 $dateParts_["monthday"][] = $datePart;
Please login to merge, or discard this patch.
src/Style/Sort/Sort.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
     public function flatten($array)
152 152
     {
153 153
         $returnArray = [];
154
-        array_walk_recursive($array, function ($a) use (&$returnArray) {
154
+        array_walk_recursive($array, function($a) use (&$returnArray) {
155 155
             $returnArray[] = $a;
156 156
         });
157 157
         return $returnArray;
Please login to merge, or discard this patch.
src/Locale/Locale.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
         //filter by form
119 119
         if ($type !== "options") {
120 120
             /** @var Term $value */
121
-            $array = array_filter($array, function ($term) use ($form) {
121
+            $array = array_filter($array, function($term) use ($form) {
122 122
                 return $term->form === $form;
123 123
             });
124 124
         }
Please login to merge, or discard this patch.
example/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -91,21 +91,21 @@
 block discarded – undo
91 91
 $style = StyleSheet::loadStyleSheet("ieee");
92 92
 $citeProc = new CiteProc($style, "en-US", [
93 93
     "bibliography" => [
94
-        "author" => function ($authorItem, $renderedText) {
94
+        "author" => function($authorItem, $renderedText) {
95 95
             if (isset($authorItem->id)) {
96 96
                 return '<a href="https://example.org/author/'.$authorItem->id.'">'.$renderedText.'</a>';
97 97
             }
98 98
             return $renderedText;
99 99
         },
100
-        "title" => function ($cslItem, $renderedText) {
100
+        "title" => function($cslItem, $renderedText) {
101 101
             return '<a href="https://example.org/publication/'.$cslItem->id.'">'.$renderedText.'</a>';
102 102
         },
103
-        "csl-entry" => function ($cslItem, $renderedText) {
103
+        "csl-entry" => function($cslItem, $renderedText) {
104 104
             return '<a id="'.$cslItem->id.'" href="#'.$cslItem->id.'"></a>'.$renderedText;
105 105
         }
106 106
     ],
107 107
     "citation" => [
108
-        "citation-number" => function ($cslItem, $renderedText) {
108
+        "citation-number" => function($cslItem, $renderedText) {
109 109
             return '<a href="#'.$cslItem->id.'">'.$renderedText.'</a>';
110 110
         }
111 111
     ]
Please login to merge, or discard this patch.
src/Rendering/Name/Names.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
                     $str .= $this->label->render($data);
197 197
                 }
198 198
                 $vars = $this->variables->toArray();
199
-                $vars = array_filter($vars, function ($value) {
199
+                $vars = array_filter($vars, function($value) {
200 200
                     return !($value === "editor" || $value === "translator");
201 201
                 });
202 202
                 $this->variables->setArray($vars);
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 
378 378
     private function filterEmpty(array $results)
379 379
     {
380
-        return array_filter($results, function ($item) {
380
+        return array_filter($results, function($item) {
381 381
             return !empty($item);
382 382
         });
383 383
     }
Please login to merge, or discard this patch.
src/Rendering/Name/Name.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -267,17 +267,17 @@  discard block
 block discarded – undo
267 267
 
268 268
             switch ($this->delimiterPrecedesEtAl) {
269 269
                 case 'never':
270
-                    $text = $text . " " . $this->etAl;
270
+                    $text = $text." ".$this->etAl;
271 271
                     break;
272 272
                 case 'always':
273
-                    $text = $text . $this->delimiter . $this->etAl;
273
+                    $text = $text.$this->delimiter.$this->etAl;
274 274
                     break;
275 275
                 case 'contextual':
276 276
                 default:
277 277
                     if (count($resultNames) === 1) {
278
-                        $text .= " " . $this->etAl;
278
+                        $text .= " ".$this->etAl;
279 279
                     } else {
280
-                        $text .= $this->delimiter . $this->etAl;
280
+                        $text .= $this->delimiter.$this->etAl;
281 281
                     }
282 282
             }
283 283
         }
@@ -574,9 +574,9 @@  discard block
 block discarded – undo
574 574
                 $text = !empty($given) ? $given." ".$family : $family;
575 575
             }
576 576
         } elseif (StringHelper::isAsianString(NameHelper::normalizeName($data))) {
577
-            $text = $this->form === "long" ? $data->family . $data->given : $data->family;
577
+            $text = $this->form === "long" ? $data->family.$data->given : $data->family;
578 578
         } else {
579
-            $text = $this->form === "long" ? $data->family . " " . $data->given : $data->family;
579
+            $text = $this->form === "long" ? $data->family." ".$data->given : $data->family;
580 580
         }
581 581
         return $text;
582 582
     }
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
                         $resultNames[] = $this->formatName($name, $rank);
358 358
                     }
359 359
                     break;
360
-                 /* “partial-first” - as “partial-each”, but substitution is limited to the first name of the name
360
+                    /* “partial-first” - as “partial-each”, but substitution is limited to the first name of the name
361 361
                 variable. */
362 362
                 case SubsequentAuthorSubstituteRule::PARTIAL_FIRST:
363 363
                     if ($rank === 0) {
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
                     }
372 372
                     break;
373 373
 
374
-                 /* “complete-each” - requires a complete match like “complete-all”, but now the value of
374
+                    /* “complete-each” - requires a complete match like “complete-all”, but now the value of
375 375
                 subsequent-author-substitute substitutes for each rendered name. */
376 376
                 case SubsequentAuthorSubstituteRule::COMPLETE_EACH:
377 377
                     try {
Please login to merge, or discard this patch.
src/Util/NameHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@
 block discarded – undo
310 310
             return false;
311 311
         }
312 312
 
313
-        array_walk($persons1, function ($name, $key) use ($persons2, &$same) {
313
+        array_walk($persons1, function($name, $key) use ($persons2, &$same) {
314 314
             $family1 = $name->family;
315 315
             $family2 = $persons2[$key]->family;
316 316
             $same = $same && ($family1 === $family2);
Please login to merge, or discard this patch.
src/Context.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -430,7 +430,7 @@
 block discarded – undo
430 430
 
431 431
     public function getCitationItemById($id)
432 432
     {
433
-        return $this->citationItems->filter(function ($item) use ($id) {
433
+        return $this->citationItems->filter(function($item) use ($id) {
434 434
             return $item->id === $id;
435 435
         })->current();
436 436
     }
Please login to merge, or discard this patch.
src/Terms/Locator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     public static function mapLocatorLabelToRenderVariable($locatorTerm)
40 40
     {
41 41
         if ($locatorTerm instanceof Locator) {
42
-            $locatorTerm = (string)$locatorTerm;
42
+            $locatorTerm = (string) $locatorTerm;
43 43
         }
44 44
         return
45 45
             array_key_exists($locatorTerm, self::LABEL_TO_VARIABLE_MAP) ?
Please login to merge, or discard this patch.