From 62afeb0adaef8736ee6ad2750a8439d925ecd78c Mon Sep 17 00:00:00 2001 From: SharkyKZ Date: Mon, 19 Oct 2020 11:46:19 +0300 Subject: [PATCH 1/9] Rename method arguments to use camelCase casing --- libraries/joomla/database/driver/pgsql.php | 24 +- .../joomla/database/driver/postgresql.php | 30 +- .../joomla/database/query/postgresql.php | 20 +- libraries/joomla/linkedin/groups.php | 258 +++++++++--------- libraries/joomla/openstreetmap/elements.php | 6 +- libraries/joomla/twitter/statuses.php | 240 ++++++++-------- libraries/joomla/utilities/arrayhelper.php | 18 +- 7 files changed, 298 insertions(+), 298 deletions(-) diff --git a/libraries/joomla/database/driver/pgsql.php b/libraries/joomla/database/driver/pgsql.php index 9932a6639f4a0..18300179af467 100644 --- a/libraries/joomla/database/driver/pgsql.php +++ b/libraries/joomla/database/driver/pgsql.php @@ -474,26 +474,26 @@ public function renameTable($oldTable, $newTable, $backup = null, $prefix = null /** * This function return a field value as a prepared string to be used in a SQL statement. * - * @param array $columns Array of table's column returned by ::getTableColumns. - * @param string $field_name The table field's name. - * @param string $field_value The variable value to quote and return. + * @param array $columns Array of table's column returned by ::getTableColumns. + * @param string $fieldName The table field's name. + * @param string $fieldValue The variable value to quote and return. * * @return string The quoted string. * * @since 3.9.0 */ - public function sqlValue($columns, $field_name, $field_value) + public function sqlValue($columns, $fieldName, $fieldValue) { - switch ($columns[$field_name]) + switch ($columns[$fieldName]) { case 'boolean': $val = 'NULL'; - if ($field_value === 't' || $field_value === true || $field_value === 1 || $field_value === '1') + if ($fieldValue === 't' || $fieldValue === true || $fieldValue === 1 || $fieldValue === '1') { $val = 'TRUE'; } - elseif ($field_value === 'f' || $field_value === false || $field_value === 0 || $field_value === '0') + elseif ($fieldValue === 'f' || $fieldValue === false || $fieldValue === 0 || $fieldValue === '0') { $val = 'FALSE'; } @@ -509,22 +509,22 @@ public function sqlValue($columns, $field_name, $field_value) case 'smallint': case 'serial': case 'numeric,': - $val = $field_value === '' ? 'NULL' : $field_value; + $val = $fieldValue === '' ? 'NULL' : $fieldValue; break; case 'date': case 'timestamp without time zone': - if (empty($field_value)) + if (empty($fieldValue)) { - $field_value = $this->getNullDate(); + $fieldValue = $this->getNullDate(); } - $val = $this->quote($field_value); + $val = $this->quote($fieldValue); break; default: - $val = $this->quote($field_value); + $val = $this->quote($fieldValue); break; } diff --git a/libraries/joomla/database/driver/postgresql.php b/libraries/joomla/database/driver/postgresql.php index 361d5de8881b4..9b5cefedafd47 100644 --- a/libraries/joomla/database/driver/postgresql.php +++ b/libraries/joomla/database/driver/postgresql.php @@ -407,12 +407,12 @@ public function getTableColumns($table, $typeOnly = true) $tableSub = $this->replacePrefix($table); $fn = explode('.', $tableSub); - if (count($fn) === 2) + if (count($fn) === 2) { $schema = $fn[0]; $tableSub = $fn[1]; - } - else + } + else { $schema = 'public'; } @@ -936,26 +936,26 @@ public function setUtf() /** * This function return a field value as a prepared string to be used in a SQL statement. * - * @param array $columns Array of table's column returned by ::getTableColumns. - * @param string $field_name The table field's name. - * @param string $field_value The variable value to quote and return. + * @param array $columns Array of table's column returned by ::getTableColumns. + * @param string $fieldName The table field's name. + * @param string $fieldValue The variable value to quote and return. * * @return string The quoted string. * * @since 3.0.0 */ - public function sqlValue($columns, $field_name, $field_value) + public function sqlValue($columns, $fieldName, $fieldValue) { - switch ($columns[$field_name]) + switch ($columns[$fieldName]) { case 'boolean': $val = 'NULL'; - if ($field_value == 't') + if ($fieldValue == 't') { $val = 'TRUE'; } - elseif ($field_value == 'f') + elseif ($fieldValue == 'f') { $val = 'FALSE'; } @@ -971,21 +971,21 @@ public function sqlValue($columns, $field_name, $field_value) case 'smallint': case 'serial': case 'numeric,': - $val = strlen($field_value) == 0 ? 'NULL' : $field_value; + $val = strlen($fieldValue) == 0 ? 'NULL' : $fieldValue; break; case 'date': case 'timestamp without time zone': - if (empty($field_value)) + if (empty($fieldValue)) { - $field_value = $this->getNullDate(); + $fieldValue = $this->getNullDate(); } - $val = $this->quote($field_value); + $val = $this->quote($fieldValue); break; default: - $val = $this->quote($field_value); + $val = $this->quote($fieldValue); break; } diff --git a/libraries/joomla/database/query/postgresql.php b/libraries/joomla/database/query/postgresql.php index 4b1b95f8889fb..edd01309d3bde 100644 --- a/libraries/joomla/database/query/postgresql.php +++ b/libraries/joomla/database/query/postgresql.php @@ -404,25 +404,25 @@ public function currentTimestamp() /** * Sets the FOR UPDATE lock on select's output row * - * @param string $table_name The table to lock - * @param string $glue The glue by which to join the conditions. Defaults to ',' . + * @param string $tableName The table to lock + * @param string $glue The glue by which to join the conditions. Defaults to ',' . * * @return JDatabaseQueryPostgresql FOR UPDATE query element * * @since 1.7.3 */ - public function forUpdate($table_name, $glue = ',') + public function forUpdate($tableName, $glue = ',') { $this->type = 'forUpdate'; if (is_null($this->forUpdate)) { $glue = strtoupper($glue); - $this->forUpdate = new JDatabaseQueryElement('FOR UPDATE', 'OF ' . $table_name, "$glue "); + $this->forUpdate = new JDatabaseQueryElement('FOR UPDATE', 'OF ' . $tableName, "$glue "); } else { - $this->forUpdate->append($table_name); + $this->forUpdate->append($tableName); } return $this; @@ -431,25 +431,25 @@ public function forUpdate($table_name, $glue = ',') /** * Sets the FOR SHARE lock on select's output row * - * @param string $table_name The table to lock - * @param string $glue The glue by which to join the conditions. Defaults to ',' . + * @param string $tableName The table to lock + * @param string $glue The glue by which to join the conditions. Defaults to ',' . * * @return JDatabaseQueryPostgresql FOR SHARE query element * * @since 1.7.3 */ - public function forShare($table_name, $glue = ',') + public function forShare($tableName, $glue = ',') { $this->type = 'forShare'; if (is_null($this->forShare)) { $glue = strtoupper($glue); - $this->forShare = new JDatabaseQueryElement('FOR SHARE', 'OF ' . $table_name, "$glue "); + $this->forShare = new JDatabaseQueryElement('FOR SHARE', 'OF ' . $tableName, "$glue "); } else { - $this->forShare->append($table_name); + $this->forShare->append($tableName); } return $this; diff --git a/libraries/joomla/linkedin/groups.php b/libraries/joomla/linkedin/groups.php index b8bfda84b3a1e..1494ce66c3652 100644 --- a/libraries/joomla/linkedin/groups.php +++ b/libraries/joomla/linkedin/groups.php @@ -72,18 +72,18 @@ public function getGroup($id, $fields = null, $start = 0, $count = 5) /** * Method to find the groups a member belongs to. * - * @param string $id The unique identifier for a user. - * @param string $fields Request fields beyond the default ones. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * @param string $membership_state The state of the caller’s membership to the specified group. - * Values are: non-member, awaiting-confirmation, awaiting-parent-group-confirmation, member, moderator, manager, owner. + * @param string $id The unique identifier for a user. + * @param string $fields Request fields beyond the default ones. + * @param integer $start Starting location within the result set for paginated returns. + * @param integer $count The number of results returned. + * @param string $membershipState The state of the caller’s membership to the specified group. + * Values are: non-member, awaiting-confirmation, awaiting-parent-group-confirmation, member, moderator, manager, owner. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function getMemberships($id = null, $fields = null, $start = 0, $count = 5, $membership_state = null) + public function getMemberships($id = null, $fields = null, $start = 0, $count = 5, $membershipState = null) { $token = $this->oauth->getToken(); @@ -126,9 +126,9 @@ public function getMemberships($id = null, $fields = null, $start = 0, $count = } // Check if membership_state is specified. - if ($membership_state) + if ($membershipState) { - $data['membership-state'] = $membership_state; + $data['membership-state'] = $membershipState; } // Build the request path. @@ -143,17 +143,17 @@ public function getMemberships($id = null, $fields = null, $start = 0, $count = /** * Method to find the groups a member belongs to. * - * @param string $person_id The unique identifier for a user. - * @param string $group_id The unique identifier for a group. - * @param string $fields Request fields beyond the default ones. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. + * @param string $personId The unique identifier for a user. + * @param string $groupId The unique identifier for a group. + * @param string $fields Request fields beyond the default ones. + * @param integer $start Starting location within the result set for paginated returns. + * @param integer $count The number of results returned. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function getSettings($person_id = null, $group_id = null, $fields = null, $start = 0, $count = 5) + public function getSettings($personId = null, $groupId = null, $fields = null, $start = 0, $count = 5) { $token = $this->oauth->getToken(); @@ -166,9 +166,9 @@ public function getSettings($person_id = null, $group_id = null, $fields = null, $base = '/v1/people/'; // Check if person_id is specified. - if ($person_id) + if ($personId) { - $base .= $person_id . '/group-memberships'; + $base .= $personId . '/group-memberships'; } else { @@ -176,9 +176,9 @@ public function getSettings($person_id = null, $group_id = null, $fields = null, } // Check if group_id is specified. - if ($group_id) + if ($groupId) { - $base .= '/' . $group_id; + $base .= '/' . $groupId; } $data['format'] = 'json'; @@ -213,19 +213,19 @@ public function getSettings($person_id = null, $group_id = null, $fields = null, /** * Method to change a groups settings. * - * @param string $group_id The unique identifier for a group. - * @param boolean $show_logo Show group logo in profile. - * @param string $digest_frequency Email digest frequency. - * @param boolean $announcements Email announcements from managers. - * @param boolean $allow_messages Allow messages from members. - * @param boolean $new_post Email for every new post. + * @param string $groupId The unique identifier for a group. + * @param boolean $showLogo Show group logo in profile. + * @param string $digestFrequency Email digest frequency. + * @param boolean $announcements Email announcements from managers. + * @param boolean $allowMessages Allow messages from members. + * @param boolean $newPost Email for every new post. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function changeSettings($group_id, $show_logo = null, $digest_frequency = null, $announcements = null, - $allow_messages = null, $new_post = null) + public function changeSettings($groupId, $showLogo = null, $digestFrequency = null, $announcements = null, + $allowMessages = null, $newPost = null) { $token = $this->oauth->getToken(); @@ -235,19 +235,19 @@ public function changeSettings($group_id, $show_logo = null, $digest_frequency = ); // Set the API base - $base = '/v1/people/~/group-memberships/' . $group_id; + $base = '/v1/people/~/group-memberships/' . $groupId; // Build xml. $xml = ''; - if (!is_null($show_logo)) + if (!is_null($showLogo)) { - $xml .= '' . $this->booleanToString($show_logo) . ''; + $xml .= '' . $this->booleanToString($showLogo) . ''; } - if ($digest_frequency) + if ($digestFrequency) { - $xml .= '' . $digest_frequency . ''; + $xml .= '' . $digestFrequency . ''; } if (!is_null($announcements)) @@ -255,14 +255,14 @@ public function changeSettings($group_id, $show_logo = null, $digest_frequency = $xml .= '' . $this->booleanToString($announcements) . ''; } - if (!is_null($allow_messages)) + if (!is_null($allowMessages)) { - $xml .= '' . $this->booleanToString($allow_messages) . ''; + $xml .= '' . $this->booleanToString($allowMessages) . ''; } - if (!is_null($new_post)) + if (!is_null($newPost)) { - $xml .= '' . $this->booleanToString($new_post) . ''; + $xml .= '' . $this->booleanToString($newPost) . ''; } $xml .= ''; @@ -281,19 +281,19 @@ public function changeSettings($group_id, $show_logo = null, $digest_frequency = /** * Method to join a group. * - * @param string $group_id The unique identifier for a group. - * @param boolean $show_logo Show group logo in profile. - * @param string $digest_frequency Email digest frequency. + * @param string $groupId The unique identifier for a group. + * @param boolean $showLogo Show group logo in profile. + * @param string $digestFrequency Email digest frequency. * @param boolean $announcements Email announcements from managers. - * @param boolean $allow_messages Allow messages from members. - * @param boolean $new_post Email for every new post. + * @param boolean $allowMessages Allow messages from members. + * @param boolean $newPost Email for every new post. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function joinGroup($group_id, $show_logo = null, $digest_frequency = null, $announcements = null, - $allow_messages = null, $new_post = null) + public function joinGroup($groupId, $showLogo = null, $digestFrequency = null, $announcements = null, + $allowMessages = null, $newPost = null) { $token = $this->oauth->getToken(); @@ -309,16 +309,16 @@ public function joinGroup($group_id, $show_logo = null, $digest_frequency = null $base = '/v1/people/~/group-memberships'; // Build xml. - $xml = '' . $group_id . ''; + $xml = '' . $groupId . ''; - if (!is_null($show_logo)) + if (!is_null($showLogo)) { - $xml .= '' . $this->booleanToString($show_logo) . ''; + $xml .= '' . $this->booleanToString($showLogo) . ''; } - if ($digest_frequency) + if ($digestFrequency) { - $xml .= '' . $digest_frequency . ''; + $xml .= '' . $digestFrequency . ''; } if (!is_null($announcements)) @@ -326,14 +326,14 @@ public function joinGroup($group_id, $show_logo = null, $digest_frequency = null $xml .= '' . $this->booleanToString($announcements) . ''; } - if (!is_null($allow_messages)) + if (!is_null($allowMessages)) { - $xml .= '' . $this->booleanToString($allow_messages) . ''; + $xml .= '' . $this->booleanToString($allowMessages) . ''; } - if (!is_null($new_post)) + if (!is_null($newPost)) { - $xml .= '' . $this->booleanToString($new_post) . ''; + $xml .= '' . $this->booleanToString($newPost) . ''; } $xml .= 'member'; @@ -352,13 +352,13 @@ public function joinGroup($group_id, $show_logo = null, $digest_frequency = null /** * Method to leave a group. * - * @param string $group_id The unique identifier for a group. + * @param string $groupId The unique identifier for a group. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function leaveGroup($group_id) + public function leaveGroup($groupId) { $token = $this->oauth->getToken(); @@ -371,7 +371,7 @@ public function leaveGroup($group_id) $this->oauth->setOption('success_code', 204); // Set the API base - $base = '/v1/people/~/group-memberships/' . $group_id; + $base = '/v1/people/~/group-memberships/' . $groupId; // Build the request path. $path = $this->getOption('api.url') . $base; @@ -385,19 +385,19 @@ public function leaveGroup($group_id) /** * Method to get dicussions for a group. * - * @param string $id The unique identifier for a group. - * @param string $fields Request fields beyond the default ones. - * @param integer $start Starting location within the result set for paginated returns. - * @param integer $count The number of results returned. - * @param string $order Sort order for posts. Valid for: recency, popularity. - * @param string $category Category of posts. Valid for: discussion - * @param string $modified_since Timestamp filter for posts created after the specified value. + * @param string $id The unique identifier for a group. + * @param string $fields Request fields beyond the default ones. + * @param integer $start Starting location within the result set for paginated returns. + * @param integer $count The number of results returned. + * @param string $order Sort order for posts. Valid for: recency, popularity. + * @param string $category Category of posts. Valid for: discussion + * @param string $modifiedSince Timestamp filter for posts created after the specified value. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function getDiscussions($id, $fields = null, $start = 0, $count = 0, $order = null, $category = 'discussion', $modified_since = null) + public function getDiscussions($id, $fields = null, $start = 0, $count = 0, $order = null, $category = 'discussion', $modifiedSince = null) { $token = $this->oauth->getToken(); @@ -442,9 +442,9 @@ public function getDiscussions($id, $fields = null, $start = 0, $count = 0, $ord } // Check if modified_since is specified. - if ($modified_since) + if ($modifiedSince) { - $data['modified-since'] = $modified_since; + $data['modified-since'] = $modifiedSince; } // Build the request path. @@ -459,22 +459,22 @@ public function getDiscussions($id, $fields = null, $start = 0, $count = 0, $ord /** * Method to get posts a user started / participated in / follows for a group. * - * @param string $group_id The unique identifier for a group. + * @param string $groupId The unique identifier for a group. * @param string $role Filter for posts related to the caller. Valid for: creator, commenter, follower. - * @param string $person_id The unique identifier for a user. + * @param string $personId The unique identifier for a user. * @param string $fields Request fields beyond the default ones. * @param integer $start Starting location within the result set for paginated returns. * @param integer $count The number of results returned. * @param string $order Sort order for posts. Valid for: recency, popularity. * @param string $category Category of posts. Valid for: discussion - * @param string $modified_since Timestamp filter for posts created after the specified value. + * @param string $modifiedSince Timestamp filter for posts created after the specified value. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function getUserPosts($group_id, $role, $person_id = null, $fields = null, $start = 0, $count = 0, - $order = null, $category = 'discussion', $modified_since = null) + public function getUserPosts($groupId, $role, $personId = null, $fields = null, $start = 0, $count = 0, + $order = null, $category = 'discussion', $modifiedSince = null) { $token = $this->oauth->getToken(); @@ -487,16 +487,16 @@ public function getUserPosts($group_id, $role, $person_id = null, $fields = null $base = '/v1/people/'; // Check if person_id is specified. - if ($person_id) + if ($personId) { - $base .= $person_id; + $base .= $personId; } else { $base .= '~'; } - $base .= '/group-memberships/' . $group_id . '/posts'; + $base .= '/group-memberships/' . $groupId . '/posts'; $data['format'] = 'json'; $data['role'] = $role; @@ -532,9 +532,9 @@ public function getUserPosts($group_id, $role, $person_id = null, $fields = null } // Check if modified_since is specified. - if ($modified_since) + if ($modifiedSince) { - $data['modified-since'] = $modified_since; + $data['modified-since'] = $modifiedSince; } // Build the request path. @@ -549,14 +549,14 @@ public function getUserPosts($group_id, $role, $person_id = null, $fields = null /** * Method to retrieve details about a post. * - * @param string $post_id The unique identifier for a post. - * @param string $fields Request fields beyond the default ones. + * @param string $postId The unique identifier for a post. + * @param string $fields Request fields beyond the default ones. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function getPost($post_id, $fields = null) + public function getPost($postId, $fields = null) { $token = $this->oauth->getToken(); @@ -566,7 +566,7 @@ public function getPost($post_id, $fields = null) ); // Set the API base - $base = '/v1/posts/' . $post_id; + $base = '/v1/posts/' . $postId; $data['format'] = 'json'; @@ -588,7 +588,7 @@ public function getPost($post_id, $fields = null) /** * Method to retrieve all comments of a post. * - * @param string $post_id The unique identifier for a post. + * @param string $postId The unique identifier for a post. * @param string $fields Request fields beyond the default ones. * @param integer $start Starting location within the result set for paginated returns. * @param integer $count The number of results returned. @@ -597,7 +597,7 @@ public function getPost($post_id, $fields = null) * * @since 3.2.0 */ - public function getPostComments($post_id, $fields = null, $start = 0, $count = 0) + public function getPostComments($postId, $fields = null, $start = 0, $count = 0) { $token = $this->oauth->getToken(); @@ -607,7 +607,7 @@ public function getPostComments($post_id, $fields = null, $start = 0, $count = 0 ); // Set the API base - $base = '/v1/posts/' . $post_id . '/comments'; + $base = '/v1/posts/' . $postId . '/comments'; $data['format'] = 'json'; @@ -641,7 +641,7 @@ public function getPostComments($post_id, $fields = null, $start = 0, $count = 0 /** * Method to retrieve all comments of a post. * - * @param string $group_id The unique identifier for a group. + * @param string $groupId The unique identifier for a group. * @param string $title Post title. * @param string $summary Post summary. * @@ -649,7 +649,7 @@ public function getPostComments($post_id, $fields = null, $start = 0, $count = 0 * * @since 3.2.0 */ - public function createPost($group_id, $title, $summary) + public function createPost($groupId, $title, $summary) { $token = $this->oauth->getToken(); @@ -662,7 +662,7 @@ public function createPost($group_id, $title, $summary) $this->oauth->setOption('success_code', 201); // Set the API base - $base = '/v1/groups/' . $group_id . '/posts'; + $base = '/v1/groups/' . $groupId . '/posts'; // Build xml. $xml = '' . $title . '' . $summary . ''; @@ -684,14 +684,14 @@ public function createPost($group_id, $title, $summary) /** * Method to like or unlike a post. * - * @param string $post_id The unique identifier for a group. + * @param string $postId The unique identifier for a group. * @param boolean $like True to like post, false otherwise. * * @return array The decoded JSON response * * @since 3.2.0 */ - private function _likeUnlike($post_id, $like) + private function _likeUnlike($postId, $like) { $token = $this->oauth->getToken(); @@ -704,7 +704,7 @@ private function _likeUnlike($post_id, $like) $this->oauth->setOption('success_code', 204); // Set the API base - $base = '/v1/posts/' . $post_id . '/relation-to-viewer/is-liked'; + $base = '/v1/posts/' . $postId . '/relation-to-viewer/is-liked'; // Build xml. $xml = '' . $this->booleanToString($like) . ''; @@ -723,42 +723,42 @@ private function _likeUnlike($post_id, $like) /** * Method used to like a post. * - * @param string $post_id The unique identifier for a group. + * @param string $postId The unique identifier for a group. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function likePost($post_id) + public function likePost($postId) { - return $this->_likeUnlike($post_id, true); + return $this->_likeUnlike($postId, true); } /** * Method used to unlike a post. * - * @param string $post_id The unique identifier for a group. + * @param string $postId The unique identifier for a group. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function unlikePost($post_id) + public function unlikePost($postId) { - return $this->_likeUnlike($post_id, false); + return $this->_likeUnlike($postId, false); } /** * Method to follow or unfollow a post. * - * @param string $post_id The unique identifier for a group. + * @param string $postId The unique identifier for a group. * @param boolean $follow True to like post, false otherwise. * * @return array The decoded JSON response * * @since 3.2.0 */ - private function _followUnfollow($post_id, $follow) + private function _followUnfollow($postId, $follow) { $token = $this->oauth->getToken(); @@ -771,7 +771,7 @@ private function _followUnfollow($post_id, $follow) $this->oauth->setOption('success_code', 204); // Set the API base - $base = '/v1/posts/' . $post_id . '/relation-to-viewer/is-following'; + $base = '/v1/posts/' . $postId . '/relation-to-viewer/is-following'; // Build xml. $xml = '' . $this->booleanToString($follow) . ''; @@ -790,42 +790,42 @@ private function _followUnfollow($post_id, $follow) /** * Method used to follow a post. * - * @param string $post_id The unique identifier for a group. + * @param string $postId The unique identifier for a group. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function followPost($post_id) + public function followPost($postId) { - return $this->_followUnfollow($post_id, true); + return $this->_followUnfollow($postId, true); } /** * Method used to unfollow a post. * - * @param string $post_id The unique identifier for a group. + * @param string $postId The unique identifier for a group. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function unfollowPost($post_id) + public function unfollowPost($postId) { - return $this->_followUnfollow($post_id, false); + return $this->_followUnfollow($postId, false); } /** * Method to flag a post as a Promotion or Job. * - * @param string $post_id The unique identifier for a group. - * @param string $flag Flag as a 'promotion' or 'job'. + * @param string $postId The unique identifier for a group. + * @param string $flag Flag as a 'promotion' or 'job'. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function flagPost($post_id, $flag) + public function flagPost($postId, $flag) { $token = $this->oauth->getToken(); @@ -838,7 +838,7 @@ public function flagPost($post_id, $flag) $this->oauth->setOption('success_code', 204); // Set the API base - $base = '/v1/posts/' . $post_id . '/category/code'; + $base = '/v1/posts/' . $postId . '/category/code'; // Build xml. $xml = '' . $flag . ''; @@ -857,13 +857,13 @@ public function flagPost($post_id, $flag) /** * Method to delete a post if the current user is the creator or flag it as inappropriate otherwise. * - * @param string $post_id The unique identifier for a group. + * @param string $postId The unique identifier for a group. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function deletePost($post_id) + public function deletePost($postId) { $token = $this->oauth->getToken(); @@ -876,7 +876,7 @@ public function deletePost($post_id) $this->oauth->setOption('success_code', 204); // Set the API base - $base = '/v1/posts/' . $post_id; + $base = '/v1/posts/' . $postId; // Build the request path. $path = $this->getOption('api.url') . $base; @@ -890,14 +890,14 @@ public function deletePost($post_id) /** * Method to access the comments resource. * - * @param string $comment_id The unique identifier for a comment. + * @param string $commentId The unique identifier for a comment. * @param string $fields Request fields beyond the default ones. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function getComment($comment_id, $fields = null) + public function getComment($commentId, $fields = null) { $token = $this->oauth->getToken(); @@ -907,7 +907,7 @@ public function getComment($comment_id, $fields = null) ); // Set the API base - $base = '/v1/comments/' . $comment_id; + $base = '/v1/comments/' . $commentId; $data['format'] = 'json'; @@ -929,14 +929,14 @@ public function getComment($comment_id, $fields = null) /** * Method to add a comment to a post * - * @param string $post_id The unique identifier for a group. + * @param string $postId The unique identifier for a group. * @param string $comment The post comment's text. * * @return string The created comment's id. * * @since 3.2.0 */ - public function addComment($post_id, $comment) + public function addComment($postId, $comment) { $token = $this->oauth->getToken(); @@ -949,7 +949,7 @@ public function addComment($post_id, $comment) $this->oauth->setOption('success_code', 201); // Set the API base - $base = '/v1/posts/' . $post_id . '/comments'; + $base = '/v1/posts/' . $postId . '/comments'; // Build xml. $xml = '' . $comment . ''; @@ -971,13 +971,13 @@ public function addComment($post_id, $comment) /** * Method to delete a comment if the current user is the creator or flag it as inappropriate otherwise. * - * @param string $comment_id The unique identifier for a group. + * @param string $commentId The unique identifier for a group. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function deleteComment($comment_id) + public function deleteComment($commentId) { $token = $this->oauth->getToken(); @@ -990,7 +990,7 @@ public function deleteComment($comment_id) $this->oauth->setOption('success_code', 204); // Set the API base - $base = '/v1/comments/' . $comment_id; + $base = '/v1/comments/' . $commentId; // Build the request path. $path = $this->getOption('api.url') . $base; @@ -1004,14 +1004,14 @@ public function deleteComment($comment_id) /** * Method to get suggested groups for a user. * - * @param string $person_id The unique identifier for a user. + * @param string $personId The unique identifier for a user. * @param string $fields Request fields beyond the default ones. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function getSuggested($person_id = null, $fields = null) + public function getSuggested($personId = null, $fields = null) { $token = $this->oauth->getToken(); @@ -1024,9 +1024,9 @@ public function getSuggested($person_id = null, $fields = null) $base = '/v1/people/'; // Check if person_id is specified. - if ($person_id) + if ($personId) { - $base .= $person_id . '/suggestions/groups'; + $base .= $personId . '/suggestions/groups'; } else { @@ -1053,14 +1053,14 @@ public function getSuggested($person_id = null, $fields = null) /** * Method to delete a group suggestion for a user. * - * @param string $suggestion_id The unique identifier for a suggestion. - * @param string $person_id The unique identifier for a user. + * @param string $suggestionId The unique identifier for a suggestion. + * @param string $personId The unique identifier for a user. * * @return array The decoded JSON response * * @since 3.2.0 */ - public function deleteSuggestion($suggestion_id, $person_id = null) + public function deleteSuggestion($suggestionId, $personId = null) { $token = $this->oauth->getToken(); @@ -1076,13 +1076,13 @@ public function deleteSuggestion($suggestion_id, $person_id = null) $base = '/v1/people/'; // Check if person_id is specified. - if ($person_id) + if ($personId) { - $base .= $person_id . '/suggestions/groups/' . $suggestion_id; + $base .= $personId . '/suggestions/groups/' . $suggestionId; } else { - $base .= '~/suggestions/groups/' . $suggestion_id; + $base .= '~/suggestions/groups/' . $suggestionId; } // Build the request path. diff --git a/libraries/joomla/openstreetmap/elements.php b/libraries/joomla/openstreetmap/elements.php index 1d28b136bbb9a..1368bfd894c4a 100644 --- a/libraries/joomla/openstreetmap/elements.php +++ b/libraries/joomla/openstreetmap/elements.php @@ -513,14 +513,14 @@ public function fullElement($element, $id) * @param string $element [node|way|relation] * @param integer $id Element identifier * @param integer $version Element version - * @param integer $redaction_id Redaction id + * @param integer $redactionId Redaction id * * @return array The xml response * * @since 3.2.0 * @throws DomainException */ - public function redaction($element, $id, $version, $redaction_id) + public function redaction($element, $id, $version, $redactionId) { if ($element != 'node' && $element != 'way' && $element != 'relation') { @@ -535,7 +535,7 @@ public function redaction($element, $id, $version, $redaction_id) ); // Set the API base - $base = $element . '/' . $id . '/' . $version . '/redact?redaction=' . $redaction_id; + $base = $element . '/' . $id . '/' . $version . '/redact?redaction=' . $redactionId; // Build the request path. $path = $this->getOption('api.url') . $base; diff --git a/libraries/joomla/twitter/statuses.php b/libraries/joomla/twitter/statuses.php index 7fdd229a197c6..6c050d761235f 100644 --- a/libraries/joomla/twitter/statuses.php +++ b/libraries/joomla/twitter/statuses.php @@ -20,19 +20,19 @@ class JTwitterStatuses extends JTwitterObject /** * Method to get a single tweet with the given ID. * - * @param integer $id The ID of the tweet to retrieve. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only - * the status author's numerical ID. - * @param boolean $entities When set to true, each tweet will include a node called "entities,". This node offers a variety of metadata - * about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $my_retweet When set to either true, t or 1, any statuses returned that have been retweeted by the authenticating user will - * include an additional current_user_retweet node, containing the ID of the source status for the retweet. + * @param integer $id The ID of the tweet to retrieve. + * @param boolean $trimUser When set to true, each tweet returned in a timeline will include a user object including only + * the status author's numerical ID. + * @param boolean $entities When set to true, each tweet will include a node called "entities,". This node offers a variety of metadata + * about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. + * @param boolean $myRetweet When set to either true, t or 1, any statuses returned that have been retweeted by the authenticating user will + * include an additional current_user_retweet node, containing the ID of the source status for the retweet. * * @return array The decoded JSON response * * @since 3.1.4 */ - public function getTweetById($id, $trim_user = null, $entities = null, $my_retweet = null) + public function getTweetById($id, $trimUser = null, $entities = null, $myRetweet = null) { // Check the rate limit for remaining hits $this->checkRateLimit('statuses', 'show/:id'); @@ -43,9 +43,9 @@ public function getTweetById($id, $trim_user = null, $entities = null, $my_retwe $data = array(); // Check if trim_user is specified - if (!is_null($trim_user)) + if (!is_null($trimUser)) { - $data['trim_user'] = $trim_user; + $data['trim_user'] = $trimUser; } // Check if entities is specified @@ -55,9 +55,9 @@ public function getTweetById($id, $trim_user = null, $entities = null, $my_retwe } // Check if my_retweet is specified - if (!is_null($my_retweet)) + if (!is_null($myRetweet)) { - $data['include_my_retweet'] = $my_retweet; + $data['include_my_retweet'] = $myRetweet; } // Send the request. @@ -69,13 +69,13 @@ public function getTweetById($id, $trim_user = null, $entities = null, $my_retwe * * @param mixed $user Either an integer containing the user ID or a string containing the screen name. * @param integer $count Specifies the number of tweets to try and retrieve, up to a maximum of 200. Retweets are always included - * in the count, so it is always suggested to set $include_rts to true - * @param boolean $include_rts When set to true, the timeline will contain native retweets in addition to the standard stream of tweets. - * @param boolean $no_replies This parameter will prevent replies from appearing in the returned timeline. This parameter is only supported + * in the count, so it is always suggested to set $includeRts to true + * @param boolean $includeRts When set to true, the timeline will contain native retweets in addition to the standard stream of tweets. + * @param boolean $noReplies This parameter will prevent replies from appearing in the returned timeline. This parameter is only supported * for JSON and XML responses. - * @param integer $since_id Returns results with an ID greater than (that is, more recent than) the specified ID. - * @param integer $max_id Returns results with an ID less than (that is, older than) the specified ID. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only + * @param integer $sinceId Returns results with an ID greater than (that is, more recent than) the specified ID. + * @param integer $maxId Returns results with an ID less than (that is, older than) the specified ID. + * @param boolean $trimUser When set to true, each tweet returned in a timeline will include a user object including only * the status author's numerical ID. * @param boolean $contributor This parameter enhances the contributors element of the status response to include the screen_name of the * contributor. By default only the user_id of the contributor is included. @@ -85,7 +85,7 @@ public function getTweetById($id, $trim_user = null, $entities = null, $my_retwe * @since 3.1.4 * @throws RuntimeException */ - public function getUserTimeline($user, $count = 20, $include_rts = null, $no_replies = null, $since_id = 0, $max_id = 0, $trim_user = null, + public function getUserTimeline($user, $count = 20, $includeRts = null, $noReplies = null, $sinceId = 0, $maxId = 0, $trimUser = null, $contributor = null) { // Check the rate limit for remaining hits @@ -115,33 +115,33 @@ public function getUserTimeline($user, $count = 20, $include_rts = null, $no_rep $data['count'] = $count; // Check if include_rts is specified - if (!is_null($include_rts)) + if (!is_null($includeRts)) { - $data['include_rts'] = $include_rts; + $data['include_rts'] = $includeRts; } // Check if no_replies is specified - if (!is_null($no_replies)) + if (!is_null($noReplies)) { - $data['exclude_replies'] = $no_replies; + $data['exclude_replies'] = $noReplies; } // Check if a since_id is specified - if ($since_id > 0) + if ($sinceId > 0) { - $data['since_id'] = (int) $since_id; + $data['since_id'] = (int) $sinceId; } // Check if a max_id is specified - if ($max_id > 0) + if ($maxId > 0) { - $data['max_id'] = (int) $max_id; + $data['max_id'] = (int) $maxId; } // Check if trim_user is specified - if (!is_null($trim_user)) + if (!is_null($trimUser)) { - $data['trim_user'] = $trim_user; + $data['trim_user'] = $trimUser; } // Check if contributor details is specified @@ -157,21 +157,21 @@ public function getUserTimeline($user, $count = 20, $include_rts = null, $no_rep /** * Method to post a tweet. * - * @param string $status The text of the tweet. - * @param integer $in_reply_to_status_id The ID of an existing status that the update is in reply to. - * @param float $lat The latitude of the location this tweet refers to. - * @param float $long The longitude of the location this tweet refers to. - * @param string $place_id A place in the world. - * @param boolean $display_coordinates Whether or not to put a pin on the exact coordinates a tweet has been sent from. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only - * the status author's numerical ID. + * @param string $status The text of the tweet. + * @param integer $inReplyToStatusId The ID of an existing status that the update is in reply to. + * @param float $lat The latitude of the location this tweet refers to. + * @param float $long The longitude of the location this tweet refers to. + * @param string $placeId A place in the world. + * @param boolean $displayCoordinates Whether or not to put a pin on the exact coordinates a tweet has been sent from. + * @param boolean $trimUser When set to true, each tweet returned in a timeline will include a user object including only + * the status author's numerical ID. * * @return array The decoded JSON response * * @since 3.1.4 */ - public function tweet($status, $in_reply_to_status_id = null, $lat = null, $long = null, $place_id = null, $display_coordinates = null, - $trim_user = null) + public function tweet($status, $inReplyToStatusId = null, $lat = null, $long = null, $placeId = null, $displayCoordinates = null, + $trimUser = null) { // Set the API base. $path = '/statuses/update.json'; @@ -180,9 +180,9 @@ public function tweet($status, $in_reply_to_status_id = null, $lat = null, $long $data = array('status' => utf8_encode($status)); // Check if in_reply_to_status_id is specified. - if ($in_reply_to_status_id) + if ($inReplyToStatusId) { - $data['in_reply_to_status_id'] = $in_reply_to_status_id; + $data['in_reply_to_status_id'] = $inReplyToStatusId; } // Check if lat is specified. @@ -198,21 +198,21 @@ public function tweet($status, $in_reply_to_status_id = null, $lat = null, $long } // Check if place_id is specified. - if ($place_id) + if ($placeId) { - $data['place_id'] = $place_id; + $data['place_id'] = $placeId; } // Check if display_coordinates is specified. - if (!is_null($display_coordinates)) + if (!is_null($displayCoordinates)) { - $data['display_coordinates'] = $display_coordinates; + $data['display_coordinates'] = $displayCoordinates; } // Check if trim_user is specified. - if (!is_null($trim_user)) + if (!is_null($trimUser)) { - $data['trim_user'] = $trim_user; + $data['trim_user'] = $trimUser; } // Send the request. @@ -223,13 +223,13 @@ public function tweet($status, $in_reply_to_status_id = null, $lat = null, $long * Method to retrieve the most recent mentions for the authenticating user. * * @param integer $count Specifies the number of tweets to try and retrieve, up to a maximum of 200. Retweets are always included - * in the count, so it is always suggested to set $include_rts to true - * @param boolean $include_rts When set to true, the timeline will contain native retweets in addition to the standard stream of tweets. + * in the count, so it is always suggested to set $includeRts to true + * @param boolean $includeRts When set to true, the timeline will contain native retweets in addition to the standard stream of tweets. * @param boolean $entities When set to true, each tweet will include a node called "entities,". This node offers a variety of metadata * about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param integer $since_id Returns results with an ID greater than (that is, more recent than) the specified ID. - * @param integer $max_id Returns results with an ID less than (that is, older than) the specified ID. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only + * @param integer $sinceId Returns results with an ID greater than (that is, more recent than) the specified ID. + * @param integer $maxId Returns results with an ID less than (that is, older than) the specified ID. + * @param boolean $trimUser When set to true, each tweet returned in a timeline will include a user object including only * the status author's numerical ID. * @param string $contributor This parameter enhances the contributors element of the status response to include the screen_name * of the contributor. @@ -239,8 +239,8 @@ public function tweet($status, $in_reply_to_status_id = null, $lat = null, $long * @since 3.1.4 * @throws RuntimeException */ - public function getMentions($count = 20, $include_rts = null, $entities = null, $since_id = 0, $max_id = 0, - $trim_user = null, $contributor = null) + public function getMentions($count = 20, $includeRts = null, $entities = null, $sinceId = 0, $maxId = 0, + $trimUser = null, $contributor = null) { // Check the rate limit for remaining hits $this->checkRateLimit('statuses', 'mentions_timeline'); @@ -252,9 +252,9 @@ public function getMentions($count = 20, $include_rts = null, $entities = null, $data['count'] = $count; // Check if include_rts is specified - if (!is_null($include_rts)) + if (!is_null($includeRts)) { - $data['include_rts'] = $include_rts; + $data['include_rts'] = $includeRts; } // Check if entities is specified @@ -264,21 +264,21 @@ public function getMentions($count = 20, $include_rts = null, $entities = null, } // Check if a since_id is specified - if ($since_id > 0) + if ($sinceId > 0) { - $data['since_id'] = (int) $since_id; + $data['since_id'] = (int) $sinceId; } // Check if a max_id is specified - if ($max_id > 0) + if ($maxId > 0) { - $data['max_id'] = (int) $max_id; + $data['max_id'] = (int) $maxId; } // Check if trim_user is specified - if (!is_null($trim_user)) + if (!is_null($trimUser)) { - $data['trim_user'] = $trim_user; + $data['trim_user'] = $trimUser; } // Check if contributor is specified @@ -295,20 +295,20 @@ public function getMentions($count = 20, $include_rts = null, $entities = null, * Method to get the most recent tweets of the authenticated user that have been retweeted by others. * * @param integer $count Specifies the number of tweets to try and retrieve, up to a maximum of 200. Retweets are always included - * in the count, so it is always suggested to set $include_rts to true - * @param integer $since_id Returns results with an ID greater than (that is, more recent than) the specified ID. + * in the count, so it is always suggested to set $includeRts to true + * @param integer $sinceId Returns results with an ID greater than (that is, more recent than) the specified ID. * @param boolean $entities When set to true, each tweet will include a node called "entities,". This node offers a variety of metadata * about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. - * @param boolean $user_entities The user entities node will be disincluded when set to false. - * @param integer $max_id Returns results with an ID less than (that is, older than) the specified ID. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only + * @param boolean $userEntities The user entities node will be disincluded when set to false. + * @param integer $maxId Returns results with an ID less than (that is, older than) the specified ID. + * @param boolean $trimUser When set to true, each tweet returned in a timeline will include a user object including only * the status author's numerical ID. * * @return array The decoded JSON response * * @since 3.1.4 */ - public function getRetweetsOfMe($count = 20, $since_id = 0, $entities = null, $user_entities = null, $max_id = 0, $trim_user = null) + public function getRetweetsOfMe($count = 20, $sinceId = 0, $entities = null, $userEntities = null, $maxId = 0, $trimUser = null) { // Check the rate limit for remaining hits $this->checkRateLimit('statuses', 'retweets_of_me'); @@ -320,21 +320,21 @@ public function getRetweetsOfMe($count = 20, $since_id = 0, $entities = null, $u $data['count'] = $count; // Check if a since_id is specified - if ($since_id > 0) + if ($sinceId > 0) { - $data['since_id'] = (int) $since_id; + $data['since_id'] = (int) $sinceId; } // Check if a max_id is specified - if ($max_id > 0) + if ($maxId > 0) { - $data['max_id'] = (int) $max_id; + $data['max_id'] = (int) $maxId; } // Check if trim_user is specified - if (!is_null($trim_user)) + if (!is_null($trimUser)) { - $data['trim_user'] = $trim_user; + $data['trim_user'] = $trimUser; } // Check if entities is specified @@ -344,9 +344,9 @@ public function getRetweetsOfMe($count = 20, $since_id = 0, $entities = null, $u } // Check if entities is specified - if (!is_null($user_entities)) + if (!is_null($userEntities)) { - $data['include_user_entities'] = $user_entities; + $data['include_user_entities'] = $userEntities; } // Send the request. @@ -356,19 +356,19 @@ public function getRetweetsOfMe($count = 20, $since_id = 0, $entities = null, $u /** * Method to show user objects of up to 100 members who retweeted the status. * - * @param integer $id The numerical ID of the desired status. - * @param integer $count Specifies the number of retweets to try and retrieve, up to a maximum of 100. - * @param integer $cursor Causes the list of IDs to be broken into pages of no more than 100 IDs at a time. - * The number of IDs returned is not guaranteed to be 100 as suspended users are - * filtered out after connections are queried. If no cursor is provided, a value of - * -1 will be assumed, which is the first "page." - * @param boolean $stringify_ids Set to true to return IDs as strings, false to return as integers. + * @param integer $id The numerical ID of the desired status. + * @param integer $count Specifies the number of retweets to try and retrieve, up to a maximum of 100. + * @param integer $cursor Causes the list of IDs to be broken into pages of no more than 100 IDs at a time. + * The number of IDs returned is not guaranteed to be 100 as suspended users are + * filtered out after connections are queried. If no cursor is provided, a value of + * -1 will be assumed, which is the first "page." + * @param boolean $stringifyIds Set to true to return IDs as strings, false to return as integers. * * @return array The decoded JSON response * * @since 3.1.4 */ - public function getRetweeters($id, $count = 20, $cursor = null, $stringify_ids = null) + public function getRetweeters($id, $count = 20, $cursor = null, $stringifyIds = null) { // Check the rate limit for remaining hits $this->checkRateLimit('statuses', 'retweeters/ids'); @@ -389,9 +389,9 @@ public function getRetweeters($id, $count = 20, $cursor = null, $stringify_ids = } // Check if entities is specified - if (!is_null($stringify_ids)) + if (!is_null($stringifyIds)) { - $data['stringify_ids'] = $stringify_ids; + $data['stringify_ids'] = $stringifyIds; } // Send the request. @@ -403,15 +403,15 @@ public function getRetweeters($id, $count = 20, $cursor = null, $stringify_ids = * * @param integer $id The numerical ID of the desired status. * @param integer $count Specifies the number of tweets to try and retrieve, up to a maximum of 200. Retweets are always included - * in the count, so it is always suggested to set $include_rts to true - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only + * in the count, so it is always suggested to set $includeRts to true + * @param boolean $trimUser When set to true, each tweet returned in a timeline will include a user object including only * the status author's numerical ID. * * @return array The decoded JSON response * * @since 3.1.4 */ - public function getRetweetsById($id, $count = 20, $trim_user = null) + public function getRetweetsById($id, $count = 20, $trimUser = null) { // Check the rate limit for remaining hits $this->checkRateLimit('statuses', 'retweets/:id'); @@ -423,9 +423,9 @@ public function getRetweetsById($id, $count = 20, $trim_user = null) $data['count'] = $count; // Check if trim_user is specified - if (!is_null($trim_user)) + if (!is_null($trimUser)) { - $data['trim_user'] = $trim_user; + $data['trim_user'] = $trimUser; } // Send the request. @@ -436,14 +436,14 @@ public function getRetweetsById($id, $count = 20, $trim_user = null) * Method to delete the status specified by the required ID parameter. * * @param integer $id The numerical ID of the desired status. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only + * @param boolean $trimUser When set to true, each tweet returned in a timeline will include a user object including only * the status author's numerical ID. * * @return array The decoded JSON response * * @since 3.1.4 */ - public function deleteTweet($id, $trim_user = null) + public function deleteTweet($id, $trimUser = null) { // Set the API path $path = '/statuses/destroy/' . $id . '.json'; @@ -451,9 +451,9 @@ public function deleteTweet($id, $trim_user = null) $data = array(); // Check if trim_user is specified - if (!is_null($trim_user)) + if (!is_null($trimUser)) { - $data['trim_user'] = $trim_user; + $data['trim_user'] = $trimUser; } // Send the request. @@ -464,14 +464,14 @@ public function deleteTweet($id, $trim_user = null) * Method to retweet a tweet. * * @param integer $id The numerical ID of the desired status. - * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only + * @param boolean $trimUser When set to true, each tweet returned in a timeline will include a user object including only * the status author's numerical ID. * * @return array The decoded JSON response * * @since 3.1.4 */ - public function retweet($id, $trim_user = null) + public function retweet($id, $trimUser = null) { // Set the API path $path = '/statuses/retweet/' . $id . '.json'; @@ -479,9 +479,9 @@ public function retweet($id, $trim_user = null) $data = array(); // Check if trim_user is specified - if (!is_null($trim_user)) + if (!is_null($trimUser)) { - $data['trim_user'] = $trim_user; + $data['trim_user'] = $trimUser; } // Send the request. @@ -493,11 +493,11 @@ public function retweet($id, $trim_user = null) * * @param string $status The text of the tweet. * @param string $media File to upload - * @param integer $in_reply_to_status_id The ID of an existing status that the update is in reply to. + * @param integer $inReplyToStatusId The ID of an existing status that the update is in reply to. * @param float $lat The latitude of the location this tweet refers to. * @param float $long The longitude of the location this tweet refers to. - * @param string $place_id A place in the world. - * @param boolean $display_coordinates Whether or not to put a pin on the exact coordinates a tweet has been sent from. + * @param string $placeId A place in the world. + * @param boolean $displayCoordinates Whether or not to put a pin on the exact coordinates a tweet has been sent from. * @param boolean $sensitive Set to true for content which may not be suitable for every audience. * * @return array The decoded JSON response @@ -505,8 +505,8 @@ public function retweet($id, $trim_user = null) * @since 3.1.4 * @throws RuntimeException */ - public function tweetWithMedia($status, $media, $in_reply_to_status_id = null, $lat = null, $long = null, $place_id = null, - $display_coordinates = null, $sensitive = null) + public function tweetWithMedia($status, $media, $inReplyToStatusId = null, $lat = null, $long = null, $placeId = null, + $displayCoordinates = null, $sensitive = null) { // Set the API request path. $path = '/statuses/update_with_media.json'; @@ -520,9 +520,9 @@ public function tweetWithMedia($status, $media, $in_reply_to_status_id = null, $ $header = array('Content-Type' => 'multipart/form-data'); // Check if in_reply_to_status_id is specified. - if (!is_null($in_reply_to_status_id)) + if (!is_null($inReplyToStatusId)) { - $data['in_reply_to_status_id'] = $in_reply_to_status_id; + $data['in_reply_to_status_id'] = $inReplyToStatusId; } // Check if lat is specified. @@ -538,15 +538,15 @@ public function tweetWithMedia($status, $media, $in_reply_to_status_id = null, $ } // Check if place_id is specified. - if ($place_id) + if ($placeId) { - $data['place_id'] = $place_id; + $data['place_id'] = $placeId; } // Check if display_coordinates is specified. - if (!is_null($display_coordinates)) + if (!is_null($displayCoordinates)) { - $data['display_coordinates'] = $display_coordinates; + $data['display_coordinates'] = $displayCoordinates; } // Check if sensitive is specified. @@ -567,11 +567,11 @@ public function tweetWithMedia($status, $media, $in_reply_to_status_id = null, $ * @param string $url The URL of the Tweet/status to be embedded. * @param integer $maxwidth The maximum width in pixels that the embed should be rendered at. This value is constrained to be * between 250 and 550 pixels. - * @param boolean $hide_media Specifies whether the embedded Tweet should automatically expand images which were uploaded via + * @param boolean $hideMedia Specifies whether the embedded Tweet should automatically expand images which were uploaded via * POST statuses/update_with_media. - * @param boolean $hide_thread Specifies whether the embedded Tweet should automatically show the original message in the case that + * @param boolean $hideThread Specifies whether the embedded Tweet should automatically show the original message in the case that * the embedded Tweet is a reply. - * @param boolean $omit_script Specifies whether the embedded Tweet HTML should include a `