]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
most of the comments in the engine now past the sniffer
authorCash Costello <cash.costello@gmail.com>
Mon, 9 Jan 2012 00:33:21 +0000 (19:33 -0500)
committerCash Costello <cash.costello@gmail.com>
Mon, 9 Jan 2012 00:33:21 +0000 (19:33 -0500)
14 files changed:
engine/classes/ElggExtender.php
engine/classes/ElggMenuBuilder.php
engine/classes/ElggMenuItem.php
engine/classes/ElggMetadata.php
engine/classes/ElggUser.php
engine/classes/SuccessResult.php
engine/lib/annotations.php
engine/lib/cache.php
engine/lib/metadata.php
engine/lib/output.php
engine/lib/pagehandler.php
engine/lib/pageowner.php
engine/lib/plugins.php
engine/lib/users.php

index bc2d67ae2381e22eca8454b7d3d6d20d3b398f81..d94bad83701cfd8195e92db40bc8dc4c2eefab6d 100644 (file)
  * @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();
 
index 6f4ac702ebcb5fed8d3e13cc039881f4e6ad0820..de0017599199567ae131eca2ec347db6b9fb97e2 100644 (file)
@@ -4,8 +4,7 @@
  *
  * @package    Elgg.Core
  * @subpackage Navigation
- *
- * @since 1.8.0
+ * @since      1.8.0
  */
 class ElggMenuBuilder {
 
index 2512392ad77f25f5bcb73d06b9d8be0893fff360..4bc9144d451c15e1924e610a1cf322b6438e58a7 100644 (file)
@@ -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()) {
 
index 32e7b32f1cc0cfd0db40af92d67b2fd2f5dd289d..634a122e561e1616509458294c27b27755895f8e 100644 (file)
@@ -9,6 +9,13 @@
  */
 class ElggMetadata extends ElggExtender {
 
+       /**
+        * (non-PHPdoc)
+        *
+        * @see ElggData::initializeAttributes()
+        *
+        * @return void
+        */
        protected function initializeAttributes() {
                parent::initializeAttributes();
 
index ab0610ac02901a46f3c6756d857ccd874b547878..bdf57c2c3f6d5ff00d69e5919794eae52be9afcb 100644 (file)
@@ -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());
index c8578a2cf9388544e72006229908cdcd5ee70054..ab5468ad8dbeb87a1fac999a76461811f2afe38b 100644 (file)
@@ -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);
        }
index bb7d836cc8da69bcca2ff30fd2a0a99267fd9236..30ef7f17b97a56aa483ca0aa183c6bc1c6fc1446 100644 (file)
@@ -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
  */
index a6ebe2a301846ebef951087dc3bc71a4fbfdf09d..e71ef332d13df7d01093d475e13191d1e23ad6ec 100644 (file)
@@ -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) {
index 4908b3e8892679e90d0cf8b467a5370874dba276..352e98a61adbfd6b5648d96e2b87c7ec0501f7ff 100644 (file)
@@ -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
  */
index 6554481f5b3d5b6d8516994bbd5b33a89a0f8064..65f51f854ee3190b0ee16356df17c5ae99c6a816 100644 (file)
@@ -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;
index ffcfc5b6a44e241b0b224b143008f0e980ee03d9..a675d976a5cc4853412cf67241936b2ebed9e995 100644 (file)
@@ -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")) {
index 9d41d74c1eca803a913d2764c6c142e870770906..0cf0e0625413b734225ceb86387213dc1f99fc22 100644 (file)
@@ -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
  */
index 026bc171b0cd8cfa4ecc966edaa6a5574497b4e8..7968f4a6ea2f75564a0a2004773cb13ee5f55355 100644 (file)
@@ -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) {
index 3624887182250bdba51609c8819c9bdc98ec10fc..c030521720eeafd1e7ca7a216a1ecf66fbed5789 100644 (file)
@@ -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
  */