Completed
Pull Request — master (#46)
by
unknown
12:33
created
lib/ResqueScheduler/Worker.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(ticks = 1);
2
+declare(ticks=1);
3 3
 
4 4
 /**
5 5
  * ResqueScheduler worker to handle scheduling of delayed tasks.
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
 		$this->registerSigHandlers();
54 54
 
55 55
 		while (true) {
56
-			if($this->shutdown) {
56
+			if ($this->shutdown) {
57 57
 				break;
58 58
 			}
59
-			if(!$this->paused) {
59
+			if (!$this->paused) {
60 60
 				$this->handleDelayedItems();
61 61
 			}
62 62
 			$this->sleep();
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	{
92 92
 		$item = null;
93 93
 		while ($item = ResqueScheduler::nextItemForTimestamp($timestamp)) {
94
-			$this->log('queueing ' . $item['class'] . ' in ' . $item['queue'] .' [delayed]');
94
+			$this->log('queueing ' . $item['class'] . ' in ' . $item['queue'] . ' [delayed]');
95 95
 
96 96
 			Resque_Event::trigger('beforeDelayedEnqueue', array(
97 97
                 array(
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	 */
126 126
 	private function updateProcLine($status)
127 127
 	{
128
-		if(function_exists('setproctitle')) {
128
+		if (function_exists('setproctitle')) {
129 129
 			setproctitle('resque-scheduler-' . ResqueScheduler::VERSION . ': ' . $status);
130 130
 		}
131 131
 	}
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
 	 */
138 138
 	public function log($message)
139 139
 	{
140
-		if($this->logLevel == self::LOG_NORMAL) {
140
+		if ($this->logLevel == self::LOG_NORMAL) {
141 141
 			fwrite(STDOUT, "*** " . $message . "\n");
142 142
 		}
143
-		else if($this->logLevel == self::LOG_VERBOSE) {
143
+		else if ($this->logLevel == self::LOG_VERBOSE) {
144 144
 			fwrite(STDOUT, "** [" . strftime('%T %Y-%m-%d') . "] " . $message . "\n");
145 145
 		}
146 146
 	}
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 */
155 155
 	private function registerSigHandlers()
156 156
 	{
157
-		if(!function_exists('pcntl_signal')) {
157
+		if (!function_exists('pcntl_signal')) {
158 158
 			return;
159 159
 		}
160 160
 
Please login to merge, or discard this patch.