@@ -97,7 +97,7 @@ |
||
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)) { |
@@ -95,7 +95,7 @@ |
||
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; |
@@ -1033,7 +1033,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -981,8 +981,8 @@ discard block |
||
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 |
||
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 |
||
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) { |
@@ -629,14 +629,14 @@ |
||
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 |
@@ -156,7 +156,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -452,7 +452,7 @@ |
||
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); |
@@ -114,7 +114,7 @@ discard block |
||
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 |
||
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); |
@@ -174,7 +174,7 @@ |
||
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 |