Completed
Push — version1.x ( 6e72a3...d4a6f6 )
by Sebastian
04:16
created
src/DatePart.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,9 @@
 block discarded – undo
46 46
                 break;
47 47
             case 'month':
48 48
                 $text = (isset($date[1])) ? $date[1] : '';
49
-                if (empty($text) || $text < 1 || $text > 12)
50
-                    return;
49
+                if (empty($text) || $text < 1 || $text > 12) {
50
+                                    return;
51
+                }
51 52
                 // $form = $this->form;
52 53
                 switch ($this->form) {
53 54
                     case 'numeric': break;
Please login to merge, or discard this patch.
src/Number.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,9 @@
 block discarded – undo
30 30
     public function render($data, $mode = NULL) {
31 31
         $var = $this->variable;
32 32
 
33
-        if (!$var || empty($data->$var))
34
-            return;
33
+        if (!$var || empty($data->$var)) {
34
+                    return;
35
+        }
35 36
 
36 37
         //   $form = $this->form;
37 38
 
Please login to merge, or discard this patch.
src/Label.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,10 +64,12 @@
 block discarded – undo
64 64
             }
65 65
         }
66 66
 
67
-        if (empty($text))
68
-            return;
69
-        if ($this->{'strip-periods'})
70
-            $text = str_replace('.', '', $text);
67
+        if (empty($text)) {
68
+                    return;
69
+        }
70
+        if ($this->{'strip-periods'}) {
71
+                    $text = str_replace('.', '', $text);
72
+        }
71 73
         return $this->format($text);
72 74
     }
73 75
 
Please login to merge, or discard this patch.
src/Factory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,27 +26,27 @@
 block discarded – undo
26 26
         //$class_name = 'csl_' . str_replace('-', '_', $dom_node->nodeName);
27 27
         $className = ucfirst($dom_node->nodeName);
28 28
         
29
-        while(true) {
29
+        while (true) {
30 30
             //find '-'
31 31
             $pos = strpos($className, '-');
32
-            if($pos === false) {
32
+            if ($pos === false) {
33 33
                 break;
34 34
             }
35 35
             //replace '-' and transform to camel case
36
-            $className = substr($className, 0, $pos) . ucfirst(substr($className, $pos+1));
36
+            $className = substr($className, 0, $pos) . ucfirst(substr($className, $pos + 1));
37 37
         }
38 38
         
39 39
         //
40
-        switch($className) {
40
+        switch ($className) {
41 41
             case 'If':
42 42
             case 'Else':
43 43
             case 'ElseIf':
44
-                $className = 'P'.$className;
44
+                $className = 'P' . $className;
45 45
         }
46 46
         
47
-        $className = 'AcademicPuma\\CiteProc\\'.$className;
47
+        $className = 'AcademicPuma\\CiteProc\\' . $className;
48 48
         
49
-        if(!class_exists($className)) {
49
+        if (!class_exists($className)) {
50 50
             new \Exception("Class \"$className\" does not exist.");
51 51
         }
52 52
         return new $className($dom_node, $citeproc);
Please login to merge, or discard this patch.