Completed
Pull Request — develop (#294)
by John
06:01
created
Alpha/Model/ActiveRecordProviderMySQL.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1033,7 +1033,7 @@  discard block
 block discarded – undo
1033 1033
         } else {
1034 1034
             // there has been an error, so decrement the version number back
1035 1035
             $temp = $this->BO->getVersionNumber()->getValue();
1036
-            $this->BO->set('version_num', $temp - 1);
1036
+            $this->BO->set('version_num', $temp-1);
1037 1037
 
1038 1038
             // check for unique violations
1039 1039
             if (self::getConnection()->errno == '1062') {
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
         $this->BO->setLastQuery($sqlQuery);
1066 1066
         $stmt = self::getConnection()->stmt_init();
1067 1067
 
1068
-        $newVersionNumber = $this->BO->getVersionNumber()->getValue() + 1;
1068
+        $newVersionNumber = $this->BO->getVersionNumber()->getValue()+1;
1069 1069
 
1070 1070
         if ($stmt->prepare($sqlQuery)) {
1071 1071
             if ($this->BO->getPropObject($attribute) instanceof Integer) {
@@ -2441,7 +2441,7 @@  discard block
 block discarded – undo
2441 2441
 
2442 2442
                     if ($propName == 'version_num') {
2443 2443
                         $temp = $this->BO->getVersionNumber()->getValue();
2444
-                        $this->BO->set('version_num', $temp + 1);
2444
+                        $this->BO->set('version_num', $temp+1);
2445 2445
                         $bindingsTypes .= 'i';
2446 2446
                         array_push($params, $this->BO->getVersionNumber()->getValue());
2447 2447
                     }
@@ -2542,7 +2542,7 @@  discard block
 block discarded – undo
2542 2542
         $singleQuote1 = mb_strpos($error, "'");
2543 2543
         $singleQuote2 = mb_strrpos($error, "'");
2544 2544
 
2545
-        $value = mb_substr($error, $singleQuote1, ($singleQuote2 - $singleQuote1) + 1);
2545
+        $value = mb_substr($error, $singleQuote1, ($singleQuote2-$singleQuote1)+1);
2546 2546
         self::$logger->debug('<<findOffendingValue ['.$value.'])');
2547 2547
 
2548 2548
         return $value;
Please login to merge, or discard this patch.
Alpha/Model/ActiveRecordProviderSQLite.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -981,8 +981,8 @@  discard block
 block discarded – undo
981 981
                 $stmt->bindValue(':OID', $this->BO->getOID(), SQLITE3_INTEGER);
982 982
 
983 983
                 $temp = $this->BO->getVersionNumber()->getValue();
984
-                $this->BO->set('version_num', $temp + 1);
985
-                $stmt->bindValue(':version_num', $temp + 1, SQLITE3_INTEGER);
984
+                $this->BO->set('version_num', $temp+1);
985
+                $stmt->bindValue(':version_num', $temp+1, SQLITE3_INTEGER);
986 986
 
987 987
                 $stmt->execute();
988 988
             } else {
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
         } else {
1066 1066
             // there has been an error, so decrement the version number back
1067 1067
             $temp = $this->BO->getVersionNumber()->getValue();
1068
-            $this->BO->set('version_num', $temp - 1);
1068
+            $this->BO->set('version_num', $temp-1);
1069 1069
 
1070 1070
             throw new FailedSaveException('Failed to save object, SQLite error is ['.self::getLastDatabaseError().'], query ['.$this->BO->getLastQuery().']');
1071 1071
         }
@@ -1090,7 +1090,7 @@  discard block
 block discarded – undo
1090 1090
         $this->BO->setLastQuery($sqlQuery);
1091 1091
         $stmt = self::getConnection()->prepare($sqlQuery);
1092 1092
 
1093
-        $newVersionNumber = $this->BO->getVersionNumber()->getValue() + 1;
1093
+        $newVersionNumber = $this->BO->getVersionNumber()->getValue()+1;
1094 1094
 
1095 1095
         if ($stmt instanceof SQLite3Stmt) {
1096 1096
             if ($this->BO->getPropObject($attribute) instanceof Integer) {
Please login to merge, or discard this patch.
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.