Completed
Push — master ( 77da96...e87eab )
by Sebastian
04:05
created
src/Seboettg/CiteProc/Locale/Locale.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -46,6 +46,9 @@
 block discarded – undo
46 46
         return $this->language;
47 47
     }
48 48
 
49
+    /**
50
+     * @param string $type
51
+     */
49 52
     public function filter($type, $name, $form = "long") {
50 53
 
51 54
         if (!isset($this->{$type})) {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Seboettg\CiteProc\Locale;
3 3
 use Seboettg\CiteProc\Util\Factory;
4
-use Seboettg\Collection\ArrayList;
5 4
 
6 5
 /**
7 6
  */
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Rendering/Name/Names.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
      * addition, the “editortranslator” term is used if the Names element contains a Label element, replacing the
131 131
      * default “editor” and “translator” terms (e.g. resulting in “Doe (editor & translator)”).
132 132
      *
133
-     * @param $data
133
+     * @param \stdClass $data
134 134
      * @return string
135 135
      */
136 136
     public function render($data)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         /** @var \SimpleXMLElement $attribute */
112 112
         foreach ($node->attributes() as $attribute) {
113 113
             if ("variable" === $attribute->getName()) {
114
-                $this->variables = new ArrayList(explode(" ", (string)$attribute));
114
+                $this->variables = new ArrayList(explode(" ", (string) $attribute));
115 115
                 break;
116 116
             }
117 117
         }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                 }
187 187
             }
188 188
         }
189
-        $str  .= implode($this->delimiter, $results);
189
+        $str .= implode($this->delimiter, $results);
190 190
         return $this->addAffixes($str);
191 191
     }
192 192
 
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Rendering/Text.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Seboettg\CiteProc\Styles\AffixesTrait;
6 6
 use Seboettg\CiteProc\Styles\DisplayTrait;
7 7
 use Seboettg\CiteProc\Styles\FormattingTrait;
8
-use Seboettg\CiteProc\Styles\QuotesTrait;
9 8
 use Seboettg\CiteProc\Styles\TextCaseTrait;
10 9
 
11 10
 
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Util/Factory.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -35,6 +35,9 @@  discard block
 block discarded – undo
35 35
         "et-al"         => "\\Name\\EtAl"
36 36
     ];
37 37
 
38
+    /**
39
+     * @param \Seboettg\CiteProc\Rendering\Name\Names $param
40
+     */
38 41
     public static function create($node, $param = null)
39 42
     {
40 43
         $nodeClass = self::CITE_PROC_NODE_NAMESPACE . self::$nodes[$node->getName()];
@@ -48,6 +51,9 @@  discard block
 block discarded – undo
48 51
     }
49 52
 
50 53
 
54
+    /**
55
+     * @param string $lang
56
+     */
51 57
     public static function loadLocale($lang) {
52 58
         $directory = __DIR__."/../../../../vendor/academicpuma/locales";
53 59
         $file = $directory . "/locales-" . ($lang) . ".xml";
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 
50 50
 
51 51
     public static function loadLocale($lang) {
52
-        $directory = __DIR__."/../../../../vendor/academicpuma/locales";
52
+        $directory = __DIR__ . "/../../../../vendor/academicpuma/locales";
53 53
         $file = $directory . "/locales-" . ($lang) . ".xml";
54 54
 
55 55
         if (file_exists($file) == false) {
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Styles/DelimiterTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
     {
13 13
         foreach ($node->attributes() as $attribute) {
14 14
             /** @var string $name */
15
-            $name = (string)$attribute->getName();
16
-            $value = (string)$attribute;
15
+            $name = (string) $attribute->getName();
16
+            $value = (string) $attribute;
17 17
 
18 18
             switch ($name) {
19 19
                 case 'delimiter':
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Styles/FormattingTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
         foreach ($node->attributes() as $attribute) {
37 37
 
38 38
             /** @var string $name */
39
-            $name = (string)$attribute->getName();
40
-            $value = (string)$attribute;
39
+            $name = (string) $attribute->getName();
40
+            $value = (string) $attribute;
41 41
 
42 42
             if (in_array($name, self::$formattingAttributes)) {
43 43
                 $this->formattingOptions->add($name, $value);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                 }
64 64
             }
65 65
             if (!empty($format)) {
66
-                $text = '<span style="' . $format . '">'.$text.'</span>';
66
+                $text = '<span style="' . $format . '">' . $text . '</span>';
67 67
             }
68 68
         }
69 69
         return $text;
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Styles/AffixesTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
         /** @var \SimpleXMLElement $attribute */
19 19
         foreach ($node->attributes() as $attribute) {
20 20
             /** @var string $name */
21
-            $name = (string)$attribute->getName();
22
-            $value = (string)$attribute;
21
+            $name = (string) $attribute->getName();
22
+            $value = (string) $attribute;
23 23
 
24 24
             switch ($name) {
25 25
                 case 'prefix':
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Constraint/Factory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
     {
28 28
         $className = "";
29 29
         $parts = explode("-", $name);
30
-        array_walk($parts, function ($part) use (&$className) {
30
+        array_walk($parts, function($part) use (&$className) {
31 31
             $className .= ucfirst($part);
32 32
         });
33
-        $className = self::NAMESPACE_CONSTRAINTS.$className;
33
+        $className = self::NAMESPACE_CONSTRAINTS . $className;
34 34
 
35 35
         if (!class_exists($className)) {
36 36
             throw new ClassNotFoundException($className);
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Rendering/Layout.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
         if (is_array($data)) {
56 56
             $arr = [];
57
-            foreach ($data as $item) {
58
-                ++self::$numberOfCitedItems;
57
+            foreach ($data as $item) {++self::$numberOfCitedItems;
59 58
                 $arr[] = $this->wrapBibEntry($this->renderSingle($item));
60 59
             }
61 60
             $ret = implode($this->delimiter, $arr);
@@ -66,7 +65,7 @@  discard block
 block discarded – undo
66 65
         $ret = $this->addAffixes($ret);
67 66
 
68 67
         if (CiteProc::getContext()->isModeBibliography()) {
69
-            return "<div class=\"csl-bib-body\">".$ret."\n</div>";
68
+            return "<div class=\"csl-bib-body\">" . $ret . "\n</div>";
70 69
         }
71 70
         return $ret;
72 71
     }
Please login to merge, or discard this patch.