diff options
author | cash <cash.costello@gmail.com> | 2013-03-15 11:18:05 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2013-03-15 11:18:05 -0400 |
commit | a2ecf54d56d9f877e6f0f8ac6d841cee6187aac4 (patch) | |
tree | ccd5b6029d3f77cc09144132d12fbd2c2e2b0fa4 /engine/classes/ElggObject.php | |
parent | 4cd8bc8d68008f509ce97b2e31e1e5ccfec7bdf0 (diff) | |
download | elgg-a2ecf54d56d9f877e6f0f8ac6d841cee6187aac4.tar.gz elgg-a2ecf54d56d9f877e6f0f8ac6d841cee6187aac4.tar.bz2 |
more coding standard fixes
Diffstat (limited to 'engine/classes/ElggObject.php')
-rw-r--r-- | engine/classes/ElggObject.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/engine/classes/ElggObject.php b/engine/classes/ElggObject.php index 6263f84f6..3cb76ffaf 100644 --- a/engine/classes/ElggObject.php +++ b/engine/classes/ElggObject.php @@ -66,21 +66,18 @@ class ElggObject extends ElggEntity { $msg = elgg_echo('IOException:FailedToLoadGUID', array(get_class(), $guid->guid)); throw new IOException($msg); } - - // Is $guid is an ElggObject? Use a copy constructor } else if ($guid instanceof ElggObject) { + // $guid is an ElggObject so this is a copy constructor elgg_deprecated_notice('This type of usage of the ElggObject constructor was deprecated. Please use the clone method.', 1.7); foreach ($guid->attributes as $key => $value) { $this->attributes[$key] = $value; } - - // Is this is an ElggEntity but not an ElggObject = ERROR! } else if ($guid instanceof ElggEntity) { + // @todo remove - do not need separate exception throw new InvalidParameterException(elgg_echo('InvalidParameterException:NonElggObject')); - - // Is it a GUID } else if (is_numeric($guid)) { + // $guid is a GUID so load if (!$this->load($guid)) { throw new IOException(elgg_echo('IOException:FailedToLoadGUID', array(get_class(), $guid))); } |