Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Code Style #3665

Closed
wants to merge 1 commit into from

1 participant

@wilsonge
Owner

No description provided.

@phproberto phproberto closed this pull request from a commit
@wilsonge wilsonge [imp] Code style fixes. Fixes #3664. Fixes #3665. Fixes #3666. Fixes #…
…3667. Fixes #3668. Fixes #3670

The last administrator/modules code style issue :D

Code Style

Code Style

Code style

Code Style

Code Style
ce339f1
@wilsonge wilsonge deleted the wilsonge:patch-27 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 28, 2014
  1. @wilsonge

    Code Style

    wilsonge authored
This page is out of date. Refresh to see the latest.
Showing with 24 additions and 12 deletions.
  1. +24 −12 administrator/components/com_contact/models/contact.php
View
36 administrator/components/com_contact/models/contact.php
@@ -54,6 +54,7 @@ public function batch($commands, $pks, $contexts)
if (empty($pks))
{
$this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED'));
+
return false;
}
@@ -300,6 +301,7 @@ protected function batchUser($value, $pks, $contexts)
* @param object $record A record object.
*
* @return boolean True if allowed to delete the record. Defaults to the permission set in the component.
+ *
* @since 1.6
*/
protected function canDelete($record)
@@ -318,9 +320,10 @@ protected function canDelete($record)
/**
* Method to test whether a record can have its state edited.
*
- * @param object $record A record object.
+ * @param object $record A record object.
*
* @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
+ *
* @since 1.6
*/
protected function canEditState($record)
@@ -342,11 +345,12 @@ protected function canEditState($record)
/**
* Returns a Table object, always creating it
*
- * @param type $type The table type to instantiate
- * @param string $prefix A prefix for the table class name. Optional.
- * @param array $config Configuration array for model. Optional.
+ * @param type $type The table type to instantiate
+ * @param string $prefix A prefix for the table class name. Optional.
+ * @param array $config Configuration array for model. Optional.
+ *
+ * @return JTable A database object
*
- * @return JTable A database object
* @since 1.6
*/
public function getTable($type = 'Contact', $prefix = 'ContactTable', $config = array())
@@ -357,10 +361,11 @@ public function getTable($type = 'Contact', $prefix = 'ContactTable', $config =
/**
* Method to get the row form.
*
- * @param array $data Data for the form.
- * @param boolean $loadData True if the form is to load its own data (default case), false if not.
+ * @param array $data Data for the form.
+ * @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return mixed A JForm object on success, false on failure
+ *
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
@@ -395,9 +400,10 @@ public function getForm($data = array(), $loadData = true)
/**
* Method to get a single record.
*
- * @param integer $pk The id of the primary key.
+ * @param integer $pk The id of the primary key.
*
* @return mixed Object on success, false on failure.
+ *
* @since 1.6
*/
public function getItem($pk = null)
@@ -443,6 +449,7 @@ public function getItem($pk = null)
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
+ *
* @since 1.6
*/
protected function loadFormData()
@@ -473,6 +480,7 @@ protected function loadFormData()
* @param array The form data.
*
* @return boolean True on success.
+ *
* @since 3.0
*/
public function save($data)
@@ -575,9 +583,10 @@ public function save($data)
/**
* Prepare and sanitise the table prior to saving.
*
- * @param JTable $table
+ * @param JTable $table The JTable object
*
* @return void
+ *
* @since 1.6
*/
protected function prepareTable($table)
@@ -620,9 +629,10 @@ protected function prepareTable($table)
/**
* A protected method to get a set of ordering conditions.
*
- * @param JTable $table A record object.
+ * @param JTable $table A record object.
*
* @return array An array of conditions to add to add to ordering queries.
+ *
* @since 1.6
*/
protected function getReorderConditions($table)
@@ -679,10 +689,11 @@ protected function preprocessForm(JForm $form, $data, $group = 'content')
/**
* Method to toggle the featured setting of contacts.
*
- * @param array $pks The ids of the items to toggle.
- * @param integer $value The value to toggle to.
+ * @param array $pks The ids of the items to toggle.
+ * @param integer $value The value to toggle to.
*
* @return boolean True on success.
+ *
* @since 1.6
*/
public function featured($pks, $value = 0)
@@ -746,6 +757,7 @@ protected function generateNewTitle($category_id, $alias, $name)
{
$name = JString::increment($name);
}
+
$alias = JString::increment($alias, 'dash');
}
Something went wrong with that request. Please try again.