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

[Codestyle] Use @link over @see for URL's and use correct return types #15302

Merged
merged 8 commits into from
May 23, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @since 3.7
*
* @see https://developer.joomla.org/news/658-joomla4-manifesto.html
* @link https://developer.joomla.org/news/658-joomla4-manifesto.html
*/
function admin_postinstall_joomla40checks_condition()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
/**
* Checks if the installation is affected by the issue with content languages access in 3.4.0
*
* @see https://github.com/joomla/joomla-cms/pull/6172
* @see https://github.com/joomla/joomla-cms/pull/6194
* @link https://github.com/joomla/joomla-cms/pull/6172
* @link https://github.com/joomla/joomla-cms/pull/6194
*
* @return boolean
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function edit($key = null, $urlVar = null)
*
* @param string $key The name of the primary key of the URL variable.
*
* @return void.
* @return void
*
* @since 3.7.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static function validateCategoryId($catid, $extension)
*
* @param array $data Array of data for new category.
*
* @return integer.
* @return integer
*/
public static function createCategory($data)
{
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_fields/models/fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ protected function _getList($query, $limitstart = 0, $limit = 0)
* @param array $data data
* @param boolean $loadData load current data
*
* @return JForm/false the JForm object or false
* @return JForm / false the JForm object or false
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be a pipe, JForm|false

*
* @since 3.7.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static function getHomes()
/**
* Method to get the number of published language switcher modules.
*
* @return integer.
* @return integer
*/
public static function getLangswitchers()
{
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_login/views/login/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public function display($tpl = null)
* To prevent clickjacking, only allow the login form to be used inside a frame in the same origin.
* So send a X-Frame-Options HTTP Header with the SAMEORIGIN value.
*
* @see https://www.owasp.org/index.php/Clickjacking_Defense_Cheat_Sheet
* https://tools.ietf.org/html/rfc7034
* @link https://www.owasp.org/index.php/Clickjacking_Defense_Cheat_Sheet
* @link https://tools.ietf.org/html/rfc7034
*/
JFactory::getApplication()->setHeader('X-Frame-Options', 'SAMEORIGIN');

Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_redirect/controllers/links.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RedirectControllerLinks extends JControllerAdmin
/**
* Method to update a record.
*
* @return void.
* @return void
*
* @since 1.6
*/
Expand Down Expand Up @@ -62,7 +62,7 @@ public function activate()
/**
* Method to duplicate URLs in records.
*
* @return void.
* @return void
*
* @since 3.6.0
*/
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_redirect/helpers/redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class RedirectHelper
*
* @param string $vName The name of the active view.
*
* @return void.
* @return void
*
* @since 1.6
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class JFormFieldRedirect extends JFormFieldList
*
* @var object
* @since 3.4
* @see http://www.iana.org/assignments/http-status-codes/
* @link http://www.iana.org/assignments/http-status-codes/
*/
protected $responseMap = array(
100 => 'HTTP/1.1 100 Continue',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function display($tpl = null)
/**
* Add the page title and toolbar.
*
* @return void.
* @return void
*
* @since 1.6
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function display($tpl = null)
/**
* Add the page title and toolbar.
*
* @return void.
* @return void
*
* @since 1.6
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct($config = array())
/**
* Method for closing the template.
*
* @return void.
* @return void
*
* @since 3.2
*/
Expand All @@ -49,7 +49,7 @@ public function cancel()
/**
* Method for closing a file.
*
* @return void.
* @return void
*
* @since 3.2
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Joomla_Sniffs_Commenting_SingleCommentSniff implements PHP_CodeSniffer_Sni
/**
* Returns the token types that this sniff is interested in.
*
* @return array(int)
* @return array
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is returning an array of integers the correct annotation would be @return integer[]

*/
public function register()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct()
/**
* Returns the patterns that this test wishes to verify.
*
* @return array(string)
* @return array
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, @return string[]

*/
protected function getPatterns()
{
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/models/archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ContentModelArchive extends ContentModelArticles
* @param string $ordering The field to order on.
* @param string $direction The direction to order on.
*
* @return void.
* @return void
*
* @since 1.6
*/
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/models/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ContentModelCategories extends JModelList
* @param string $ordering The field to order on.
* @param string $direction The direction to order on.
*
* @return void.
* @return void
*
* @since 1.6
*/
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/models/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function __construct($config = array())
* @param string $ordering The field to order on.
* @param string $direction The direction to order on.
*
* @return void.
* @return void
*
* @since 1.6
*/
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/models/featured.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ContentModelFeatured extends ContentModelArticles
* @param string $ordering The field to order on.
* @param string $direction The direction to order on.
*
* @return void.
* @return void
*
* @since 1.6
*/
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/views/archive/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function display($tpl = null)
/**
* Prepares the document
*
* @return void.
* @return void
*/
protected function _prepareDocument()
{
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/views/article/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function display($tpl = null)
/**
* Prepares the document.
*
* @return void.
* @return void
*/
protected function _prepareDocument()
{
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/views/featured/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function display($tpl = null)
/**
* Prepares the document.
*
* @return void.
* @return void
*/
protected function _prepareDocument()
{
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/views/form/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function display($tpl = null)
/**
* Prepares the document
*
* @return void.
* @return void
*/
protected function _prepareDocument()
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/html/html.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public static function isRegistered($key)
*
* @return mixed Function result or false on error.
*
* @see https://secure.php.net/manual/en/function.call-user-func-array.php
* @link https://secure.php.net/manual/en/function.call-user-func-array.php
* @since 1.6
* @throws InvalidArgumentException
*/
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/html/number.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ abstract class JHtmlNumber
* @return string The number of bytes in the proper units.
*
* @since 1.6
* @see https://en.wikipedia.org/wiki/Binary_prefix
* @link https://en.wikipedia.org/wiki/Binary_prefix
*/
public static function bytes($bytes, $unit = 'auto', $precision = 2, $iec = false)
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/layout/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* Base class for rendering a display layout
*
* @see https://docs.joomla.org/Sharing_layouts_across_views_or_extensions_with_JLayout
* @link https://docs.joomla.org/Sharing_layouts_across_views_or_extensions_with_JLayout
* @since 3.0
*/
class JLayoutBase implements JLayout
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/layout/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Base class for rendering a display layout
* loaded from from a layout file
*
* @see https://docs.joomla.org/Sharing_layouts_across_views_or_extensions_with_JLayout
* @link https://docs.joomla.org/Sharing_layouts_across_views_or_extensions_with_JLayout
* @since 3.0
*/
class JLayoutFile extends JLayoutBase
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/layout/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Helper to render a JLayout object, storing a base path
*
* @see https://docs.joomla.org/Sharing_layouts_across_views_or_extensions_with_JLayout
* @link https://docs.joomla.org/Sharing_layouts_across_views_or_extensions_with_JLayout
* @since 3.1
*/
class JLayoutHelper
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/layout/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Interface to handle display layout
*
* @see https://docs.joomla.org/Sharing_layouts_across_views_or_extensions_with_JLayout
* @link https://docs.joomla.org/Sharing_layouts_across_views_or_extensions_with_JLayout
* @since 3.0
*/
interface JLayout
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/version/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function isInDevelopmentState()
*
* @return boolean True if the version is compatible.
*
* @see https://secure.php.net/version_compare
* @link https://secure.php.net/version_compare
* @since 1.0
*/
public function isCompatible($minimum)
Expand Down
4 changes: 2 additions & 2 deletions libraries/fof/database/query.php
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ public function __clone()
*
* @return mixed The FOFDatabaseQuery object on success or boolean false on failure.
*
* @link http://dev.mysql.com/doc/refman/5.0/en/union.html
* @see http://dev.mysql.com/doc/refman/5.0/en/union.html
*
* @since 12.1
*/
Expand Down Expand Up @@ -1684,7 +1684,7 @@ public function format($format)
*
* @return string The string with the appropriate sql for addition of dates
*
* @see http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-add
* @link http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-add
* @since 13.1
*/
public function dateAdd($date, $interval, $datePart)
Expand Down
6 changes: 3 additions & 3 deletions libraries/joomla/application/daemon.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
/**
* Class to turn JApplicationCli applications into daemons. It requires CLI and PCNTL support built into PHP.
*
* @see https://secure.php.net/manual/en/book.pcntl.php
* @see https://secure.php.net/manual/en/features.commandline.php
* @link https://secure.php.net/manual/en/book.pcntl.php
* @link https://secure.php.net/manual/en/features.commandline.php
* @since 11.1
*/
class JApplicationDaemon extends JApplicationCli
{
/**
* @var array The available POSIX signals to be caught by default.
* @see https://secure.php.net/manual/pcntl.constants.php
* @link https://secure.php.net/manual/pcntl.constants.php
* @since 11.1
*/
protected static $signals = array(
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/application/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class JApplicationWeb extends JApplicationBase
*
* @var object
* @since 3.4
* @see http://tools.ietf.org/pdf/rfc7231.pdf
* @link http://tools.ietf.org/pdf/rfc7231.pdf
*/
private $responseMap = array(
300 => 'HTTP/1.1 300 Multiple Choices',
Expand All @@ -99,7 +99,7 @@ class JApplicationWeb extends JApplicationBase
*
* @var object
* @since 3.5.2
* @see https://tools.ietf.org/html/rfc7230
* @link https://tools.ietf.org/html/rfc7230
*/
private $singleValueResponseHeaders = array(
'status', // This is not a valid header name, but the representation used by Joomla to identify the HTTP Response Code
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/authentication/authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public function authenticate($credentials, $options = array())
* @param JAuthenticationResponse $response response including username of the user to authorise
* @param array $options list of options
*
* @return array[JAuthenticationResponse] results of authorisation
* @return array Array with results of authorisation containing a JAuthenticationResponse
Copy link
Contributor

Choose a reason for hiding this comment

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

@return JAuthenticationResponse[] Array of authentication response objects (or something like that)

*
* @since 11.2
*/
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/cache/storage/apc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* APC cache storage handler
*
* @see https://secure.php.net/manual/en/book.apc.php
* @link https://secure.php.net/manual/en/book.apc.php
* @since 11.1
*/
class JCacheStorageApc extends JCacheStorage
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/cache/storage/apcu.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* APCu cache storage handler
*
* @see https://secure.php.net/manual/en/ref.apcu.php
* @link https://secure.php.net/manual/en/ref.apcu.php
* @since 3.5
*/
class JCacheStorageApcu extends JCacheStorage
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/cache/storage/cachelite.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Cache lite storage handler
*
* @see http://pear.php.net/package/Cache_Lite/
* @link http://pear.php.net/package/Cache_Lite/
* @since 11.1
*/
class JCacheStorageCachelite extends JCacheStorage
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/cache/storage/memcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Memcache cache storage handler
*
* @see https://secure.php.net/manual/en/book.memcache.php
* @link https://secure.php.net/manual/en/book.memcache.php
* @since 11.1
*/
class JCacheStorageMemcache extends JCacheStorage
Expand Down