| @@ 83-88 (lines=6) @@ | ||
| 80 | } |
|
| 81 | ||
| 82 | // make sure we don't have a duplicate entry |
|
| 83 | if (!isset($tables->$tableName->$key)) { |
|
| 84 | $msg = "table does not contain an entry for '{$key}'"; |
|
| 85 | $log->endAction($msg); |
|
| 86 | ||
| 87 | throw Exceptions::newExpectFailedException(__METHOD__, "{$tableName} table has an entry for '{$key}'", "{$parent} table has no entry for '{$key}'"); |
|
| 88 | } |
|
| 89 | ||
| 90 | // all done |
|
| 91 | $log->endAction(); |
|
| @@ 120-125 (lines=6) @@ | ||
| 117 | } |
|
| 118 | ||
| 119 | // make sure we don't have a duplicate entry |
|
| 120 | if (isset($tables->$tableName->$key)) { |
|
| 121 | $msg = "table already contains an entry for '{$key}'"; |
|
| 122 | $log->endAction($msg); |
|
| 123 | ||
| 124 | throw Exceptions::newExpectFailedException(__METHOD__, "{$tableName} table has no entry for '{$key}'", "{$parent} table has an entry for '{$key}'"); |
|
| 125 | } |
|
| 126 | ||
| 127 | // all done |
|
| 128 | $log->endAction(); |
|
| @@ 221-225 (lines=5) @@ | ||
| 218 | } |
|
| 219 | ||
| 220 | // make sure we don't have a duplicate entry |
|
| 221 | if (isset($tables->$tableName->$group->$key)){ |
|
| 222 | $msg = "table already contains an entry for '{$group}->{$key}'"; |
|
| 223 | $log->endAction($msg); |
|
| 224 | throw Exceptions::newActionFailedException(__METHOD__, $msg); |
|
| 225 | } |
|
| 226 | ||
| 227 | // add the entry |
|
| 228 | $tables->$tableName->$group->$key = $value; |
|