Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CS] long form function return types; round 2 #19935

Merged
merged 15 commits into from
Mar 25, 2018
Merged
2 changes: 1 addition & 1 deletion components/com_config/controller/modules/display.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ConfigControllerModulesDisplay extends ConfigControllerDisplay
/**
* Method to display module editing.
*
* @return bool True on success, false on failure.
* @return boolean True on success, false on failure.
*
* @since 3.2
*/
Expand Down
2 changes: 1 addition & 1 deletion components/com_config/controller/modules/save.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ConfigControllerModulesSave extends JControllerBase
/**
* Method to save module editing.
*
* @return bool True on success.
* @return boolean True on success.
*
* @since 3.2
*/
Expand Down
24 changes: 12 additions & 12 deletions components/com_search/models/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,35 @@ class SearchModelSearch extends JModelLegacy
/**
* Search data array
*
* @var array
* @var array
*/
protected $_data = null;

/**
* Search total
*
* @var integer
* @var integer
*/
protected $_total = null;

/**
* Search areas
*
* @var integer
* @var integer
*/
protected $_areas = null;
protected $_areas = null;

/**
* Pagination object
*
* @var object
* @var object
*/
protected $_pagination = null;

/**
* Constructor
*
* @since 1.5
* @since 1.5
*/
public function __construct()
{
Expand Down Expand Up @@ -97,7 +97,7 @@ public function __construct()
*
* @return void
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move after @access

*
* @access public
* @access public
*/
public function setSearch($keyword, $match = 'all', $ordering = 'newest')
{
Expand Down Expand Up @@ -127,8 +127,8 @@ public function setSearch($keyword, $match = 'all', $ordering = 'newest')
/**
* Method to get weblink item data for the category
*
* @access public
* @return array
* @access public
* @return array
*/
public function getData()
{
Expand Down Expand Up @@ -199,7 +199,7 @@ public function setAreas($active = array(), $search = array())
/**
* Method to get a pagination object of the weblink items for the category
*
* @access public
* @access public
* @return integer
*/
public function getPagination()
Expand All @@ -216,9 +216,9 @@ public function getPagination()
/**
* Method to get the search areas
*
* @return int
* @return integer
*
* @since 1.5
* @since 1.5
*/
public function getAreas()
{
Expand Down
4 changes: 2 additions & 2 deletions components/com_tags/views/tag/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function display($tpl = null)
/**
* Prepares the document.
*
* @return void
* @return void
*/
protected function _prepareDocument()
{
Expand Down Expand Up @@ -292,7 +292,7 @@ protected function _prepareDocument()
/**
* Creates the tags title for the output
*
* @return bool
* @return boolean
*/
protected function getTagsTitle()
{
Expand Down
6 changes: 3 additions & 3 deletions installation/model/languages.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ protected function getLanguageManifest($uid)
*
* @param string $remote_manifest URL to the manifest XML file of the remote package.
*
* @return string|bool
* @return string|boolean
*
* @since 3.1
*/
Expand All @@ -244,7 +244,7 @@ protected function getPackageUrl($remote_manifest)
*
* @param string $url URL of the package.
*
* @return array|bool Package details or false on failure.
* @return array|boolean Package details or false on failure.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 spaces after boolean

*
* @since 3.1
*/
Expand Down Expand Up @@ -1418,7 +1418,7 @@ public function addAssociations($groupedAssociations)
/**
* Retrieve the admin user id.
*
* @return int|bool One Administrator ID.
* @return integer|boolean One Administrator ID.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 spaces after boolean

*
* @since 3.2
*/
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Access/Access.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ protected static function &preloadPermissionsParentIdMapping($assetType)
* (e.g. 'com_content.article', 'com_menus.menu.2', 'com_contact').
* @param boolean $reload Reload the preloaded assets.
*
* @return bool True
* @return boolean True
*
* @since 1.6
* @note This function will return void in 4.0.
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Application/WebApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ public function redirect($url, $status = 303)
*
* @param integer $state The HTTP 1.1 status code.
*
* @return bool
* @return boolean
*
* @since 3.8.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align

*/
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Http/Transport/StreamTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ protected function getResponse(array $headers, $body)
/**
* Method to check if http transport stream available for use
*
* @return bool true if available else false
* @return boolean true if available else false
*
* @since 12.1
*/
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Installer/Adapter/ComponentAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ public function refreshManifestCache()
* @param array &$data The menu item data to create
* @param integer $parentId The parent menu item ID
*
* @return bool|int Menu item ID on success, false on failure
* @return boolean|integer Menu item ID on success, false on failure
*/
protected function _createAdminMenuItem(array &$data, $parentId)
{
Expand Down
8 changes: 4 additions & 4 deletions libraries/src/Menu/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function removeChild(Node $child)
/**
* Test if this node has a parent
*
* @return bool True if there is a parent
* @return boolean True if there is a parent
*
* @since 3.8.0
*/
Expand All @@ -160,7 +160,7 @@ public function getParent()
/**
* Test if this node has children
*
* @return bool
* @return boolean
*
* @since 3.8.0
*/
Expand All @@ -184,7 +184,7 @@ public function getChildren()
/**
* Find the current node depth in the tree hierarchy
*
* @return int The node level in the hierarchy, where ROOT == 0, First level menu item == 1, and so on.
* @return integer The node level in the hierarchy, where ROOT == 0, First level menu item == 1, and so on.
*
* @since 3.8.0
*/
Expand All @@ -196,7 +196,7 @@ public function getLevel()
/**
* Check whether the object instance node is the root node
*
* @return bool
* @return boolean
*
* @since 3.8.0
*/
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Updater/UpdateAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ protected function getUpdateSiteName($updateSiteId)
*
* @param array $options The update options, see findUpdate() in children classes
*
* @return bool|\JHttpResponse False if we can't connect to the site, JHttpResponse otherwise
* @return boolean|\JHttpResponse False if we can't connect to the site, JHttpResponse otherwise
*
* @throws \Exception
*/
Expand Down
6 changes: 3 additions & 3 deletions libraries/src/Utility/BufferStreamHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public function stream_seek($offset, $whence)
*
* @param integer $offset The offset in bytes
*
* @return bool
* @return boolean
Copy link
Contributor

@Quy Quy Mar 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 spaces. Below also.

*/
protected function seek_set($offset)
{
Expand All @@ -219,7 +219,7 @@ protected function seek_set($offset)
*
* @param integer $offset The offset in bytes
*
* @return bool
* @return boolean
*/
protected function seek_cur($offset)
{
Expand All @@ -238,7 +238,7 @@ protected function seek_cur($offset)
*
* @param integer $offset The offset in bytes
*
* @return bool
* @return boolean
*/
protected function seek_end($offset)
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Utility/Utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static function parseAttributes($string)
*
* @param mixed $custom A custom upper limit, if the PHP settings are all above this then this will be used
*
* @return int Size in number of bytes
* @return integer Size in number of bytes
*
* @since 3.7.0
*/
Expand Down
2 changes: 1 addition & 1 deletion plugins/user/joomla/joomla.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public function onUserLogin($user, $options = array())
* @param array $user Holds the user data.
* @param array $options Array holding options (client, ...).
*
* @return bool True on success
* @return boolean True on success
*
* @since 1.5
*/
Expand Down
10 changes: 5 additions & 5 deletions plugins/user/profile/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function onContentPrepareData($context, $data)
*
* @param string $value URL to use
*
* @return mixed|string
* @return mixed|string
*/
public static function url($value)
{
Expand Down Expand Up @@ -200,7 +200,7 @@ public static function dob($value)
*
* @param boolean $value input value
*
* @return string
* @return string
*/
public static function tos($value)
{
Expand Down Expand Up @@ -357,10 +357,10 @@ public function onContentPrepareForm($form, $data)
* @param boolean $isnew True if a new user is stored.
* @param array $data Holds the new user data.
*
* @return boolean
* @return boolean
*
* @since 3.1
* @throws InvalidArgumentException on invalid date.
* @throws InvalidArgumentException on invalid date.
*/
public function onUserBeforeSave($user, $isnew, $data)
{
Expand Down Expand Up @@ -408,7 +408,7 @@ public function onUserBeforeSave($user, $isnew, $data)
* @param boolean $result true if saving the user worked
* @param string $error error message
*
* @return bool
* @return boolean
*/
public function onUserAfterSave($data, $isNew, $result, $error)
{
Expand Down