Completed
Pull Request — develop (#302)
by John
03:42
created
Alpha/Model/Article.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -452,7 +452,7 @@
 block discarded – undo
452 452
         }
453 453
 
454 454
         if ($vote_count > 0) {
455
-            $score = $total_score / $vote_count;
455
+            $score = $total_score/$vote_count;
456 456
         }
457 457
 
458 458
         return sprintf('%01.2f', $score);
Please login to merge, or discard this patch.
Alpha/Model/Person.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                                     'state' => 'Account state',
115 115
                                     'URL' => 'Your site address',
116 116
                                     'rights' => 'Rights Group Membership',
117
-                                    'actions' => 'Actions', );
117
+                                    'actions' => 'Actions',);
118 118
 
119 119
     /**
120 120
      * The name of the database table for the class.
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $this->password->isPassword(true);
179 179
         $this->state = new Enum(array(
180 180
                                     'Active',
181
-                                    'Disabled', ));
181
+                                    'Disabled',));
182 182
         $this->state->setValue('Active');
183 183
         $this->URL = new String();
184 184
         $this->URL->setRule(Validator::OPTIONAL_HTTP_URL);
Please login to merge, or discard this patch.
Alpha/Model/Type/Sequence.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
             $this->set('sequence', 0);
175 175
         }
176 176
 
177
-        $this->set('sequence', $this->get('sequence') + 1);
177
+        $this->set('sequence', $this->get('sequence')+1);
178 178
         $this->save();
179 179
     }
180 180
 
Please login to merge, or discard this patch.
Alpha/Util/Http/Request.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
             $URI = mb_substr($this->URI, 0, mb_strpos($this->URI, '?'));
629 629
 
630 630
             // let's take this opportunity to pass query string params to $this->params
631
-            $queryString = mb_substr($this->URI, (mb_strpos($this->URI, '?') + 1));
631
+            $queryString = mb_substr($this->URI, (mb_strpos($this->URI, '?')+1));
632 632
             $this->queryString = $queryString;
633 633
             parse_str($queryString, $this->params);
634 634
         } else {
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
             $name = $paramNames[$i];
643 643
 
644 644
             if (!isset($this->params[trim($name, '{}')])) {
645
-                if (isset($paramValues[$i]) && substr($name, 0, 1) == '{' && substr($name, strlen($name) - 1, 1) == '}') {
645
+                if (isset($paramValues[$i]) && substr($name, 0, 1) == '{' && substr($name, strlen($name)-1, 1) == '}') {
646 646
                     $this->params[trim($name, '{}')] = $paramValues[$i];
647 647
                 }
648 648
                 if (!isset($paramValues[$i]) && isset($defaultParams[trim($name, '{}')])) {
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
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         if (isset($codeTypeTag[0])) {
75 75
             $start = mb_strpos($codeTypeTag[0], '[');
76 76
             $end = mb_strpos($codeTypeTag[0], ']');
77
-            $language = mb_substr($codeTypeTag[0], $start + 1, $end - ($start + 1));
77
+            $language = mb_substr($codeTypeTag[0], $start+1, $end-($start+1));
78 78
         } else {
79 79
             // will use php as a defualt language type when none is provided
80 80
             $language = 'php';
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
     {
101 101
         $config = ConfigProvider::getInstance();
102 102
 
103
-        $whole_match    =  $matches[1];
104
-        $link_text      =  $this->runSpanGamut($matches[2]);
105
-        $url            =  $matches[3] == '' ? $matches[4] : $matches[3];
106
-        $title          =& $matches[7];
107
-        $attr  = $this->doExtraAttributes("a", $dummy =& $matches[8]);
103
+        $whole_match    = $matches[1];
104
+        $link_text      = $this->runSpanGamut($matches[2]);
105
+        $url            = $matches[3] == '' ? $matches[4] : $matches[3];
106
+        $title          = & $matches[7];
107
+        $attr = $this->doExtraAttributes("a", $dummy = & $matches[8]);
108 108
 
109 109
         $external = false;
110 110
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         $result = "<a href=\"$url\"";
127 127
         if (isset($title)) {
128 128
             $title = $this->encodeAttribute($title);
129
-            $result .=  " title=\"$title\"";
129
+            $result .= " title=\"$title\"";
130 130
         }
131 131
         if ($external) {
132 132
             $result .= " target=\"$url\"";
@@ -205,6 +205,6 @@  discard block
 block discarded – undo
205 205
         $text .= "</tbody>\n";
206 206
         $text .= "</table>";
207 207
         
208
-        return $this->hashBlock($text) . "\n";
208
+        return $this->hashBlock($text)."\n";
209 209
     }
210 210
 }
Please login to merge, or discard this patch.
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/Model/Type/Timestamp.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -629,16 +629,16 @@
 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) {
639
+        for ($i = 0; $difference >= $lengths[$i] && $i < count($lengths)-1; ++$i) {
640 640
 
641
-            $difference = round($difference / $lengths[$i]);
641
+            $difference = round($difference/$lengths[$i]);
642 642
         }
643 643
 
644 644
         $difference = round($difference);
Please login to merge, or discard this patch.