Completed
Push — develop ( 4b3d97...3f9224 )
by John
05:11 queued 02:38
created
Alpha/Controller/CacheController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
 
208 208
             if (isset($params['clearCache']) && $params['clearCache'] == 'true') {
209 209
                 try {
210
-                    FileUtils::deleteDirectoryContents($this->dataDir, array('.htaccess','html','images','pdf','xls'));
210
+                    FileUtils::deleteDirectoryContents($this->dataDir, array('.htaccess', 'html', 'images', 'pdf', 'xls'));
211 211
 
212 212
                     $this->setStatusMessage(View::displayUpdateMessage('Cache contents deleted successfully.'));
213 213
 
Please login to merge, or discard this patch.
Alpha/Controller/Controller.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -511,19 +511,19 @@  discard block
 block discarded – undo
511 511
             }
512 512
             // found the current job
513 513
             if ($this->name == $jobs[$i]) {
514
-                if (isset($jobs[$i - 1])) {
514
+                if (isset($jobs[$i-1])) {
515 515
                     // set the previous job if it exists
516
-                    $this->previousJob = $jobs[$i - 1];
516
+                    $this->previousJob = $jobs[$i-1];
517 517
                     self::$logger->debug('Previous job ['.$this->previousJob.']');
518 518
                 }
519
-                if (isset($jobs[$i + 1])) {
519
+                if (isset($jobs[$i+1])) {
520 520
                     // set the next job if it exists
521
-                    $this->nextJob = $jobs[$i + 1];
521
+                    $this->nextJob = $jobs[$i+1];
522 522
                     self::$logger->debug('Next job ['.$this->nextJob.']');
523 523
                 }
524 524
             }
525 525
             // the last job in the sequence
526
-            if ($i == ($numOfJobs - 1)) {
526
+            if ($i == ($numOfJobs-1)) {
527 527
                 $this->lastJob = $jobs[$i];
528 528
             }
529 529
         }
@@ -687,9 +687,9 @@  discard block
 block discarded – undo
687 687
             $this->unitEndTime->getYear()
688 688
             );
689 689
 
690
-        self::$logger->debug('<<getUnitDuration ['.$intEndTime - $intStartTime.']');
690
+        self::$logger->debug('<<getUnitDuration ['.$intEndTime-$intStartTime.']');
691 691
 
692
-        return $intEndTime - $intStartTime;
692
+        return $intEndTime-$intStartTime;
693 693
     }
694 694
 
695 695
     /**
@@ -1159,7 +1159,7 @@  discard block
 block discarded – undo
1159 1159
              */
1160 1160
 
1161 1161
             // the server hostname + today's date less 1 hour (i.e. yesterday where time is < 1:00AM)
1162
-            $var1 = rtrim(strtr(base64_encode(SecurityUtils::encrypt($host.date('Ymd', (time() - 3600)))), '+/', '-_'), '=');
1162
+            $var1 = rtrim(strtr(base64_encode(SecurityUtils::encrypt($host.date('Ymd', (time()-3600)))), '+/', '-_'), '=');
1163 1163
             // the server's IP plus $var1
1164 1164
             $var2 = rtrim(strtr(base64_encode(SecurityUtils::encrypt($ip.$var1)), '+/', '-_'), '=');
1165 1165
 
Please login to merge, or discard this patch.
Alpha/Controller/SearchController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         $config = ConfigProvider::getInstance();
200 200
 
201 201
         // used to track when our pagination range ends
202
-        $end = ($this->startPoint + $config->get('app.list.page.amount'));
202
+        $end = ($this->startPoint+$config->get('app.list.page.amount'));
203 203
 
204 204
         $body = '';
205 205
 
@@ -289,14 +289,14 @@  discard block
 block discarded – undo
289 289
 
290 290
         $body = '';
291 291
 
292
-        $end = ($this->startPoint + $config->get('app.list.page.amount'));
292
+        $end = ($this->startPoint+$config->get('app.list.page.amount'));
293 293
 
294 294
         if ($end > $this->resultCount) {
295 295
             $end = $this->resultCount;
296 296
         }
297 297
 
298 298
         if ($this->resultCount > 0) {
299
-            $body .= '<p align="center">Displaying '.($this->startPoint + 1).' to '.$end.' of <strong>'.$this->resultCount.'</strong>.&nbsp;&nbsp;';
299
+            $body .= '<p align="center">Displaying '.($this->startPoint+1).' to '.$end.' of <strong>'.$this->resultCount.'</strong>.&nbsp;&nbsp;';
300 300
         } else {
301 301
             if (!empty($this->query)) {
302 302
                 $body .= View::displayUpdateMessage('There were no search results for your query.');
@@ -308,9 +308,9 @@  discard block
 block discarded – undo
308 308
         if ($this->startPoint > 0) {
309 309
             // handle secure URLs
310 310
             if (isset($params['tk'])) {
311
-                $body .= '<li><a href="'.FrontController::generateSecureURL('act=Search&q='.$this->query.'&start='.($this->startPoint - $config->get('app.list.page.amount'))).'">&laquo;</a></li>';
311
+                $body .= '<li><a href="'.FrontController::generateSecureURL('act=Search&q='.$this->query.'&start='.($this->startPoint-$config->get('app.list.page.amount'))).'">&laquo;</a></li>';
312 312
             } else {
313
-                $body .= '<li><a href="'.$config->get('app.url').'/search/'.$this->query.'/'.($this->startPoint - $config->get('app.list.page.amount')).'">&laquo;</a></li>';
313
+                $body .= '<li><a href="'.$config->get('app.url').'/search/'.$this->query.'/'.($this->startPoint-$config->get('app.list.page.amount')).'">&laquo;</a></li>';
314 314
             }
315 315
         } elseif ($this->resultCount > $config->get('app.list.page.amount')) {
316 316
             $body .= '<li class="disabled"><a href="#">&laquo;</a></li>';
@@ -336,9 +336,9 @@  discard block
 block discarded – undo
336 336
         if ($this->resultCount > $end) {
337 337
             // handle secure URLs
338 338
             if (isset($params['tk'])) {
339
-                $body .= '<li><a href="'.FrontController::generateSecureURL('act=Search&q='.$this->query.'&start='.($this->startPoint + $config->get('app.list.page.amount'))).'">Next-&gt;&gt;</a></li>';
339
+                $body .= '<li><a href="'.FrontController::generateSecureURL('act=Search&q='.$this->query.'&start='.($this->startPoint+$config->get('app.list.page.amount'))).'">Next-&gt;&gt;</a></li>';
340 340
             } else {
341
-                $body .= '<li><a href="'.$config->get('app.url').'/search/'.$this->query.'/'.($this->startPoint + $config->get('app.list.page.amount')).'">&raquo;</a></li>';
341
+                $body .= '<li><a href="'.$config->get('app.url').'/search/'.$this->query.'/'.($this->startPoint+$config->get('app.list.page.amount')).'">&raquo;</a></li>';
342 342
             }
343 343
         } elseif ($this->resultCount > $config->get('app.list.page.amount')) {
344 344
             $body .= '<li class="disabled"><a href="#">&raquo;</a></li>';
Please login to merge, or discard this patch.
Alpha/Util/Extension/MarkdownFacade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         foreach ($attachments[0] as $attachmentURL) {
123 123
             $start = mb_strpos($attachmentURL, '/');
124 124
             $end = mb_strrpos($attachmentURL, '"');
125
-            $fileName = mb_substr($attachmentURL, $start + 1, $end - ($start + 1));
125
+            $fileName = mb_substr($attachmentURL, $start+1, $end-($start+1));
126 126
 
127 127
             if (method_exists($this->BO, 'getAttachmentSecureURL')) {
128 128
                 $this->content = str_replace($attachmentURL, 'href="'.$this->BO->getAttachmentSecureURL($fileName).'" rel="nofollow"', $this->content);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
                     $type = 'png';
151 151
                 }
152 152
 
153
-                $img = new Image($path, $image_details[0], $image_details[1], $type, 0.95, false, (boolean) $config->get('cms.images.widget.secure'));
153
+                $img = new Image($path, $image_details[0], $image_details[1], $type, 0.95, false, (boolean)$config->get('cms.images.widget.secure'));
154 154
 
155 155
                 $this->content = str_replace($attachmentURL, $img->renderHTMLLink(), $this->content);
156 156
             } else {
Please login to merge, or discard this patch.
Alpha/Util/Security/SecurityUtils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
             $iv
73 73
         );
74 74
 
75
-        return $iv . $encryptedData;
75
+        return $iv.$encryptedData;
76 76
     }
77 77
 
78 78
     /**
Please login to merge, or discard this patch.
Alpha/Util/Logging/LogProviderFile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
         clearstatcache();
147 147
         $size = filesize($this->path);
148 148
 
149
-        return ($size / 1024) /1024;
149
+        return ($size/1024)/1024;
150 150
     }
151 151
 
152 152
     /**
Please login to merge, or discard this patch.
Alpha/Model/Type/Timestamp.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -629,15 +629,15 @@
 block discarded – undo
629 629
         $unixTS = $this->getUnixValue();
630 630
 
631 631
         if ($now > $unixTS) {
632
-            $difference = $now - $unixTS;
632
+            $difference = $now-$unixTS;
633 633
             $tense = 'ago';
634 634
         } else {
635
-            $difference = $unixTS - $now;
635
+            $difference = $unixTS-$now;
636 636
             $tense = 'from now';
637 637
         }
638 638
 
639
-        for ($i = 0; $difference >= $lengths[$i] && $i < count($lengths) - 1; ++$i) {
640
-            $difference = round($difference / $lengths[$i]);
639
+        for ($i = 0; $difference >= $lengths[$i] && $i < count($lengths)-1; ++$i) {
640
+            $difference = round($difference/$lengths[$i]);
641 641
         }
642 642
 
643 643
         $difference = round($difference);
Please login to merge, or discard this patch.
Alpha/Controller/Front/FrontController.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -175,145 +175,145 @@  discard block
 block discarded – undo
175 175
             throw new BadRequestException('Request character encoding does not match expected UTF-8');
176 176
         }
177 177
 
178
-        $this->addRoute('/', function ($request) {
178
+        $this->addRoute('/', function($request) {
179 179
             $controller = new IndexController();
180 180
 
181 181
             return $controller->process($request);
182 182
         });
183 183
 
184
-        $this->addRoute('/a/{title}/{view}', function ($request) {
184
+        $this->addRoute('/a/{title}/{view}', function($request) {
185 185
             $controller = new ArticleController();
186 186
 
187 187
             return $controller->process($request);
188 188
         })->value('title', null)->value('view', 'detailed');
189 189
 
190
-        $this->addRoute('/articles/{start}/{limit}', function ($request) {
190
+        $this->addRoute('/articles/{start}/{limit}', function($request) {
191 191
             $controller = new ArticleController();
192 192
 
193 193
             return $controller->process($request);
194 194
         })->value('start', 0)->value('limit', $config->get('app.list.page.amount'));
195 195
 
196
-        $this->addRoute('/attach/{articleOID}/{filename}', function ($request) {
196
+        $this->addRoute('/attach/{articleOID}/{filename}', function($request) {
197 197
             $controller = new AttachmentController();
198 198
 
199 199
             return $controller->process($request);
200 200
         });
201 201
 
202
-        $this->addRoute('/cache', function ($request) {
202
+        $this->addRoute('/cache', function($request) {
203 203
             $controller = new CacheController();
204 204
 
205 205
             return $controller->process($request);
206 206
         });
207 207
 
208
-        $this->addRoute('/denum/{denumOID}', function ($request) {
208
+        $this->addRoute('/denum/{denumOID}', function($request) {
209 209
             $controller = new DEnumController();
210 210
 
211 211
             return $controller->process($request);
212 212
         })->value('denumOID', null);
213 213
 
214
-        $this->addRoute('/excel/{ActiveRecordType}/{ActiveRecordOID}', function ($request) {
214
+        $this->addRoute('/excel/{ActiveRecordType}/{ActiveRecordOID}', function($request) {
215 215
             $controller = new ExcelController();
216 216
 
217 217
             return $controller->process($request);
218 218
         })->value('ActiveRecordOID', null);
219 219
 
220
-        $this->addRoute('/feed/{ActiveRecordType}/{type}', function ($request) {
220
+        $this->addRoute('/feed/{ActiveRecordType}/{type}', function($request) {
221 221
             $controller = new FeedController();
222 222
 
223 223
             return $controller->process($request);
224 224
         })->value('type', 'Atom');
225 225
 
226
-        $this->addRoute('/gensecure', function ($request) {
226
+        $this->addRoute('/gensecure', function($request) {
227 227
             $controller = new GenSecureQueryStringController();
228 228
 
229 229
             return $controller->process($request);
230 230
         });
231 231
 
232
-        $this->addRoute('/image/{source}/{width}/{height}/{type}/{quality}/{scale}/{secure}/{var1}/{var2}', function ($request) {
232
+        $this->addRoute('/image/{source}/{width}/{height}/{type}/{quality}/{scale}/{secure}/{var1}/{var2}', function($request) {
233 233
             $controller = new ImageController();
234 234
 
235 235
             return $controller->process($request);
236 236
         })->value('var1', null)->value('var2', null);
237 237
 
238
-        $this->addRoute('/listactiverecords', function ($request) {
238
+        $this->addRoute('/listactiverecords', function($request) {
239 239
             $controller = new ListActiveRecordsController();
240 240
 
241 241
             return $controller->process($request);
242 242
         });
243 243
 
244
-        $this->addRoute('/log/{logPath}', function ($request) {
244
+        $this->addRoute('/log/{logPath}', function($request) {
245 245
             $controller = new LogController();
246 246
 
247 247
             return $controller->process($request);
248 248
         });
249 249
 
250
-        $this->addRoute('/login', function ($request) {
250
+        $this->addRoute('/login', function($request) {
251 251
             $controller = new LoginController();
252 252
 
253 253
             return $controller->process($request);
254 254
         });
255 255
 
256
-        $this->addRoute('/logout', function ($request) {
256
+        $this->addRoute('/logout', function($request) {
257 257
             $controller = new LogoutController();
258 258
 
259 259
             return $controller->process($request);
260 260
         });
261 261
 
262
-        $this->addRoute('/metric', function ($request) {
262
+        $this->addRoute('/metric', function($request) {
263 263
             $controller = new MetricController();
264 264
 
265 265
             return $controller->process($request);
266 266
         });
267 267
 
268
-        $this->addRoute('/recordselector/12m/{ActiveRecordOID}/{field}/{relatedClass}/{relatedClassField}/{relatedClassDisplayField}/{relationType}', function ($request) {
268
+        $this->addRoute('/recordselector/12m/{ActiveRecordOID}/{field}/{relatedClass}/{relatedClassField}/{relatedClassDisplayField}/{relationType}', function($request) {
269 269
             $controller = new RecordSelectorController();
270 270
 
271 271
             return $controller->process($request);
272 272
         })->value('relationType', 'ONE-TO-MANY');
273 273
 
274
-        $this->addRoute('/recordselector/m2m/{ActiveRecordOID}/{field}/{relatedClassLeft}/{relatedClassLeftDisplayField}/{relatedClassRight}/{relatedClassRightDisplayField}/{accessingClassName}/{lookupOIDs}/{relationType}', function ($request) {
274
+        $this->addRoute('/recordselector/m2m/{ActiveRecordOID}/{field}/{relatedClassLeft}/{relatedClassLeftDisplayField}/{relatedClassRight}/{relatedClassRightDisplayField}/{accessingClassName}/{lookupOIDs}/{relationType}', function($request) {
275 275
             $controller = new RecordSelectorController();
276 276
 
277 277
             return $controller->process($request);
278 278
         })->value('relationType', 'MANY-TO-MANY');
279 279
 
280
-        $this->addRoute('/search/{query}/{start}/{limit}', function ($request) {
280
+        $this->addRoute('/search/{query}/{start}/{limit}', function($request) {
281 281
             $controller = new SearchController();
282 282
 
283 283
             return $controller->process($request);
284 284
         })->value('start', 0)->value('limit', $config->get('app.list.page.amount'));
285 285
 
286
-        $this->addRoute('/sequence/{start}/{limit}', function ($request) {
286
+        $this->addRoute('/sequence/{start}/{limit}', function($request) {
287 287
             $controller = new SequenceController();
288 288
 
289 289
             return $controller->process($request);
290 290
         })->value('start', 0)->value('limit', $config->get('app.list.page.amount'));
291 291
 
292
-        $this->addRoute('/tag/{ActiveRecordType}/{ActiveRecordOID}', function ($request) {
292
+        $this->addRoute('/tag/{ActiveRecordType}/{ActiveRecordOID}', function($request) {
293 293
             $controller = new TagController();
294 294
 
295 295
             return $controller->process($request);
296 296
         });
297 297
 
298
-        $this->addRoute('/install', function ($request) {
298
+        $this->addRoute('/install', function($request) {
299 299
             $controller = new InstallController();
300 300
 
301 301
             return $controller->process($request);
302 302
         });
303 303
 
304
-        $this->addRoute('/record/{ActiveRecordType}/{ActiveRecordOID}/{view}', function ($request) {
304
+        $this->addRoute('/record/{ActiveRecordType}/{ActiveRecordOID}/{view}', function($request) {
305 305
             $controller = new ActiveRecordController();
306 306
 
307 307
             return $controller->process($request);
308 308
         })->value('ActiveRecordOID', null)->value('view', 'detailed');
309 309
 
310
-        $this->addRoute('/records/{ActiveRecordType}/{start}/{limit}', function ($request) {
310
+        $this->addRoute('/records/{ActiveRecordType}/{start}/{limit}', function($request) {
311 311
             $controller = new ActiveRecordController();
312 312
 
313 313
             return $controller->process($request);
314 314
         })->value('start', 0)->value('limit', $config->get('app.list.page.amount'));
315 315
 
316
-        $this->addRoute('/tk/{token}', function ($request) {
316
+        $this->addRoute('/tk/{token}', function($request) {
317 317
             $params = self::getDecodeQueryParams($request->getParam('token'));
318 318
 
319 319
             if (isset($params['act'])) {
@@ -340,14 +340,14 @@  discard block
 block discarded – undo
340 340
             return new Response(404, 'Resource not found');
341 341
         });
342 342
 
343
-        $this->addRoute('/alpha/service', function ($request) {
343
+        $this->addRoute('/alpha/service', function($request) {
344 344
             $controller = new LoginController();
345 345
             $controller->setUnitOfWork(array('Alpha\Controller\LoginController', 'Alpha\Controller\ListActiveRecordsController'));
346 346
 
347 347
             return $controller->process($request);
348 348
         });
349 349
 
350
-        $this->addRoute('/phpinfo', function ($request) {
350
+        $this->addRoute('/phpinfo', function($request) {
351 351
             $controller = new PhpinfoController();
352 352
 
353 353
             return $controller->process($request);
Please login to merge, or discard this patch.
Alpha/Util/Extension/Markdown.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         if (isset($codeTypeTag[0])) {
76 76
             $start = mb_strpos($codeTypeTag[0], '[');
77 77
             $end = mb_strpos($codeTypeTag[0], ']');
78
-            $language = mb_substr($codeTypeTag[0], $start + 1, $end - ($start + 1));
78
+            $language = mb_substr($codeTypeTag[0], $start+1, $end-($start+1));
79 79
         } else {
80 80
             // will use php as a default language type when none is provided
81 81
             $language = 'php';
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
     {
107 107
         $config = ConfigProvider::getInstance();
108 108
 
109
-        $whole_match    =  $matches[1];
110
-        $link_text      =  $this->runSpanGamut($matches[2]);
111
-        $url            =  $matches[3] == '' ? $matches[4] : $matches[3];
112
-        $title          =& $matches[7];
113
-        $attr  = $this->doExtraAttributes("a", $dummy =& $matches[8]);
109
+        $whole_match    = $matches[1];
110
+        $link_text      = $this->runSpanGamut($matches[2]);
111
+        $url            = $matches[3] == '' ? $matches[4] : $matches[3];
112
+        $title          = & $matches[7];
113
+        $attr = $this->doExtraAttributes("a", $dummy = & $matches[8]);
114 114
 
115 115
         $external = false;
116 116
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $result = "<a href=\"$url\"";
133 133
         if (isset($title)) {
134 134
             $title = $this->encodeAttribute($title);
135
-            $result .=  " title=\"$title\"";
135
+            $result .= " title=\"$title\"";
136 136
         }
137 137
         if ($external) {
138 138
             $result .= " target=\"$url\"";
@@ -214,6 +214,6 @@  discard block
 block discarded – undo
214 214
         $text .= "</tbody>\n";
215 215
         $text .= "</table>";
216 216
         
217
-        return $this->hashBlock($text) . "\n";
217
+        return $this->hashBlock($text)."\n";
218 218
     }
219 219
 }
Please login to merge, or discard this patch.