diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-01-08 19:33:21 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-01-08 19:33:21 -0500 |
commit | c4b49227819624b14b61e6eedbfa6779cd794d45 (patch) | |
tree | b198cff1151656ab4d8c4ef649e7b8e1bc5e5469 /engine | |
parent | b2bcd510b040b6d065a3a6ad5a4ea36e43db0446 (diff) | |
download | elgg-c4b49227819624b14b61e6eedbfa6779cd794d45.tar.gz elgg-c4b49227819624b14b61e6eedbfa6779cd794d45.tar.bz2 |
most of the comments in the engine now past the sniffer
Diffstat (limited to 'engine')
-rw-r--r-- | engine/classes/ElggExtender.php | 11 | ||||
-rw-r--r-- | engine/classes/ElggMenuBuilder.php | 3 | ||||
-rw-r--r-- | engine/classes/ElggMenuItem.php | 8 | ||||
-rw-r--r-- | engine/classes/ElggMetadata.php | 7 | ||||
-rw-r--r-- | engine/classes/ElggUser.php | 21 | ||||
-rw-r--r-- | engine/classes/SuccessResult.php | 2 | ||||
-rw-r--r-- | engine/lib/annotations.php | 2 | ||||
-rw-r--r-- | engine/lib/cache.php | 7 | ||||
-rw-r--r-- | engine/lib/metadata.php | 2 | ||||
-rw-r--r-- | engine/lib/output.php | 8 | ||||
-rw-r--r-- | engine/lib/pagehandler.php | 1 | ||||
-rw-r--r-- | engine/lib/pageowner.php | 7 | ||||
-rw-r--r-- | engine/lib/plugins.php | 7 | ||||
-rw-r--r-- | engine/lib/users.php | 8 |
14 files changed, 54 insertions, 40 deletions
diff --git a/engine/classes/ElggExtender.php b/engine/classes/ElggExtender.php index bc2d67ae2..d94bad837 100644 --- a/engine/classes/ElggExtender.php +++ b/engine/classes/ElggExtender.php @@ -24,8 +24,15 @@ * @property mixed $value The value of the extender (int or string) * @property int $time_created A UNIX timestamp of when the extender was created (read-only, set on first save) */ -abstract class ElggExtender extends ElggData -{ +abstract class ElggExtender extends ElggData { + + /** + * (non-PHPdoc) + * + * @see ElggData::initializeAttributes() + * + * @return void + */ protected function initializeAttributes() { parent::initializeAttributes(); diff --git a/engine/classes/ElggMenuBuilder.php b/engine/classes/ElggMenuBuilder.php index 6f4ac702e..de0017599 100644 --- a/engine/classes/ElggMenuBuilder.php +++ b/engine/classes/ElggMenuBuilder.php @@ -4,8 +4,7 @@ * * @package Elgg.Core * @subpackage Navigation - * - * @since 1.8.0 + * @since 1.8.0 */ class ElggMenuBuilder { diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php index 2512392ad..4bc9144d4 100644 --- a/engine/classes/ElggMenuItem.php +++ b/engine/classes/ElggMenuItem.php @@ -4,10 +4,9 @@ * * To create a menu item that is not a link, pass false for $href. * - * @since 1.8.0 - * * @package Elgg.Core * @subpackage Navigation + * @since 1.8.0 */ class ElggMenuItem { @@ -549,10 +548,9 @@ class ElggMenuItem { /** * Get the menu item content (usually a link) * - * @todo View code in a model. How do we feel about that? - * - * @params array $vars Options to pass to output/url if a link + * @param array $vars Options to pass to output/url if a link * @return string + * @todo View code in a model. How do we feel about that? */ public function getContent(array $vars = array()) { diff --git a/engine/classes/ElggMetadata.php b/engine/classes/ElggMetadata.php index 32e7b32f1..634a122e5 100644 --- a/engine/classes/ElggMetadata.php +++ b/engine/classes/ElggMetadata.php @@ -9,6 +9,13 @@ */ class ElggMetadata extends ElggExtender { + /** + * (non-PHPdoc) + * + * @see ElggData::initializeAttributes() + * + * @return void + */ protected function initializeAttributes() { parent::initializeAttributes(); diff --git a/engine/classes/ElggUser.php b/engine/classes/ElggUser.php index ab0610ac0..bdf57c2c3 100644 --- a/engine/classes/ElggUser.php +++ b/engine/classes/ElggUser.php @@ -105,7 +105,7 @@ class ElggUser extends ElggEntity * * @param int $guid ElggUser GUID * - * @return true|false + * @return bool */ protected function load($guid) { // Test to see if we have the generic stuff @@ -141,7 +141,7 @@ class ElggUser extends ElggEntity /** * Saves this user to the database. * - * @return true|false + * @return bool */ public function save() { // Save generic stuff @@ -261,7 +261,7 @@ class ElggUser extends ElggEntity * @param int $limit The number of results to return * @param int $offset Any indexing offset * - * @return bool + * @return array */ function getSites($subtype = "", $limit = 10, $offset = 0) { return get_user_sites($this->getGUID(), $subtype, $limit, $offset); @@ -272,7 +272,7 @@ class ElggUser extends ElggEntity * * @param int $site_guid The guid of the site to add it to * - * @return true|false + * @return bool */ function addToSite($site_guid) { return add_site_user($site_guid, $this->getGUID()); @@ -283,7 +283,7 @@ class ElggUser extends ElggEntity * * @param int $site_guid The guid of the site to remove it from * - * @return true|false + * @return bool */ function removeFromSite($site_guid) { return remove_site_user($site_guid, $this->getGUID()); @@ -294,7 +294,7 @@ class ElggUser extends ElggEntity * * @param int $friend_guid The GUID of the user to add * - * @return true|false Depending on success + * @return bool */ function addFriend($friend_guid) { return user_add_friend($this->getGUID(), $friend_guid); @@ -305,7 +305,7 @@ class ElggUser extends ElggEntity * * @param int $friend_guid The GUID of the user to remove * - * @return true|false Depending on success + * @return bool */ function removeFriend($friend_guid) { return user_remove_friend($this->getGUID(), $friend_guid); @@ -314,8 +314,7 @@ class ElggUser extends ElggEntity /** * Determines whether or not this user is a friend of the currently logged in user * - * - * @return true|false + * @return bool */ function isFriend() { return $this->isFriendOf(elgg_get_logged_in_user_guid()); @@ -326,7 +325,7 @@ class ElggUser extends ElggEntity * * @param int $user_guid The GUID of the user to check against * - * @return true|false + * @return bool */ function isFriendsWith($user_guid) { return user_is_friend($this->getGUID(), $user_guid); @@ -337,7 +336,7 @@ class ElggUser extends ElggEntity * * @param int $user_guid The GUID of the user to check against * - * @return true|false + * @return bool */ function isFriendOf($user_guid) { return user_is_friend($user_guid, $this->getGUID()); diff --git a/engine/classes/SuccessResult.php b/engine/classes/SuccessResult.php index c8578a2cf..ab5468ad8 100644 --- a/engine/classes/SuccessResult.php +++ b/engine/classes/SuccessResult.php @@ -15,7 +15,7 @@ class SuccessResult extends GenericResult { * * @param string $result The result */ - public function SuccessResult($result) { + public function __construct($result) { $this->setResult($result); $this->setStatusCode(SuccessResult::$RESULT_SUCCESS); } diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index bb7d836cc..30ef7f17b 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -549,8 +549,8 @@ function elgg_comment_url_handler(ElggAnnotation $comment) { /** * Register an annotation url handler. * - * @param string $function_name The function. * @param string $extender_name The name, default 'all'. + * @param string $function_name The function. * * @return string */ diff --git a/engine/lib/cache.php b/engine/lib/cache.php index a6ebe2a30..e71ef332d 100644 --- a/engine/lib/cache.php +++ b/engine/lib/cache.php @@ -34,8 +34,9 @@ function elgg_get_filepath_cache() { } /** - * Function which resets the file path cache. + * Reset the file path cache. * + * @return bool */ function elgg_filepath_cache_reset() { $cache = elgg_get_filepath_cache(); @@ -47,8 +48,8 @@ function elgg_filepath_cache_reset() { /** * Saves a filepath cache. * - * @param string $type - * @param string $data + * @param string $type The type or identifier of the cache + * @param string $data The data to be saved * @return bool */ function elgg_filepath_cache_save($type, $data) { diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index 4908b3e88..352e98a61 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -871,8 +871,8 @@ function metadata_update($event, $object_type, $object) { /** * Register a metadata url handler. * - * @param string $function_name The function. * @param string $extender_name The name, default 'all'. + * @param string $function The function name. * * @return bool */ diff --git a/engine/lib/output.php b/engine/lib/output.php index 6554481f5..65f51f854 100644 --- a/engine/lib/output.php +++ b/engine/lib/output.php @@ -81,10 +81,10 @@ function autop($pee, $br = 1) { } $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*<br />!', "$1", $pee); $pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee); -// if (strpos($pee, '<pre') !== false) { -// mind the space between the ? and >. Only there because of the comment. -// $pee = preg_replace_callback('!(<pre.*? >)(.*?)</pre>!is', 'clean_pre', $pee ); -// } + //if (strpos($pee, '<pre') !== false) { + // mind the space between the ? and >. Only there because of the comment. + // $pee = preg_replace_callback('!(<pre.*? >)(.*?)</pre>!is', 'clean_pre', $pee ); + //} $pee = preg_replace( "|\n</p>$|", '</p>', $pee ); return $pee; diff --git a/engine/lib/pagehandler.php b/engine/lib/pagehandler.php index ffcfc5b6a..a675d976a 100644 --- a/engine/lib/pagehandler.php +++ b/engine/lib/pagehandler.php @@ -120,6 +120,7 @@ function elgg_unregister_page_handler($handler) { * @param string $type The type of the hook * @param bool $result The current value of the hook * @param array $params Parameters related to the hook + * @return void */ function elgg_error_page_handler($hook, $type, $result, $params) { if (elgg_view_exists("errors/$type")) { diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php index 9d41d74c1..0cf0e0625 100644 --- a/engine/lib/pageowner.php +++ b/engine/lib/pageowner.php @@ -54,7 +54,7 @@ function elgg_get_page_owner_entity() { * Set the guid of the entity that owns this page * * @param int $guid The guid of the page owner - * + * @return void * @since 1.8.0 */ function elgg_set_page_owner_guid($guid) { @@ -173,7 +173,7 @@ function default_page_owner_handler($hook, $entity_type, $returnvalue, $params) * @warning The context is not available until the page_handler runs (after * the 'init, system' event processing has completed). * - * @param string $context The context of the page + * @param string $context The context of the page * @return bool * @since 1.8.0 */ @@ -216,6 +216,7 @@ function elgg_get_context() { * Push a context onto the top of the stack * * @param string $context The context string to add to the context stack + * @return void * @since 1.8.0 */ function elgg_push_context($context) { @@ -244,7 +245,7 @@ function elgg_pop_context() { * itself differently based on being on the dashboard or profile pages, it * can check the stack. * - * @param string $context The context string to check for + * @param string $context The context string to check for * @return bool * @since 1.8.0 */ diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index 026bc171b..7968f4a6e 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -480,9 +480,10 @@ function elgg_reindex_plugin_priorities() { */ function elgg_namespace_plugin_private_setting($type, $name, $id = null) { switch ($type) { -// case 'setting': -// $name = ELGG_PLUGIN_SETTING_PREFIX . $name; -// break; + // commented out because it breaks $plugin->$name access to variables + //case 'setting': + // $name = ELGG_PLUGIN_SETTING_PREFIX . $name; + // break; case 'user_setting': if (!$id) { diff --git a/engine/lib/users.php b/engine/lib/users.php index 362488718..c03052172 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -630,10 +630,10 @@ function get_user_by_email($email) { * A function that returns a maximum of $limit users who have done something within the last * $seconds seconds or the total count of active users. * - * @param int $seconds Number of seconds (default 600 = 10min) - * @param int $limit Limit, default 10. - * @param int $offset Offset, default 0. - * @param bool $count Count, default false. + * @param int $seconds Number of seconds (default 600 = 10min) + * @param int $limit Limit, default 10. + * @param int $offset Offset, default 0. + * @param bool $count Count, default false. * * @return mixed */ |