Completed
Push — master ( 3eefa2...fea31f )
by Sebastian
03:06
created
src/Seboettg/CiteProc/Rendering/Layout.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         if (CiteProc::getContext()->isModeBibliography()) {
75 75
             if ($data instanceof DataList) {
76
-                foreach ($data as $citationNumber => $item) {
77
-                    ++self::$numberOfCitedItems;
76
+                foreach ($data as $citationNumber => $item) {++self::$numberOfCitedItems;
78 77
                     CiteProc::getContext()->getResults()->append($this->wrapBibEntry($this->renderSingle($item, $citationNumber)));
79 78
                 }
80 79
                 $ret .= implode($this->delimiter, CiteProc::getContext()->getResults()->toArray());
@@ -82,7 +81,7 @@  discard block
 block discarded – undo
82 81
                 $ret .= $this->wrapBibEntry($this->renderSingle($data, $citationNumber));
83 82
             }
84 83
 
85
-            return "<div class=\"csl-bib-body\">".$ret."\n</div>";
84
+            return "<div class=\"csl-bib-body\">" . $ret . "\n</div>";
86 85
 
87 86
         } else if (CiteProc::getContext()->isModeCitation()) {
88 87
             if (is_array($data) || $data instanceof DataList) {
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Locale/LocaleXmlParserTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         /** @var \SimpleXMLElement $node */
62 62
         foreach ($locale as $node) {
63
-            switch($node->getName()) {
63
+            switch ($node->getName()) {
64 64
                 case 'style-options':
65 65
                     $this->optionsXml->add('options', $node);
66 66
                     foreach ($node->attributes() as $name => $value) {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                     }
109 109
                     break;
110 110
                 case 'date':
111
-                    $form = (string)$node["form"];
111
+                    $form = (string) $node["form"];
112 112
                     $this->dateXml->add($form, $node);
113 113
                     foreach ($node->children() as $child) {
114 114
                         $date = new \stdClass();
Please login to merge, or discard this patch.
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 2 patches
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.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
     }
105 105
 
106 106
     /**
107
-     * @return mixed
107
+     * @return Choose
108 108
      */
109 109
     public function getParent()
110 110
     {
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Styles/TextCaseTrait.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -79,6 +79,10 @@
 block discarded – undo
79 79
     }
80 80
 
81 81
 
82
+    /**
83
+     * @param string $render
84
+     * @param string $original
85
+     */
82 86
     private function keepNoCase($render, $original)
83 87
     {
84 88
         if (preg_match('/<span class=\"nocase\">(\p{L}+)<\/span>/i', $original, $match)) {
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Rendering/Name/Name.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -522,6 +522,9 @@
 block discarded – undo
522 522
         return false;
523 523
     }
524 524
 
525
+    /**
526
+     * @param \stdClass $precedingItem
527
+     */
525 528
     private function identicalAuthors($precedingItem, $currentAuthor)
526 529
     {
527 530
         if (count($precedingItem->author) !== count($currentAuthor)) {
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Style/Sort/Sort.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,11 +101,11 @@
 block discarded – undo
101 101
             } else if ($key->isDateVariable()) {
102 102
                 $groupedItems[Date::serializeDate($dataItem->{$variable})][] = $dataItem;
103 103
                 continue;
104
-            } else if ($key->isMacro()){
104
+            } else if ($key->isMacro()) {
105 105
                 $macroResult = CiteProc::getContext()->getMacro($key->getMacro())->render($dataItem, $citationNumber);
106 106
                 $groupedItems[mb_strtolower($macroResult)] = $dataItem;
107 107
                 continue;
108
-            }  else if ($variable === "citation-number"){
108
+            } else if ($variable === "citation-number") {
109 109
                 $groupedItems[$citationNumber + 1] = $dataItem;
110 110
             } else { //this imply sort key citation-number
111 111
                 $groupedItems[mb_strtolower($dataItem->{$variable})] = $dataItem;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
                 $macroResult = CiteProc::getContext()->getMacro($key->getMacro())->render($dataItem, $citationNumber);
106 106
                 $groupedItems[mb_strtolower($macroResult)] = $dataItem;
107 107
                 continue;
108
-            }  else if ($variable === "citation-number"){
108
+            } else if ($variable === "citation-number"){
109 109
                 $groupedItems[$citationNumber + 1] = $dataItem;
110 110
             } else { //this imply sort key citation-number
111 111
                 $groupedItems[mb_strtolower($dataItem->{$variable})] = $dataItem;
Please login to merge, or discard this patch.