diff --git a/includes/rules.core.inc b/includes/rules.core.inc
index fdb226b..b00ed41 100644
--- a/includes/rules.core.inc
+++ b/includes/rules.core.inc
@@ -857,8 +857,7 @@ abstract class RulesPlugin extends RulesExtendable {
    * "Configured right" means all needed variables are available in the
    * element's scope and dependent modules are enabled.
    *
-   * @return RulesPlugin
-   *   Returns $this to support chained usage.
+   * @return $this
    *
    * @throws RulesIntegrityException
    *   In case of a failed integrity check, a RulesIntegrityException exception
@@ -2502,8 +2501,7 @@ abstract class RulesActionContainer extends RulesContainerPlugin implements Rule
    * Pass in either an instance of the RulesActionInterface or the arguments
    * as needed by rules_action().
    *
-   * @return RulesActionContainer
-   *   Returns $this to support chained usage.
+   * @return $this
    */
   public function action($name, $settings = array()) {
     $action = (is_object($name) && $name instanceof RulesActionInterface) ? $name : rules_action($name, $settings);
@@ -2575,8 +2573,7 @@ abstract class RulesConditionContainer extends RulesContainerPlugin implements R
    * Pass in either an instance of the RulesConditionInterface or the arguments
    * as needed by rules_condition().
    *
-   * @return RulesConditionContainer
-   *   Returns $this to support chained usage.
+   * @return $this
    */
   public function condition($name, $settings = array()) {
     $condition = (is_object($name) && $name instanceof RulesConditionInterface) ? $name : rules_condition($name, $settings);
diff --git a/includes/rules.plugins.inc b/includes/rules.plugins.inc
index b0f7b25..62fda46 100644
--- a/includes/rules.plugins.inc
+++ b/includes/rules.plugins.inc
@@ -220,8 +220,7 @@ class Rule extends RulesActionContainer {
    * Pass either an instance of the RulesConditionInterface or the arguments as
    * needed by rules_condition().
    *
-   * @return Rule
-   *   Returns $this to support chained usage.
+   * @return $this
    */
   public function condition($name, $settings = array()) {
     $this->conditions->condition($name, $settings);
diff --git a/includes/rules.processor.inc b/includes/rules.processor.inc
index e647a4b..42ca45d 100644
--- a/includes/rules.processor.inc
+++ b/includes/rules.processor.inc
@@ -61,7 +61,7 @@ abstract class RulesDataProcessor {
    *   The processor settings which are to be prepared.
    * @param $param_info
    *   The info about the parameter to prepare the processor for.
-   * @param $var_info
+   * @param array $var_info
    *   An array of info about the available variables.
    */
   public static function prepareSetting(&$setting, $param_info, $var_info = array()) {
@@ -225,7 +225,7 @@ abstract class RulesDataProcessor {
    *
    * @param $settings
    *   The settings of the processor.
-   * @param $var_info
+   * @param array $var_info
    *   An array of info about the available variables.
    *
    * @return
@@ -338,9 +338,9 @@ abstract class RulesDataInputEvaluator extends RulesDataProcessor {
    *
    * @param string $text
    *   The text to evaluate later on.
-   * @param $variables
+   * @param array $variables
    *   An array of info about available variables.
-   * @param $param_info
+   * @param array $param_info
    *   (optional) An array of information about the handled parameter value.
    *   For backward compatibility, this parameter is not required.
    */
@@ -351,7 +351,7 @@ abstract class RulesDataInputEvaluator extends RulesDataProcessor {
    *
    * @param string $text
    *   The text to evaluate.
-   * @param $options
+   * @param array $options
    *   A keyed array of settings and flags to control the processing.
    *   Supported options are:
    *   - language: A language object to be used when processing.
@@ -371,9 +371,9 @@ abstract class RulesDataInputEvaluator extends RulesDataProcessor {
   /**
    * Provide some usage help for the evaluator.
    *
-   * @param $variables
+   * @param array $variables
    *   An array of info about available variables.
-   * @param $param_info
+   * @param array $param_info
    *   (optional) An array of information about the handled parameter value.
    *   For backward compatibility, this parameter is not required.
    *
diff --git a/includes/rules.state.inc b/includes/rules.state.inc
index 9a6d23d..2e9213e 100644
--- a/includes/rules.state.inc
+++ b/includes/rules.state.inc
@@ -15,16 +15,22 @@ class RulesState {
 
   /**
    * Globally keeps the ids of rules blocked due to recursion prevention.
+   *
+   * @var array
    */
   static protected $blocked = array();
 
   /**
    * The known variables.
+   *
+   * @var array
    */
   public $variables = array();
 
   /**
    * Holds info about the variables.
+   *
+   * @var array
    */
   protected $info = array();
 
@@ -451,8 +457,8 @@ class RulesData {
    *   level of recursions is reached. Defaults to TRUE.
    *
    * @return array
-   *  An array of info about matching variables or properties that match, keyed
-   *  with the data selector.
+   *   An array of info about matching variables or properties that match, keyed
+   *   with the data selector.
    */
   public static function matchingDataSelector($source, $param_info, $prefix = '', $recursions = 2, $suggestions = TRUE) {
     // If an array of info is given, get entity metadata wrappers first.
@@ -484,7 +490,8 @@ class RulesData {
           $matches += self::matchingDataSelector($wrapper, $param_info, $prefix . $name . ':', $recursions - 1, $suggestions);
         }
         elseif ($suggestions) {
-          // We may not recurse any more, but indicate the possibility to recurse.
+          // We may not recurse any more,
+          // but indicate the possibility to recurse.
           $matches[$prefix . $name . ':'] = $wrapper->info();
           if (!is_array($source) && $source instanceof EntityListWrapper) {
             // Add some more possible list items.
@@ -675,7 +682,7 @@ abstract class RulesIdentifiableDataWrapper extends EntityStructureWrapper {
    *   The type of the passed data.
    * @param $data
    *   Optional. The data to wrap or its identifier.
-   * @param $info
+   * @param array $info
    *   Optional. Used internally to pass info about properties down the tree.
    */
   public function __construct($type, $data = NULL, $info = array()) {
@@ -756,6 +763,9 @@ abstract class RulesIdentifiableDataWrapper extends EntityStructureWrapper {
     return $vars;
   }
 
+  /**
+   * Prepare for unserialization.
+   */
   public function __wakeup() {
     if ($this->id !== FALSE) {
       // Make sure data is set, so the data will be loaded when needed.
@@ -782,7 +792,7 @@ abstract class RulesIdentifiableDataWrapper extends EntityStructureWrapper {
 }
 
 /**
- * Interface that allows custom wrapper classes to declare that they are savable.
+ * Used to declare custom wrapper classes as savable.
  */
 interface RulesDataWrapperSavableInterface {
 
diff --git a/modules/php.eval.inc b/modules/php.eval.inc
index b4ee1c2..ac400b0 100644
--- a/modules/php.eval.inc
+++ b/modules/php.eval.inc
@@ -14,10 +14,21 @@
  */
 class RulesPHPEvaluator extends RulesDataInputEvaluator {
 
+  /**
+   * Overrides RulesDataProcessor::editAccess().
+   */
   public function editAccess() {
     return parent::editAccess() && (user_access('use PHP for settings') || drupal_is_cli());
   }
 
+  /**
+   * Helper function to find variables in PHP code.
+   *
+   * @param string $text
+   *   The PHP code.
+   * @param array $var_info
+   *   Array with variable names as keys.
+   */
   public static function getUsedVars($text, $var_info) {
     if (strpos($text, '<?') !== FALSE) {
       $used_vars = array();
@@ -132,7 +143,7 @@ function rules_execute_php_eval($code, $settings, $state, $element) {
  *
  * @param string $code
  *   The PHP code to run, including <?php and ?>
- * @param $arguments
+ * @param array $arguments
  *   Array containing variables to be extracted to the code.
  *
  * @return
@@ -157,7 +168,7 @@ function rules_php_eval($code, $arguments = array()) {
  *
  * @param string $code
  *   The PHP code to run, without <?php or ?>
- * @param $arguments
+ * @param array $arguments
  *   Array containing variables to be extracted to the code.
  *
  * @return
diff --git a/rules.api.php b/rules.api.php
index 2bfbb01..f8af7bd 100644
--- a/rules.api.php
+++ b/rules.api.php
@@ -763,7 +763,7 @@ function hook_rules_data_processor_info_alter(&$processor_info) {
  * This hook is invoked during rules configuration loading, which is handled
  * by entity_load(), via classes RulesEntityController and EntityCRUDController.
  *
- * @param $configs
+ * @param array $configs
  *   An array of rules configurations being loaded, keyed by id.
  */
 function hook_rules_config_load($configs) {
@@ -903,10 +903,10 @@ function hook_default_rules_configuration_alter(&$configs) {
  * This hook is invoked by the entity module after default rules configurations
  * have been rebuilt; i.e. defaults have been saved to the database.
  *
- * @param $rules_configs
+ * @param array $rules_configs
  *   The array of default rules configurations which have been inserted or
  *   updated, keyed by name.
- * @param $originals
+ * @param array $originals
  *   An array of original rules configurations keyed by name; i.e. the rules
  *   configurations before the current defaults have been applied. For inserted
  *   rules configurations no original is available.
diff --git a/rules.module b/rules.module
index a37aa53..38cd068 100644
--- a/rules.module
+++ b/rules.module
@@ -78,7 +78,7 @@ function rules_ui() {
  *
  * @param $name
  *   The action's name.
- * @param $settings
+ * @param array $settings
  *   The action's settings array.
  *
  * @return RulesAction
@@ -92,7 +92,7 @@ function rules_action($name, $settings = array()) {
  *
  * @param $name
  *   The condition's name.
- * @param $settings
+ * @param array $settings
  *   The condition's settings array.
  *
  * @return RulesCondition
@@ -104,7 +104,7 @@ function rules_condition($name, $settings = array()) {
 /**
  * Creates a new rule.
  *
- * @param $variables
+ * @param array $variables
  *   The array of variables to setup in the evaluation state, making them
  *   available for the configuration elements. Values for the variables need to
  *   be passed as argument when the rule is executed. Only Rule instances with
@@ -119,7 +119,7 @@ function rules_condition($name, $settings = array()) {
  *      initially, but the "Set data value" action may be used to do so. This is
  *      in particular useful for defining variables which can be provided to the
  *      caller (see $provides argument) but need not be passed in as parameter.
- * @param $provides
+ * @param array $provides
  *   The names of variables which should be provided to the caller. Only
  *   variables contained in $variables may be specified.
  *
@@ -141,7 +141,7 @@ function rules_reaction_rule() {
 /**
  * Creates a logical OR condition container.
  *
- * @param $variables
+ * @param array $variables
  *   An optional array as for rule().
  *
  * @return RulesOr
@@ -153,7 +153,7 @@ function rules_or($variables = NULL) {
 /**
  * Creates a logical AND condition container.
  *
- * @param $variables
+ * @param array $variables
  *   An optional array as for rule().
  *
  * @return RulesAnd
@@ -165,12 +165,12 @@ function rules_and($variables = NULL) {
 /**
  * Creates a loop.
  *
- * @param $settings
+ * @param array $settings
  *   The loop settings, containing
  *     'list:select': The data selector for the list to loop over.
  *     'item:var': Optionally a name for the list item variable.
  *     'item:label': Optionally a label for the list item variable.
- * @param $variables
+ * @param array $variables
  *   An optional array as for rule().
  *
  * @return RulesLoop
@@ -182,9 +182,9 @@ function rules_loop($settings = array(), $variables = NULL) {
 /**
  * Creates a rule set.
  *
- * @param $variables
+ * @param array $variables
  *   An array as for rule().
- * @param $provides
+ * @param array $provides
  *   The names of variables which should be provided to the caller. See rule().
  *
  * @return RulesRuleSet
@@ -196,9 +196,9 @@ function rules_rule_set($variables = array(), $provides = array()) {
 /**
  * Creates an action set.
  *
- * @param $variables
+ * @param array $variables
  *   An array as for rule().
- * @param $provides
+ * @param array $provides
  *   The names of variables which should be provided to the caller. See rule().
  *
  * @return RulesActionSet
@@ -212,7 +212,7 @@ function rules_action_set($variables = array(), $provides = array()) {
  *
  * @param $msg
  *   The message to log.
- * @param $args
+ * @param array $args
  *   An array of placeholder arguments as used by t().
  * @param $priority
  *   A priority as defined by the RulesLog class.
@@ -574,9 +574,9 @@ function &rules_wrap_data($data = NULL, $info, $force = FALSE) {
 /**
  * Unwraps the given data, if it's wrapped.
  *
- * @param $data
+ * @param array $data
  *   An array of wrapped data.
- * @param $info
+ * @param array $info
  *   Optionally an array of info about how to unwrap the data. Keyed as $data.
  *
  * @return array
@@ -880,9 +880,9 @@ function rules_hook_info() {
  * @see hook_entity_info()
  * @see RulesEntityController
  *
- * @param $names
+ * @param array|false $names
  *   An array of rules configuration names or FALSE to load all.
- * @param $conditions
+ * @param array $conditions
  *   An array of conditions in the form 'field' => $value.
  *
  * @return array
@@ -913,7 +913,7 @@ function rules_config_load($name) {
  *   Whether to return only the label or the whole component object.
  * @param $type
  *   Optionally filter for 'action' or 'condition' components.
- * @param $conditions
+ * @param array $conditions
  *   An array of additional conditions as required by rules_config_load().
  *
  * @return array
@@ -939,7 +939,7 @@ function rules_get_components($label = FALSE, $type = NULL, $conditions = array(
 /**
  * Delete rule configurations from database.
  *
- * @param $ids
+ * @param array $ids
  *   An array of entity IDs.
  */
 function rules_config_delete(array $ids) {
@@ -1063,7 +1063,7 @@ function rules_invoke_event() {
  *
  * @param $event_name
  *   The event's name.
- * @param $args
+ * @param array $args
  *   An array of parameters for the variables provided by the event, as defined
  *   in hook_rules_event_info(). Either pass an array keyed by the variable
  *   names or a numerically indexed array, in which case the ordering of the
@@ -1113,7 +1113,7 @@ function rules_invoke_component() {
  * This filter operates by keeping only entries which have $key set to the
  * value of $value.
  *
- * @param $array
+ * @param array $array
  *   The array of arrays to filter.
  * @param $key
  *   The key used for the comparison.
@@ -1157,7 +1157,7 @@ function rules_update_array(array $array, array $update) {
 /**
  * Extracts the property with the given name.
  *
- * @param $arrays
+ * @param array $arrays
  *   An array of arrays from which a property is to be extracted.
  * @param $key
  *   The name of the property to extract.
@@ -1188,9 +1188,9 @@ function rules_array_key($array) {
  *
  * @param $replacements
  *   An array of token replacements that need to be "cleaned" for use in the URL.
- * @param $data
+ * @param array $data
  *   An array of objects used to generate the replacements.
- * @param $options
+ * @param array $options
  *   An array of options used to generate the replacements.
  *
  * @see rules_path_action_info()
diff --git a/rules_scheduler/rules_scheduler.drush.inc b/rules_scheduler/rules_scheduler.drush.inc
index a2b4d90..a6ed795 100644
--- a/rules_scheduler/rules_scheduler.drush.inc
+++ b/rules_scheduler/rules_scheduler.drush.inc
@@ -21,7 +21,7 @@ function rules_scheduler_drush_command() {
     'examples' => array(
       'drush rusch' => 'Add scheduled tasks to the queue.',
       'drush rusch --claim' => 'Add scheduled tasks to the queue and claim items for the default amount of time.',
-      'drush rusch --claim=30' => 'Add schedules tasks to the queue and claim items for 30 seconds.',
+      'drush rusch --claim=30' => 'Add scheduled tasks to the queue and claim items for 30 seconds.',
     ),
   );
 
diff --git a/rules_scheduler/rules_scheduler.module b/rules_scheduler/rules_scheduler.module
index f54cc23..a4c3e4b 100644
--- a/rules_scheduler/rules_scheduler.module
+++ b/rules_scheduler/rules_scheduler.module
@@ -173,7 +173,7 @@ function rules_scheduler_schedule_task($task) {
  * Queue tasks that are ready for execution.
  *
  * @return bool
- *   Returns TRUE if any queue items where created, otherwise FALSE.
+ *   TRUE if any queue items where created, otherwise FALSE.
  */
 function rules_scheduler_queue_tasks() {
   $items_created = FALSE;
diff --git a/rules_scheduler/tests/rules_scheduler.test b/rules_scheduler/tests/rules_scheduler.test
index a580fee..4e19e80 100644
--- a/rules_scheduler/tests/rules_scheduler.test
+++ b/rules_scheduler/tests/rules_scheduler.test
@@ -5,6 +5,9 @@
  * Rules Scheduler tests.
  */
 
+/**
+ * Test cases for the Rules Scheduler module.
+ */
 class RulesSchedulerTestCase extends DrupalWebTestCase {
 
   /**
diff --git a/tests/rules.test b/tests/rules.test
index 6d3ed7f..bd0af9d 100644
--- a/tests/rules.test
+++ b/tests/rules.test
@@ -5,6 +5,9 @@
  * Rules tests.
  */
 
+/**
+ * Rules test cases.
+ */
 class RulesTestCase extends DrupalWebTestCase {
 
   /**
@@ -623,7 +626,7 @@ class RulesTestCase extends DrupalWebTestCase {
     // Customize action info using the settings.
     $rule->condition('data_is', array('data:select' => 'node:type', 'value' => 'page'))
          // Configure an condition using the body. As the body is a field,
-         // tis requires the bundle to be correctly asserted.
+         // this requires the bundle to be correctly asserted.
          ->condition(rules_condition('data_is', array('data:select' => 'node:body:value', 'value' => 'foo'))->negate())
          // The action also requires the page bundle in order to work.
          ->action($action);
diff --git a/tests/rules_test.module b/tests/rules_test.module
index 166067f..4c54faf 100644
--- a/tests/rules_test.module
+++ b/tests/rules_test.module
@@ -50,6 +50,9 @@ function rules_test_get_referenced_node($node) {
   return array($node->nid);
 }
 
+/**
+ * Access callback. Returns TRUE except when $op == 'edit'.
+ */
 function rules_test_no_access($op) {
   return $op == 'edit' ? FALSE : TRUE;
 }
diff --git a/tests/rules_test.rules.inc b/tests/rules_test.rules.inc
index ef6702f..3f302f4 100644
--- a/tests/rules_test.rules.inc
+++ b/tests/rules_test.rules.inc
@@ -13,7 +13,7 @@ function rules_test_rules_event_info() {
     'rules_test_event' => array(
       'label' => t('Test event'),
       'class' => 'RulesTestEventHandler',
-    )
+    ),
   );
 }
 
