@@ -511,19 +511,19 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -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 |
@@ -628,7 +628,7 @@ discard block |
||
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 |
||
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, '{}')])) { |