Completed
Push — master ( a21b67...ec1681 )
by Michael
02:43
created
class/pear/Calendar/tests/month_weeks_test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./calendar_test.php';
7
+require_once __DIR__.'/./calendar_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfMonthWeeks.
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     */
148 148
     public function testSelection()
149 149
     {
150
-        require_once CALENDAR_ROOT . 'Week.php';
150
+        require_once CALENDAR_ROOT.'Week.php';
151 151
         $selection = array(new Calendar_Week(2003, 10, 12));
152 152
         $this->cal->build($selection);
153 153
         $i        = 1;
Please login to merge, or discard this patch.
class/pear/Calendar/tests/hour_test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./calendar_test.php';
7
+require_once __DIR__.'/./calendar_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfHour.
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
     public function testSelection()
118 118
     {
119
-        require_once CALENDAR_ROOT . 'Minute.php';
119
+        require_once CALENDAR_ROOT.'Minute.php';
120 120
         $selection = array(new Calendar_Minute(2003, 10, 25, 13, 32));
121 121
         $this->cal->build($selection);
122 122
         $i = 0;
Please login to merge, or discard this patch.
class/pear/Calendar/tests/minute_test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./calendar_test.php';
7
+require_once __DIR__.'/./calendar_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfMinute.
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
     public function testSelection()
113 113
     {
114
-        require_once CALENDAR_ROOT . 'Second.php';
114
+        require_once CALENDAR_ROOT.'Second.php';
115 115
         $selection = array(new Calendar_Second(2003, 10, 25, 13, 32, 43));
116 116
         $this->cal->build($selection);
117 117
         $i = 0;
Please login to merge, or discard this patch.
class/pear/Calendar/tests/table_helper_tests.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7 7
 /**
8 8
  * Class TableHelperTests.
Please login to merge, or discard this patch.
class/pear/Calendar/tests/calendar_tests.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7 7
 /**
8 8
  * Class CalendarTests.
Please login to merge, or discard this patch.
class/pear/Calendar/tests/decorator_uri_test.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./decorator_test.php';
7
+require_once __DIR__.'/./decorator_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfDecoratorUri.
Please login to merge, or discard this patch.
class/pear/Calendar/tests/util_tests.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7 7
 /**
8 8
  * Class UtilTests.
Please login to merge, or discard this patch.
class/pear/Calendar/tests/day_test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./calendar_test.php';
7
+require_once __DIR__.'/./calendar_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfDay.
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
     public function testSelection()
133 133
     {
134
-        require_once CALENDAR_ROOT . 'Hour.php';
134
+        require_once CALENDAR_ROOT.'Hour.php';
135 135
         $selection = array(new Calendar_Hour(2003, 10, 25, 13));
136 136
         $this->cal->build($selection);
137 137
         $i = 0;
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/1.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 {
9 9
     list($usec, $sec) = explode(' ', microtime());
10 10
 
11
-    return (float)$usec + (float)$sec;
11
+    return (float) $usec + (float) $sec;
12 12
 }
13 13
 
14 14
 if (!@include 'Calendar/Calendar.php') {
@@ -38,33 +38,33 @@  discard block
 block discarded – undo
38 38
     default:
39 39
         $_GET['view'] = 'calendar_year';
40 40
     case 'calendar_year':
41
-        require_once CALENDAR_ROOT . 'Year.php';
41
+        require_once CALENDAR_ROOT.'Year.php';
42 42
         $c = new Calendar_Year($_GET['y']);
43 43
         break;
44 44
     case 'calendar_month':
45
-        require_once CALENDAR_ROOT . 'Month.php';
45
+        require_once CALENDAR_ROOT.'Month.php';
46 46
         $c = new Calendar_Month($_GET['y'], $_GET['m']);
47 47
         break;
48 48
     case 'calendar_day':
49
-        require_once CALENDAR_ROOT . 'Day.php';
49
+        require_once CALENDAR_ROOT.'Day.php';
50 50
         $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
51 51
         break;
52 52
     case 'calendar_hour':
53
-        require_once CALENDAR_ROOT . 'Hour.php';
53
+        require_once CALENDAR_ROOT.'Hour.php';
54 54
         $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
55 55
         break;
56 56
     case 'calendar_minute':
57
-        require_once CALENDAR_ROOT . 'Minute.php';
57
+        require_once CALENDAR_ROOT.'Minute.php';
58 58
         $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
59 59
         break;
60 60
     case 'calendar_second':
61
-        require_once CALENDAR_ROOT . 'Second.php';
61
+        require_once CALENDAR_ROOT.'Second.php';
62 62
         $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
63 63
         break;
64 64
 }
65 65
 
66
-echo 'Viewing: ' . @$_GET['view'] . '<br>';
67
-echo 'The time is now: ' . date('Y M d H:i:s', $c->getTimestamp()) . '<br >';
66
+echo 'Viewing: '.@$_GET['view'].'<br>';
67
+echo 'The time is now: '.date('Y M d H:i:s', $c->getTimestamp()).'<br >';
68 68
 
69 69
 $i = 1;
70 70
 echo '<h1>First Iteration</h1>';
@@ -74,15 +74,15 @@  discard block
 block discarded – undo
74 74
 $c->build();
75 75
 while ($e = $c->fetch()) {
76 76
     $class  = strtolower(get_class($e));
77
-    $link   = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond();
78
-    $method = 'this' . str_replace('calendar_', '', $class);
79
-    echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : ';
77
+    $link   = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond();
78
+    $method = 'this'.str_replace('calendar_', '', $class);
79
+    echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : ';
80 80
     if (($i % 10) == 0) {
81 81
         echo '<br>';
82 82
     }
83 83
     ++$i;
84 84
 }
85
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
85
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
86 86
 
87 87
 $i = 1;
88 88
 echo '<h1>Second Iteration</h1>';
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
 $start = getmicrotime();
92 92
 while ($e = $c->fetch()) {
93 93
     $class  = strtolower(get_class($e));
94
-    $link   = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond();
95
-    $method = 'this' . str_replace('calendar_', '', $class);
96
-    echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : ';
94
+    $link   = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond();
95
+    $method = 'this'.str_replace('calendar_', '', $class);
96
+    echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : ';
97 97
     if (($i % 10) == 0) {
98 98
         echo '<br>';
99 99
     }
100 100
     ++$i;
101 101
 }
102
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
102
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
Please login to merge, or discard this patch.