Completed
Push — master ( fea31f...523a89 )
by Sebastian
02:58
created
src/Seboettg/CiteProc/Util/StringHelper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $wordArray = explode(" ", $text);
66 66
 
67
-        array_walk($wordArray, function (&$word) {
67
+        array_walk($wordArray, function(&$word) {
68 68
             $word = ucfirst($word);
69 69
         });
70 70
 
@@ -74,16 +74,16 @@  discard block
 block discarded – undo
74 74
     public static function capitalizeForTitle($titleString)
75 75
     {
76 76
         if (preg_match('/(.+[^\<\>][\.:\/;\?\!]\s?)([a-z])(.+)/', $titleString, $match)) {
77
-            $titleString = $match[1].StringHelper::mb_ucfirst($match[2]).$match[3];
77
+            $titleString = $match[1] . StringHelper::mb_ucfirst($match[2]) . $match[3];
78 78
         }
79 79
 
80 80
         $wordArray = explode(" ", $titleString);
81 81
 
82
-        array_walk($wordArray, function (&$word) {
82
+        array_walk($wordArray, function(&$word) {
83 83
 
84 84
             $words = explode("-", $word);
85 85
             if (count($words) > 1) {
86
-                array_walk($words, function (&$w) {
86
+                array_walk($words, function(&$w) {
87 87
                     $w = StringHelper::keepLowerCase($w) ? $w : StringHelper::mb_ucfirst($w);
88 88
                 });
89 89
                 $word = implode("-", $words);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
     public static function keepLowerCase($word)
98 98
     {
99
-        $lowerCase =  in_array($word, self::PREPOSITIONS) ||
99
+        $lowerCase = in_array($word, self::PREPOSITIONS) ||
100 100
             in_array($word, self::ARTICLES) ||
101 101
             in_array($word, self::CONJUNCTIONS) ||
102 102
             in_array($word, self::ADJECTIVES);
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Rendering/Choose/ChooseIf.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
         foreach ($node->attributes() as $name => $value) {
49 49
             if ('match' !== $name) {
50
-                $this->constraints->append(Factory::createConstraint((string)$name, (string)$value));
50
+                $this->constraints->append(Factory::createConstraint((string) $name, (string) $value));
51 51
             }
52 52
         }
53 53
 
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Style/Sort/Sort.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,9 +98,9 @@
 block discarded – undo
98 98
                 $sortKey = $dataItem->{$variable};
99 99
             } else if ($key->isDateVariable()) {
100 100
                 $sortKey = Date::getSortKeyDate($variable, $dataItem);
101
-            } else if ($key->isMacro()){
101
+            } else if ($key->isMacro()) {
102 102
                 $sortKey = mb_strtolower(strip_tags(CiteProc::getContext()->getMacro($key->getMacro())->render($dataItem, $citationNumber)));
103
-            }  else if ($variable === "citation-number"){
103
+            } else if ($variable === "citation-number") {
104 104
                 $sortKey = $citationNumber + 1;
105 105
             } else {
106 106
                 $sortKey = mb_strtolower(strip_tags($dataItem->{$variable}));
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Util/Date.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $year  = isset($dateParts[0]) ? $dateParts[0] : "0000";
39 39
         $month = isset($dateParts[1]) ? $dateParts[1] : "00";
40
-        $day =   isset($dateParts[2]) ? $dateParts[2] : "00";
40
+        $day = isset($dateParts[2]) ? $dateParts[2] : "00";
41 41
 
42 42
         return sprintf("%04d%02d%02d", $year, $month, $day);
43 43
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             $dateTime = new \DateTime($date->{'raw'});
52 52
             $arr = [[$dateTime->format("Y"), $dateTime->format("m"), $dateTime->format("d")]];
53 53
         } catch (\Exception $e) {
54
-            throw new CiteProcException("Could not parse date \"".$date->{'raw'}."\".", 0, $e);
54
+            throw new CiteProcException("Could not parse date \"" . $date->{'raw'} . "\".", 0, $e);
55 55
         }
56 56
 
57 57
         return $arr;
Please login to merge, or discard this patch.