Completed
Push — develop ( 795b8e...10bf90 )
by John
03:38
created
phpunit.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,19 +9,19 @@
 block discarded – undo
9 9
 $config = ConfigProvider::getInstance();
10 10
 
11 11
 $dirs = array(
12
-	$config->get('app.file.store.dir').'logs',
13
-	$config->get('app.file.store.dir').'cache',
14
-	$config->get('app.file.store.dir').'cache/html',
15
-	$config->get('app.file.store.dir').'cache/images',
16
-	$config->get('app.file.store.dir').'cache/pdf',
17
-	$config->get('app.file.store.dir').'cache/xls',
18
-	$config->get('app.file.store.dir').'attachments',
19
-	);
12
+    $config->get('app.file.store.dir').'logs',
13
+    $config->get('app.file.store.dir').'cache',
14
+    $config->get('app.file.store.dir').'cache/html',
15
+    $config->get('app.file.store.dir').'cache/images',
16
+    $config->get('app.file.store.dir').'cache/pdf',
17
+    $config->get('app.file.store.dir').'cache/xls',
18
+    $config->get('app.file.store.dir').'attachments',
19
+    );
20 20
 
21 21
 foreach ($dirs as $dir) {
22
-	if (!file_exists($dir)) {
23
-		mkdir($dir, 0774);
24
-	}
22
+    if (!file_exists($dir)) {
23
+        mkdir($dir, 0774);
24
+    }
25 25
 }
26 26
 
27 27
 ?>
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
Alpha/View/Renderer/Html/RendererProviderHTML.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         // work out how many columns will be in the table
219 219
         $reflection = new ReflectionClass(get_class($this->BO));
220 220
         $properties = array_keys($reflection->getDefaultProperties());
221
-        $fields['colCount'] = 1 + count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes()));
221
+        $fields['colCount'] = 1+count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes()));
222 222
 
223 223
         // get the class attributes
224 224
         $properties = $reflection->getProperties();
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                     $html .= '  <th>'.$this->BO->getDataLabel($propName).'</th>';
240 240
                 }
241 241
             } else {
242
-                $fields['colCount'] = $fields['colCount'] - 1;
242
+                $fields['colCount'] = $fields['colCount']-1;
243 243
             }
244 244
         }
245 245
         $html .= '</tr><tr>';
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
                 if ($viewState->get('markdownTextBoxRows') == '') {
1010 1010
                     $text = new TextBox($this->BO->getPropObject($name), $label, $name, 10);
1011 1011
                 } else {
1012
-                    $text = new TextBox($this->BO->getPropObject($name), $label, $name, (integer) $viewState->get('markdownTextBoxRows'));
1012
+                    $text = new TextBox($this->BO->getPropObject($name), $label, $name, (integer)$viewState->get('markdownTextBoxRows'));
1013 1013
                 }
1014 1014
 
1015 1015
                 $html .= $text->render();
Please login to merge, or discard this patch.
Alpha/View/SequenceView.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         // work out how many columns will be in the table
104 104
         $reflection = new \ReflectionClass(get_class($this->BO));
105 105
         $properties = array_keys($reflection->getDefaultProperties());
106
-        $fields['colCount'] = 1 + count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes()));
106
+        $fields['colCount'] = 1+count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes()));
107 107
 
108 108
         // get the class attributes
109 109
         $properties = $reflection->getProperties();
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                     $html .= '  <th>'.$this->BO->getDataLabel($propName).'</th>';
125 125
                 }
126 126
             } else {
127
-                $fields['colCount'] = $fields['colCount'] - 1;
127
+                $fields['colCount'] = $fields['colCount']-1;
128 128
             }
129 129
         }
130 130
         $html .= '</tr><tr>';
Please login to merge, or discard this patch.
Alpha/View/Widget/Image.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
             }
243 243
         } else {
244 244
             // make a cache dir for the article
245
-            $cacheDir = $config->get('app.file.store.dir').'cache/images/article_'.mb_substr($this->source, mb_strpos($this->source, 'attachments/article_') + 20, 11);
245
+            $cacheDir = $config->get('app.file.store.dir').'cache/images/article_'.mb_substr($this->source, mb_strpos($this->source, 'attachments/article_')+20, 11);
246 246
             if (!file_exists($cacheDir)) {
247 247
                 $success = mkdir($cacheDir);
248 248
 
@@ -300,11 +300,11 @@  discard block
 block discarded – undo
300 300
             $targetScreenY = $targetScreenResolution[1];
301 301
 
302 302
             // calculate the new units we will scale by
303
-            $xu = $targetScreenX / $originalScreenX;
304
-            $yu = $targetScreenY / $originalScreenY;
303
+            $xu = $targetScreenX/$originalScreenX;
304
+            $yu = $targetScreenY/$originalScreenY;
305 305
 
306
-            $this->width = new Integer(intval($this->width->getValue() * $xu));
307
-            $this->height = new Integer(intval($this->height->getValue() * $yu));
306
+            $this->width = new Integer(intval($this->width->getValue()*$xu));
307
+            $this->height = new Integer(intval($this->height->getValue()*$yu));
308 308
 
309 309
             // need to update the cache filename as the dimensions have changed
310 310
             $this->setFilename();
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
                 if ($this->sourceType->getValue() == 'png' && $config->get('cms.images.perserve.png')) {
369 369
                     imagepng($new_image);
370 370
                 } else {
371
-                    imagejpeg($new_image, null, 100 * $this->quality->getValue());
371
+                    imagejpeg($new_image, null, 100*$this->quality->getValue());
372 372
                 }
373 373
 
374 374
                 $this->cache($new_image);
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
         if ($this->sourceType->getValue() == 'png' && $config->get('cms.images.perserve.png')) {
393 393
             imagepng($image, $this->filename);
394 394
         } else {
395
-            imagejpeg($image, $this->filename, 100 * $this->quality->getValue());
395
+            imagejpeg($image, $this->filename, 100*$this->quality->getValue());
396 396
         }
397 397
     }
398 398
 
Please login to merge, or discard this patch.
Alpha/View/DEnumView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
 
112 112
         $html .= '</tr>';
113 113
 
114
-        $html .= '<tr><td colspan="'.($colCount + 1).'" style="text-align:center;">';
114
+        $html .= '<tr><td colspan="'.($colCount+1).'" style="text-align:center;">';
115 115
         // render edit buttons for admins only
116 116
         if ($session->get('currentUser') != null && $session->get('currentUser')->inGroup('Admin')) {
117 117
             $html .= '&nbsp;&nbsp;';
Please login to merge, or discard this patch.
Alpha/View/ArticleView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@
 block discarded – undo
218 218
 
219 219
                     $html .= '<tr>';
220 220
 
221
-                    $html .= '<td>'.$file.' <em>('.number_format(filesize($this->BO->getAttachmentsLocation().'/'.$file) / 1024).' KB)</em></td>';
221
+                    $html .= '<td>'.$file.' <em>('.number_format(filesize($this->BO->getAttachmentsLocation().'/'.$file)/1024).' KB)</em></td>';
222 222
 
223 223
                     $js = "if(window.jQuery) {
224 224
                             BootstrapDialog.show({
Please login to merge, or discard this patch.
Alpha/Task/CronManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             $task = new $taskClass();
86 86
 
87 87
             $startTime = microtime(true);
88
-            $maxAllowedTime = $startTime + $task->getMaxRunTime();
88
+            $maxAllowedTime = $startTime+$task->getMaxRunTime();
89 89
 
90 90
             self::$logger->info('Start time is ['.$startTime.'], maximum task run time is ['.$task->getMaxRunTime().']');
91 91
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             set_time_limit($task->getMaxRunTime());
94 94
             $task->doTask();
95 95
 
96
-            self::$logger->info('Done in ['.round(microtime(true) - $startTime, 5).'] seconds');
96
+            self::$logger->info('Done in ['.round(microtime(true)-$startTime, 5).'] seconds');
97 97
         }
98 98
 
99 99
         self::$logger->info('Finished processing all cron tasks');
Please login to merge, or discard this patch.
Alpha/Controller/Front/FrontController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -615,7 +615,7 @@
 block discarded – undo
615 615
                 }
616 616
             }
617 617
 
618
-             // route URIs with params missing (will attempt to layer on defaults later on in Request class)
618
+                // route URIs with params missing (will attempt to layer on defaults later on in Request class)
619 619
             foreach ($this->routes as $route => $callback) {
620 620
                 $pattern = '#^'.$route.'$#s';
621 621
                 $pattern = preg_replace('#\/\{\S+\}#', '\/?', $pattern);
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -176,145 +176,145 @@  discard block
 block discarded – undo
176 176
             throw new BadRequestException('Request character encoding does not match expected UTF-8');
177 177
         }
178 178
 
179
-        $this->addRoute('/', function ($request) {
179
+        $this->addRoute('/', function($request) {
180 180
             $controller = new IndexController();
181 181
 
182 182
             return $controller->process($request);
183 183
         });
184 184
 
185
-        $this->addRoute('/a/{title}/{view}', function ($request) {
185
+        $this->addRoute('/a/{title}/{view}', function($request) {
186 186
             $controller = new ArticleController();
187 187
 
188 188
             return $controller->process($request);
189 189
         })->value('title', null)->value('view', 'detailed');
190 190
 
191
-        $this->addRoute('/articles/{start}/{limit}', function ($request) {
191
+        $this->addRoute('/articles/{start}/{limit}', function($request) {
192 192
             $controller = new ArticleController();
193 193
 
194 194
             return $controller->process($request);
195 195
         })->value('start', 0)->value('limit', $config->get('app.list.page.amount'));
196 196
 
197
-        $this->addRoute('/attach/{articleOID}/{filename}', function ($request) {
197
+        $this->addRoute('/attach/{articleOID}/{filename}', function($request) {
198 198
             $controller = new AttachmentController();
199 199
 
200 200
             return $controller->process($request);
201 201
         });
202 202
 
203
-        $this->addRoute('/cache', function ($request) {
203
+        $this->addRoute('/cache', function($request) {
204 204
             $controller = new CacheController();
205 205
 
206 206
             return $controller->process($request);
207 207
         });
208 208
 
209
-        $this->addRoute('/denum/{denumOID}', function ($request) {
209
+        $this->addRoute('/denum/{denumOID}', function($request) {
210 210
             $controller = new DEnumController();
211 211
 
212 212
             return $controller->process($request);
213 213
         })->value('denumOID', null);
214 214
 
215
-        $this->addRoute('/excel/{ActiveRecordType}/{ActiveRecordOID}', function ($request) {
215
+        $this->addRoute('/excel/{ActiveRecordType}/{ActiveRecordOID}', function($request) {
216 216
             $controller = new ExcelController();
217 217
 
218 218
             return $controller->process($request);
219 219
         })->value('ActiveRecordOID', null);
220 220
 
221
-        $this->addRoute('/feed/{ActiveRecordType}/{type}', function ($request) {
221
+        $this->addRoute('/feed/{ActiveRecordType}/{type}', function($request) {
222 222
             $controller = new FeedController();
223 223
 
224 224
             return $controller->process($request);
225 225
         })->value('type', 'Atom');
226 226
 
227
-        $this->addRoute('/gensecure', function ($request) {
227
+        $this->addRoute('/gensecure', function($request) {
228 228
             $controller = new GenSecureQueryStringController();
229 229
 
230 230
             return $controller->process($request);
231 231
         });
232 232
 
233
-        $this->addRoute('/image/{source}/{width}/{height}/{type}/{quality}/{scale}/{secure}/{var1}/{var2}', function ($request) {
233
+        $this->addRoute('/image/{source}/{width}/{height}/{type}/{quality}/{scale}/{secure}/{var1}/{var2}', function($request) {
234 234
             $controller = new ImageController();
235 235
 
236 236
             return $controller->process($request);
237 237
         })->value('var1', null)->value('var2', null);
238 238
 
239
-        $this->addRoute('/listactiverecords', function ($request) {
239
+        $this->addRoute('/listactiverecords', function($request) {
240 240
             $controller = new ListActiveRecordsController();
241 241
 
242 242
             return $controller->process($request);
243 243
         });
244 244
 
245
-        $this->addRoute('/log/{logPath}', function ($request) {
245
+        $this->addRoute('/log/{logPath}', function($request) {
246 246
             $controller = new LogController();
247 247
 
248 248
             return $controller->process($request);
249 249
         });
250 250
 
251
-        $this->addRoute('/login', function ($request) {
251
+        $this->addRoute('/login', function($request) {
252 252
             $controller = new LoginController();
253 253
 
254 254
             return $controller->process($request);
255 255
         });
256 256
 
257
-        $this->addRoute('/logout', function ($request) {
257
+        $this->addRoute('/logout', function($request) {
258 258
             $controller = new LogoutController();
259 259
 
260 260
             return $controller->process($request);
261 261
         });
262 262
 
263
-        $this->addRoute('/metric', function ($request) {
263
+        $this->addRoute('/metric', function($request) {
264 264
             $controller = new MetricController();
265 265
 
266 266
             return $controller->process($request);
267 267
         });
268 268
 
269
-        $this->addRoute('/recordselector/12m/{ActiveRecordOID}/{field}/{relatedClass}/{relatedClassField}/{relatedClassDisplayField}/{relationType}', function ($request) {
269
+        $this->addRoute('/recordselector/12m/{ActiveRecordOID}/{field}/{relatedClass}/{relatedClassField}/{relatedClassDisplayField}/{relationType}', function($request) {
270 270
             $controller = new RecordSelectorController();
271 271
 
272 272
             return $controller->process($request);
273 273
         })->value('relationType', 'ONE-TO-MANY');
274 274
 
275
-        $this->addRoute('/recordselector/m2m/{ActiveRecordOID}/{field}/{relatedClassLeft}/{relatedClassLeftDisplayField}/{relatedClassRight}/{relatedClassRightDisplayField}/{accessingClassName}/{lookupOIDs}/{relationType}', function ($request) {
275
+        $this->addRoute('/recordselector/m2m/{ActiveRecordOID}/{field}/{relatedClassLeft}/{relatedClassLeftDisplayField}/{relatedClassRight}/{relatedClassRightDisplayField}/{accessingClassName}/{lookupOIDs}/{relationType}', function($request) {
276 276
             $controller = new RecordSelectorController();
277 277
 
278 278
             return $controller->process($request);
279 279
         })->value('relationType', 'MANY-TO-MANY');
280 280
 
281
-        $this->addRoute('/search/{query}/{start}/{limit}', function ($request) {
281
+        $this->addRoute('/search/{query}/{start}/{limit}', function($request) {
282 282
             $controller = new SearchController();
283 283
 
284 284
             return $controller->process($request);
285 285
         })->value('start', 0)->value('limit', $config->get('app.list.page.amount'));
286 286
 
287
-        $this->addRoute('/sequence/{start}/{limit}', function ($request) {
287
+        $this->addRoute('/sequence/{start}/{limit}', function($request) {
288 288
             $controller = new SequenceController();
289 289
 
290 290
             return $controller->process($request);
291 291
         })->value('start', 0)->value('limit', $config->get('app.list.page.amount'));
292 292
 
293
-        $this->addRoute('/tag/{ActiveRecordType}/{ActiveRecordOID}', function ($request) {
293
+        $this->addRoute('/tag/{ActiveRecordType}/{ActiveRecordOID}', function($request) {
294 294
             $controller = new TagController();
295 295
 
296 296
             return $controller->process($request);
297 297
         });
298 298
 
299
-        $this->addRoute('/install', function ($request) {
299
+        $this->addRoute('/install', function($request) {
300 300
             $controller = new InstallController();
301 301
 
302 302
             return $controller->process($request);
303 303
         });
304 304
 
305
-        $this->addRoute('/record/{ActiveRecordType}/{ActiveRecordOID}/{view}', function ($request) {
305
+        $this->addRoute('/record/{ActiveRecordType}/{ActiveRecordOID}/{view}', function($request) {
306 306
             $controller = new ActiveRecordController();
307 307
 
308 308
             return $controller->process($request);
309 309
         })->value('ActiveRecordOID', null)->value('view', 'detailed');
310 310
 
311
-        $this->addRoute('/records/{ActiveRecordType}/{start}/{limit}', function ($request) {
311
+        $this->addRoute('/records/{ActiveRecordType}/{start}/{limit}', function($request) {
312 312
             $controller = new ActiveRecordController();
313 313
 
314 314
             return $controller->process($request);
315 315
         })->value('start', 0)->value('limit', $config->get('app.list.page.amount'));
316 316
 
317
-        $this->addRoute('/tk/{token}', function ($request) {
317
+        $this->addRoute('/tk/{token}', function($request) {
318 318
             $params = self::getDecodeQueryParams($request->getParam('token'));
319 319
 
320 320
             if (isset($params['act'])) {
@@ -341,14 +341,14 @@  discard block
 block discarded – undo
341 341
             return new Response(404, 'Resource not found');
342 342
         });
343 343
 
344
-        $this->addRoute('/alpha/service', function ($request) {
344
+        $this->addRoute('/alpha/service', function($request) {
345 345
             $controller = new LoginController();
346 346
             $controller->setUnitOfWork(array('Alpha\Controller\LoginController', 'Alpha\Controller\ListActiveRecordsController'));
347 347
 
348 348
             return $controller->process($request);
349 349
         });
350 350
 
351
-        $this->addRoute('/phpinfo', function ($request) {
351
+        $this->addRoute('/phpinfo', function($request) {
352 352
             $controller = new PhpinfoController();
353 353
 
354 354
             return $controller->process($request);
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
      */
493 493
     private static function multipleExplode($string, $delimiters = array())
494 494
     {
495
-        $mainDelim = $delimiters[count($delimiters) - 1];
495
+        $mainDelim = $delimiters[count($delimiters)-1];
496 496
 
497 497
         array_pop($delimiters);
498 498
 
Please login to merge, or discard this patch.
Alpha/Controller/ImageController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
             $imgWidth = $params['width'];
108 108
             $imgHeight = $params['height'];
109 109
             $imgType = $params['type'];
110
-            $imgQuality = (double) $params['quality'];
110
+            $imgQuality = (double)$params['quality'];
111 111
             $imgScale = new Boolean($params['scale']);
112 112
             $imgSecure = new Boolean($params['secure']);
113 113
         } catch (\Exception $e) {
Please login to merge, or discard this patch.