Completed
Push — master ( cf0c7a...520b04 )
by Jacob
03:43
created
utility/CronController.class.inc.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 
21 21
 	public function activate()
22 22
 	{
23
-		foreach(self::$CRON_ARRAY as $cron => $frequency)
23
+		foreach (self::$CRON_ARRAY as $cron => $frequency)
24 24
 		{
25
-			if(!$this->time_to_run($frequency))
25
+			if (!$this->time_to_run($frequency))
26 26
 				continue;
27 27
 			
28 28
 			Loader::load('utility', "cron/{$cron}");
@@ -46,19 +46,19 @@  discard block
 block discarded – undo
46 46
 		$operator = explode(' ', $frequency);
47 47
 		list($time['minute'], $time['hour'], $time['day'], $time['month'], $time['weekday']) = $operator;
48 48
 		
49
-		foreach($time as $key => $value)
49
+		foreach ($time as $key => $value)
50 50
 		{
51
-			if($value == '*')
51
+			if ($value == '*')
52 52
 				continue;
53
-			if(stristr($value, '/'))
53
+			if (stristr($value, '/'))
54 54
 			{
55 55
 				$value = substr($value, 2);
56
-				if($cur[$key] % $value == 0)
56
+				if ($cur[$key] % $value == 0)
57 57
 					continue;
58 58
 				else
59 59
 					return;
60 60
 			}
61
-			if($cur[$key] == $value)
61
+			if ($cur[$key] == $value)
62 62
 				continue;
63 63
 			return;
64 64
 		}
Please login to merge, or discard this patch.
Braces   +14 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,8 +22,9 @@  discard block
 block discarded – undo
22 22
 	{
23 23
 		foreach(self::$CRON_ARRAY as $cron => $frequency)
24 24
 		{
25
-			if(!$this->time_to_run($frequency))
26
-				continue;
25
+			if(!$this->time_to_run($frequency)) {
26
+							continue;
27
+			}
27 28
 			
28 29
 			Loader::load('utility', "cron/{$cron}");
29 30
 			$reflection = new ReflectionClass($cron);
@@ -48,18 +49,21 @@  discard block
 block discarded – undo
48 49
 		
49 50
 		foreach($time as $key => $value)
50 51
 		{
51
-			if($value == '*')
52
-				continue;
52
+			if($value == '*') {
53
+							continue;
54
+			}
53 55
 			if(stristr($value, '/'))
54 56
 			{
55 57
 				$value = substr($value, 2);
56
-				if($cur[$key] % $value == 0)
57
-					continue;
58
-				else
59
-					return;
58
+				if($cur[$key] % $value == 0) {
59
+									continue;
60
+				} else {
61
+									return;
62
+				}
60 63
 			}
61
-			if($cur[$key] == $value)
62
-				continue;
64
+			if($cur[$key] == $value) {
65
+							continue;
66
+			}
63 67
 			return;
64 68
 		}
65 69
 		return true;
Please login to merge, or discard this patch.