Passed
Push — master ( eea331...0d2505 )
by tsms
01:47
created
docs/examples/10.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,12 @@
 block discarded – undo
48 48
     }
49 49
 }
50 50
 
51
-if (!isset($_GET['y'])) $_GET['y'] = date('Y');
52
-if (!isset($_GET['m'])) $_GET['m'] = date('n');
51
+if (!isset($_GET['y'])) {
52
+    $_GET['y'] = date('Y');
53
+}
54
+if (!isset($_GET['m'])) {
55
+    $_GET['m'] = date('n');
56
+}
53 57
 
54 58
 // Creata a month as usual
55 59
 $Month = new Calendar_Month_Weekdays($_GET['y'],$_GET['m']);
Please login to merge, or discard this patch.
docs/examples/12.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,9 @@
 block discarded – undo
16 16
 
17 17
 define ('CALENDAR_MONTH_STATE',CALENDAR_USE_MONTH_WEEKDAYS);
18 18
 
19
-if ( !isset($_GET['year']) ) $_GET['year'] = date('Y');
19
+if ( !isset($_GET['year']) ) {
20
+    $_GET['year'] = date('Y');
21
+}
20 22
 
21 23
 $Year = new Calendar_Year($_GET['year']);
22 24
 
Please login to merge, or discard this patch.
docs/examples/14.php 1 patch
Braces   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,9 +19,15 @@  discard block
 block discarded – undo
19 19
 require_once CALENDAR_ROOT.'Day.php';
20 20
 
21 21
 // Initialize GET variables if not set
22
-if (!isset($_GET['y'])) $_GET['y'] = date('Y');
23
-if (!isset($_GET['m'])) $_GET['m'] = date('m');
24
-if (!isset($_GET['d'])) $_GET['d'] = date('d');
22
+if (!isset($_GET['y'])) {
23
+    $_GET['y'] = date('Y');
24
+}
25
+if (!isset($_GET['m'])) {
26
+    $_GET['m'] = date('m');
27
+}
28
+if (!isset($_GET['d'])) {
29
+    $_GET['d'] = date('d');
30
+}
25 31
 
26 32
 // Build the month
27 33
 $month = new Calendar_Month_Weekdays($_GET['y'], $_GET['m']);
@@ -107,8 +113,9 @@  discard block
 block discarded – undo
107 113
                 '&d='.$day->thisDay();
108 114
 
109 115
     // isFirst() to find start of week
110
-    if ($day->isFirst())
111
-        echo "<tr>\n";
116
+    if ($day->isFirst()) {
117
+            echo "<tr>\n";
118
+    }
112 119
 
113 120
     if ($day->isSelected()) {
114 121
        echo '<td class="selected">'.$day->thisDay().'</td>'."\n";
Please login to merge, or discard this patch.
docs/examples/6.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,9 +16,15 @@
 block discarded – undo
16 16
 require_once CALENDAR_ROOT.'Month/Weekdays.php';
17 17
 require_once CALENDAR_ROOT.'Day.php';
18 18
 
19
-if (!isset($_GET['y'])) $_GET['y'] = date('Y');
20
-if (!isset($_GET['m'])) $_GET['m'] = date('n');
21
-if (!isset($_GET['d'])) $_GET['d'] = date('j');
19
+if (!isset($_GET['y'])) {
20
+    $_GET['y'] = date('Y');
21
+}
22
+if (!isset($_GET['m'])) {
23
+    $_GET['m'] = date('n');
24
+}
25
+if (!isset($_GET['d'])) {
26
+    $_GET['d'] = date('j');
27
+}
22 28
 
23 29
 $Month = & new Calendar_Month_Weekdays($_GET['y'],$_GET['m']);
24 30
 $Day = & new Calendar_Day($_GET['y'],$_GET['m'],$_GET['d']);
Please login to merge, or discard this patch.
docs/examples/7.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,9 @@
 block discarded – undo
35 35
 
36 36
     function __dispatch($methodname)
37 37
     {
38
-        if (isset($this->__dispatch_map[$methodname]))
39
-            return $this->__dispatch_map[$methodname];
38
+        if (isset($this->__dispatch_map[$methodname])) {
39
+                    return $this->__dispatch_map[$methodname];
40
+        }
40 41
         return NULL;
41 42
     }
42 43
 
Please login to merge, or discard this patch.
docs/examples/16.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,12 @@
 block discarded – undo
8 8
 require_once CALENDAR_ROOT.'Month/Weekdays.php';
9 9
 require_once CALENDAR_ROOT.'Decorator/Uri.php';
10 10
 
11
-if (!isset($_GET['jahr'])) $_GET['jahr'] = date('Y');
12
-if (!isset($_GET['monat'])) $_GET['monat'] = date('m');
11
+if (!isset($_GET['jahr'])) {
12
+    $_GET['jahr'] = date('Y');
13
+}
14
+if (!isset($_GET['monat'])) {
15
+    $_GET['monat'] = date('m');
16
+}
13 17
 
14 18
 // Build the month
15 19
 $Calendar = new Calendar_Month_Weekdays($_GET['jahr'], $_GET['monat']);
Please login to merge, or discard this patch.
docs/examples/1.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,12 +17,24 @@
 block discarded – undo
17 17
     define('CALENDAR_ROOT','../../');
18 18
 }
19 19
 
20
-if (!isset($_GET['y'])) $_GET['y'] = 2003;
21
-if (!isset($_GET['m'])) $_GET['m'] = 8;
22
-if (!isset($_GET['d'])) $_GET['d'] = 9;
23
-if (!isset($_GET['h'])) $_GET['h'] = 12;
24
-if (!isset($_GET['i'])) $_GET['i'] = 34;
25
-if (!isset($_GET['s'])) $_GET['s'] = 46;
20
+if (!isset($_GET['y'])) {
21
+    $_GET['y'] = 2003;
22
+}
23
+if (!isset($_GET['m'])) {
24
+    $_GET['m'] = 8;
25
+}
26
+if (!isset($_GET['d'])) {
27
+    $_GET['d'] = 9;
28
+}
29
+if (!isset($_GET['h'])) {
30
+    $_GET['h'] = 12;
31
+}
32
+if (!isset($_GET['i'])) {
33
+    $_GET['i'] = 34;
34
+}
35
+if (!isset($_GET['s'])) {
36
+    $_GET['s'] = 46;
37
+}
26 38
 
27 39
 switch ( @$_GET['view'] ) {
28 40
     default:
Please login to merge, or discard this patch.
src/Util/Uri.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -118,12 +118,24 @@
 block discarded – undo
118 118
      */
119 119
     function setFragments($y, $m=null, $d=null, $h=null, $i=null, $s=null) 
120 120
     {
121
-        if (!is_null($y)) $this->uris['Year']   = $y;
122
-        if (!is_null($m)) $this->uris['Month']  = $m;
123
-        if (!is_null($d)) $this->uris['Day']    = $d;
124
-        if (!is_null($h)) $this->uris['Hour']   = $h;
125
-        if (!is_null($i)) $this->uris['Minute'] = $i;
126
-        if (!is_null($s)) $this->uris['Second'] = $s;
121
+        if (!is_null($y)) {
122
+            $this->uris['Year']   = $y;
123
+        }
124
+        if (!is_null($m)) {
125
+            $this->uris['Month']  = $m;
126
+        }
127
+        if (!is_null($d)) {
128
+            $this->uris['Day']    = $d;
129
+        }
130
+        if (!is_null($h)) {
131
+            $this->uris['Hour']   = $h;
132
+        }
133
+        if (!is_null($i)) {
134
+            $this->uris['Minute'] = $i;
135
+        }
136
+        if (!is_null($s)) {
137
+            $this->uris['Second'] = $s;
138
+        }
127 139
     }
128 140
 
129 141
     /**
Please login to merge, or discard this patch.