Completed
Push — 2.0.0 ( 6a6555...ed66fb )
by John
04:22
created
Alpha/Util/Http/PHPServerUtils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
             // Execute the command and store the process ID
98 98
             $output = array();
99 99
             exec($command, $output);
100
-            $pid = (int) $output[0];
100
+            $pid = (int)$output[0];
101 101
         }
102 102
 
103 103
         if (!isset($pid)) {
Please login to merge, or discard this patch.
Alpha/Util/Image/ImageUtils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
         list($originalWidth, $originalHeight) = $imageInfo;
96 96
 
97 97
         if ($originalWidth > $originalHeight) {
98
-            $originalX = floor(($originalWidth - $originalHeight) / 2);
98
+            $originalX = floor(($originalWidth-$originalHeight)/2);
99 99
             $sourceWidth = $sourceHeight = $originalHeight;
100 100
         } else {
101 101
             $sourceWidth = $sourceHeight = $originalWidth;
Please login to merge, or discard this patch.
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/Type/Timestamp.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -629,14 +629,14 @@
 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
             $difference /= $lengths[$i];
641 641
         }
642 642
 
Please login to merge, or discard this patch.
Alpha/Util/Extension/MarkdownFacade.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         foreach ($attachments[0] as $attachmentURL) {
157 157
             $start = mb_strpos($attachmentURL, '/');
158 158
             $end = mb_strrpos($attachmentURL, '"');
159
-            $fileName = mb_substr($attachmentURL, $start + 1, $end - ($start + 1));
159
+            $fileName = mb_substr($attachmentURL, $start+1, $end-($start+1));
160 160
 
161 161
             if (method_exists($this->BO, 'getAttachmentSecureURL')) {
162 162
                 $this->content = str_replace($attachmentURL, 'href='.$this->BO->getAttachmentSecureURL($fileName), $this->content);
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         foreach ($attachments[0] as $attachmentURL) {
171 171
             $start = mb_strpos($attachmentURL, '/');
172 172
             $end = mb_strrpos($attachmentURL, '" alt');
173
-            $fileName = mb_substr($attachmentURL, $start + 1, $end - ($start + 1));
173
+            $fileName = mb_substr($attachmentURL, $start+1, $end-($start+1));
174 174
 
175 175
             if ($config->get('cms.images.widget')) {
176 176
                 // get the details of the source image
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
                     $type = 'png';
186 186
                 }
187 187
 
188
-                $img = new Image($path, $image_details[0], $image_details[1], $type, 0.95, false, (boolean) $config->get('cms.images.widget.secure'));
188
+                $img = new Image($path, $image_details[0], $image_details[1], $type, 0.95, false, (boolean)$config->get('cms.images.widget.secure'));
189 189
                 $this->content = str_replace($attachmentURL, $img->renderHTMLLink(), $this->content);
190 190
             } else {
191 191
                 // render a normal image link to the ViewAttachment controller
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 = base64_encode(SecurityUtils::encrypt($host.date('Ymd', (time() - 3600))));
1162
+            $var1 = base64_encode(SecurityUtils::encrypt($host.date('Ymd', (time()-3600))));
1163 1163
             // the server's IP plus $var1
1164 1164
             $var2 = base64_encode(SecurityUtils::encrypt($ip.$var1));
1165 1165
 
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.