@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * |
184 | 184 | * @since 1.0 |
185 | 185 | */ |
186 | - protected $dataLabels = array('OID' => 'Article ID#','title' => 'Title','section' => 'Site Section','description' => 'Description','bodyOnload' => 'Body onload Javascript','content' => 'Content','headerContent' => 'HTML Header Content','author' => 'Author','created_ts' => 'Date Added','updated_ts' => 'Date of last Update','published' => 'Published','URL' => 'URL','printURL' => 'Printer version URL','comments' => 'Comments','votes' => 'Votes','tags' => 'Tags'); |
|
186 | + protected $dataLabels = array('OID' => 'Article ID#', 'title' => 'Title', 'section' => 'Site Section', 'description' => 'Description', 'bodyOnload' => 'Body onload Javascript', 'content' => 'Content', 'headerContent' => 'HTML Header Content', 'author' => 'Author', 'created_ts' => 'Date Added', 'updated_ts' => 'Date of last Update', 'published' => 'Published', 'URL' => 'URL', 'printURL' => 'Printer version URL', 'comments' => 'Comments', 'votes' => 'Votes', 'tags' => 'Tags'); |
|
187 | 187 | |
188 | 188 | /** |
189 | 189 | * The name of the database table for the class. |
@@ -452,7 +452,7 @@ discard block |
||
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); |
@@ -86,7 +86,7 @@ |
||
86 | 86 | * |
87 | 87 | * @since 1.0 |
88 | 88 | */ |
89 | - protected $dataLabels = array('OID' => 'Bad request ID#','client' => 'Client string','IP' => 'IP','requestedResource' => 'Requested resource'); |
|
89 | + protected $dataLabels = array('OID' => 'Bad request ID#', 'client' => 'Client string', 'IP' => 'IP', 'requestedResource' => 'Requested resource'); |
|
90 | 90 | |
91 | 91 | /** |
92 | 92 | * The name of the database table for the class. |
@@ -90,7 +90,7 @@ |
||
90 | 90 | * |
91 | 91 | * @since 1.0 |
92 | 92 | */ |
93 | - protected $dataLabels = array('OID' => 'Tag ID#','taggedClass' => 'Class Name','taggedOID' => 'Tagged Object ID#','content' => 'Tag'); |
|
93 | + protected $dataLabels = array('OID' => 'Tag ID#', 'taggedClass' => 'Class Name', 'taggedOID' => 'Tagged Object ID#', 'content' => 'Tag'); |
|
94 | 94 | |
95 | 95 | /** |
96 | 96 | * The name of the database table for the class. |
@@ -75,7 +75,7 @@ |
||
75 | 75 | * |
76 | 76 | * @since 1.0 |
77 | 77 | */ |
78 | - protected $dataLabels = array('OID' => 'Article Comment ID#','articleOID' => 'Article','content' => 'Comment'); |
|
78 | + protected $dataLabels = array('OID' => 'Article Comment ID#', 'articleOID' => 'Article', 'content' => 'Comment'); |
|
79 | 79 | |
80 | 80 | /** |
81 | 81 | * The name of the database table for the class. |
@@ -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) { |
@@ -84,7 +84,7 @@ |
||
84 | 84 | * |
85 | 85 | * @since 1.0 |
86 | 86 | */ |
87 | - protected $dataLabels = array('OID' => 'Article Vote ID#','articleOID' => 'Article','personOID' => 'Voter','score' => 'Article Score'); |
|
87 | + protected $dataLabels = array('OID' => 'Article Vote ID#', 'articleOID' => 'Article', 'personOID' => 'Voter', 'score' => 'Article Score'); |
|
88 | 88 | |
89 | 89 | /** |
90 | 90 | * The name of the database table for the class. |
@@ -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); |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | */ |
422 | 422 | public function generatePassword() |
423 | 423 | { |
424 | - $alphabet = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'); |
|
424 | + $alphabet = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'); |
|
425 | 425 | // the password will be 7 random characters and 2 numbers |
426 | 426 | $newPassword = ''; |
427 | 427 | for ($i = 0; $i < 7; ++$i) { |
@@ -75,7 +75,7 @@ |
||
75 | 75 | * |
76 | 76 | * @since 1.0 |
77 | 77 | */ |
78 | - protected $dataLabels = array('OID' => 'Rights Group ID#','name' => 'Rights Group Name','members' => 'Rights Group Members'); |
|
78 | + protected $dataLabels = array('OID' => 'Rights Group ID#', 'name' => 'Rights Group Name', 'members' => 'Rights Group Members'); |
|
79 | 79 | |
80 | 80 | /** |
81 | 81 | * The name of the database table for the class. |