diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-05-06 05:59:31 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-05-06 05:59:31 +0000 |
commit | ed86172814c02747b7036745f0411e34998c6f4a (patch) | |
tree | 6246e7451a458ec832aefa9404675709e78e982a /modules/comment | |
parent | 526558401680f5d8b402823dbd5d40fd17620980 (diff) | |
download | brdo-ed86172814c02747b7036745f0411e34998c6f4a.tar.gz brdo-ed86172814c02747b7036745f0411e34998c6f4a.tar.bz2 |
#331951 by aspilicious, sun, jhodgdon, Morbus, et al: Figure out and apply coding standard for casting.
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.module | 8 | ||||
-rw-r--r-- | modules/comment/comment.test | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index b78210d2c..a688daa01 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -422,7 +422,7 @@ function comment_block_configure($delta = '') { * Implements hook_block_save(). */ function comment_block_save($delta = '', $edit = array()) { - variable_set('comment_block_count', (int)$edit['comment_block_count']); + variable_set('comment_block_count', (int) $edit['comment_block_count']); } /** @@ -2089,7 +2089,7 @@ function comment_submit($comment) { $comment['subject'] = t('(No subject)'); } } - return (object)$comment; + return (object) $comment; } /** @@ -2100,7 +2100,7 @@ function comment_form_submit_build_comment($form, &$form_state) { field_attach_submit('comment', $comment, $form, $form_state); - $form_state['comment'] = (array)$comment; + $form_state['comment'] = (array) $comment; $form_state['rebuild'] = TRUE; return $comment; } @@ -2363,7 +2363,7 @@ function _comment_update_node_statistics($nid) { * 31000, 31001, ... */ function int2vancode($i = 0) { - $num = base_convert((int)$i, 10, 36); + $num = base_convert((int) $i, 10, 36); $length = strlen($num); return chr($length + ord('0') - 1) . $num; diff --git a/modules/comment/comment.test b/modules/comment/comment.test index 570724552..8213adcc6 100644 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -1248,15 +1248,15 @@ class CommentRdfaTestCase extends CommentHelperCase { $comment_container = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]'); $this->assertTrue(!empty($comment_container), t("Comment RDF type for comment found.")); $comment_title = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]//h3[@property="dc:title"]'); - $this->assertEqual((string)$comment_title[0]->a, $comment->subject, t("RDFa markup for the comment title found.")); + $this->assertEqual((string) $comment_title[0]->a, $comment->subject, t("RDFa markup for the comment title found.")); $comment_date = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]//*[contains(@property, "dc:date") and contains(@property, "dc:created")]'); $this->assertTrue(!empty($comment_date), t("RDFa markup for the date of the comment found.")); // The author tag can be either a or span $comment_author = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]//span[@rel="sioc:has_creator"]/*[contains(@class, "username") and @typeof="sioc:UserAccount" and @property="foaf:name"]'); $name = empty($account["name"]) ? $this->web_user->name : $account["name"] . " (not verified)"; - $this->assertEqual((string)$comment_author[0], $name, t("RDFa markup for the comment author found.")); + $this->assertEqual((string) $comment_author[0], $name, t("RDFa markup for the comment author found.")); $comment_body = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]//div[@class="content"]//div[contains(@class, "comment-body")]//div[@property="content:encoded"]'); - $this->assertEqual((string)$comment_body[0]->p, $comment->comment, t("RDFa markup for the comment body found.")); + $this->assertEqual((string) $comment_body[0]->p, $comment->comment, t("RDFa markup for the comment body found.")); } } |