Skip to content

Commit

Permalink
[5.0] links in docblocks (joomla#41174)
Browse files Browse the repository at this point in the history
When adding a link to a docblock it should use `@link` according to the specifications and not `@see` which is for internal use.

Reference
https://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags.link.pkg.html
https://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags.see.pkg.html
  • Loading branch information
brianteeman authored Jul 17, 2023
1 parent 9f0ce37 commit c4b3a4c
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* default configuration. Command line arguments will be applied
* after this file is read.
*
* @see https://github.com/phan/phan/wiki/Phan-Config-Settings for all configurable options
* @see https://github.com/phan/phan/tree/v4/src/Phan/Config.php
* @link https://github.com/phan/phan/wiki/Phan-Config-Settings for all configurable options
* @link https://github.com/phan/phan/tree/v4/src/Phan/Config.php
*
* A Note About Paths
* ==================
Expand Down
4 changes: 2 additions & 2 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
/**
* This is the configuration file for php-cs-fixer
*
* @see https://github.com/FriendsOfPHP/PHP-CS-Fixer
* @see https://mlocati.github.io/php-cs-fixer-configurator/#version:3.0
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer
* @link https://mlocati.github.io/php-cs-fixer-configurator/#version:3.0
*
*
* If you would like to run the automated clean up, then open a command line and type one of the commands below
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_joomlaupdate/extract.php
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,7 @@ function clearFileInOPCache(string $file): bool
* @return boolean True if the two strings are identical.
* @since 4.0.4
*
* @see http://blog.ircmaxell.com/2014/11/its-all-about-time.html
* @link http://blog.ircmaxell.com/2014/11/its-all-about-time.html
*/
function timingSafeEquals($known, $user)
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Application/ConsoleApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ public static function getRouter($name = null, array $options = [])
*
* @return void
* @since 4.2.1
* @see https://github.com/joomla/joomla-cms/issues/38518
* @link https://github.com/joomla/joomla-cms/issues/38518
*/
protected function populateHttpHost()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ private function migrateFromLegacyMFA(): void
*
* @return string Decrypted, but JSON-encoded, information
*
* @see https://github.com/joomla/joomla-cms/pull/12497
* @link https://github.com/joomla/joomla-cms/pull/12497
* @since 4.2.0
*/
private function decryptLegacyTFAString(string $secret, string $stringToDecrypt): string
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Crypt/Crypt.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static function timingSafeCompare($known, $unknown)
/**
* If hash_equals is not available we use a pure PHP implementation by Anthony Ferrara.
*
* @see https://blog.ircmaxell.com/2014/11/its-all-about-time.html
* @link https://blog.ircmaxell.com/2014/11/its-all-about-time.html
*/
$safeLen = strlen($known);
$userLen = strlen($unknown);
Expand Down
4 changes: 2 additions & 2 deletions libraries/src/Filesystem/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ public static function delete($file)

/**
* Invalidate the OPCache for the file before actually deleting it
* @see https://github.com/joomla/joomla-cms/pull/32915#issuecomment-812865635
* @see https://www.php.net/manual/en/function.opcache-invalidate.php#116372
* @link https://github.com/joomla/joomla-cms/pull/32915#issuecomment-812865635
* @link https://www.php.net/manual/en/function.opcache-invalidate.php#116372
*/
self::invalidateFileCache($file);

Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Menu/AbstractMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function __construct($options = [])
* user object is not updated, the menu will render incorrectly, not complying with
* menu items access levels.
*
* @see https://github.com/joomla/joomla-cms/issues/11541
* @link https://github.com/joomla/joomla-cms/issues/11541
*/
$this->storedUser = isset($options['user']) && $options['user'] instanceof User ? $options['user'] : null;
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Session/Storage/JoomlaStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ protected function setCookieParams(): void
*
* @return $this
*
* @see http://php.net/session.configuration
* @link http://php.net/session.configuration
* @since 4.0.0
*/
public function setOptions(array $options): NativeStorage
Expand Down
4 changes: 2 additions & 2 deletions plugins/editors/tinymce/src/PluginTraits/KnownButtons.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ trait KnownButtons
{
/**
* Return list of known TinyMCE buttons
* @see https://www.tiny.cloud/docs/demo/full-featured/
* @see https://www.tiny.cloud/apps/#core-plugins
* @link https://www.tiny.cloud/docs/demo/full-featured/
* @link https://www.tiny.cloud/apps/#core-plugins
*
* @return array
*
Expand Down
2 changes: 1 addition & 1 deletion plugins/multifactorauth/yubikey/src/Extension/Yubikey.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ private function validateYubikeyOtp(string $otp): bool
* @return void
* @since 4.2.0
*
* @see https://developers.yubico.com/yubikey-val/Validation_Protocol_V2.0.html
* @link https://developers.yubico.com/yubikey-val/Validation_Protocol_V2.0.html
*/
private function signRequest(Uri $uri, string $secret): void
{
Expand Down
2 changes: 1 addition & 1 deletion plugins/system/webauthn/src/MetadataRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* This repository contains the metadata of all FIDO authenticators as published by the FIDO
* Alliance in their MDS version 3.0.
*
* @see https://fidoalliance.org/metadata/
* @link https://fidoalliance.org/metadata/
* @since 4.2.0
*/
final class MetadataRepository implements MetadataStatementRepository
Expand Down
20 changes: 10 additions & 10 deletions tests/Unit/Libraries/Cms/Feed/Parser/AtomParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testHandleAuthor()
];

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<author/>');
$xmlElement->name = $author['name'];
$xmlElement->email = $author['email'];
Expand Down Expand Up @@ -79,7 +79,7 @@ public function testHandleContributor()
];

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<contributor />');
$xmlElement->name = $contributor['name'];
$xmlElement->email = $contributor['email'];
Expand Down Expand Up @@ -112,7 +112,7 @@ public function testHandleGenerator()
$generator = 'Joomla';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<generator>' . $generator . '</generator>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -142,7 +142,7 @@ public function testHandleId()
$id = 'http://domain.com/path/to/resource';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<id>' . $id . '</id>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -172,7 +172,7 @@ public function testHandleLink()
$href = 'http://domain.com/path/to/resource';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<link href="' . $href . '" />');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -209,7 +209,7 @@ public function testHandleRights()
$copyright = 'All Rights Reserved.';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<rights>' . $copyright . '</rights>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -239,7 +239,7 @@ public function testHandleSubtitle()
$subtitle = 'Lorem Ipsum ...';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<subtitle>' . $subtitle . '</subtitle>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -269,7 +269,7 @@ public function testHandleTitle()
$title = 'My Title.';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<title>' . $title . '</title>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -299,7 +299,7 @@ public function testHandleUpdated()
$date = '2019-01-01T00:00:00Z';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<updated>' . $date . '</updated>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -431,7 +431,7 @@ public function testInitialiseSetsOldVersion()
public function testProcessFeedEntry()
{
// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<entry><id>http://example.com/id</id>
<title>title</title><updated>August 25, 1991</updated><summary>summary</summary></entry>');

Expand Down
34 changes: 17 additions & 17 deletions tests/Unit/Libraries/Cms/Feed/Parser/RssParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function testHandleCategory()
$category = 'IT/Internet/Web development';

// It's currently not possible to mock simple xml element
// @see https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement("<category>$category</category>");

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -75,7 +75,7 @@ public function testHandleCloud()
];

// It's currently not possible to mock simple xml element
// @see https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<cloud domain="' . $cloud['domain'] . '" port="' . $cloud['port'] .
'" path="' . $cloud['path'] . '" registerProcedure="' . $cloud['registerProcedure'] .
'" protocol="' . $cloud['protocol'] . '" />');
Expand Down Expand Up @@ -119,7 +119,7 @@ public function testHandleCopyright()
$copyright = 'All Rights Reserved.';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<rights>' . $copyright . '</rights>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -149,7 +149,7 @@ public function testHandleDescription()
$subtitle = 'Lorem Ipsum ...';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<description>' . $subtitle . '</description>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -179,7 +179,7 @@ public function testHandleGenerator()
$generator = 'Joomla';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<generator>' . $generator . '</generator>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -214,7 +214,7 @@ public function testHandleImage()
];

// It's currently not possible to mock simple xml element
// @see https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<image><url>' . $image['url'] . '</url><title>' . $image['title'] .
'</title><link>' . $image['link'] . '</link><description>' . $image['description'] .
'</description></image>');
Expand Down Expand Up @@ -261,7 +261,7 @@ public function testHandleLanguage()
$language = 'en-US';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<language>' . $language . '</language>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -291,7 +291,7 @@ public function testHandleLastBuildDate()
$buildDate = 'Sat, 01 Jan 2011 00:00:00 UTC';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<lastBuildDate>' . $buildDate . '</lastBuildDate>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -321,7 +321,7 @@ public function testHandleLink()
$link = 'http://domain.com/path/to/resource';

// It's currently not possible to mock simple xml element
// @see https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement("<link href='$link' />");

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -361,7 +361,7 @@ public function testHandleManagingEditor()
];

// It's currently not possible to mock simple xml element
// @see https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<managingEditor>' . $editor['email'] . ' ' . $editor['name'] . '</managingEditor>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -400,7 +400,7 @@ public function testHandlePubDate()
$pubDate = 'Sat, 01 Jan 2011 00:00:00 GMT';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<pubDate>' . $pubDate . '</pubDate>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -430,7 +430,7 @@ public function testHandleSkipDays()
$skipDays = ['Saturday', 'Sunday'];

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<skipDays><day>' . $skipDays[0] . '</day><day>' . $skipDays[1] . '</day></skipDays>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -460,7 +460,7 @@ public function testHandleSkipHours()
$skipHours = ['0', '10'];

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<skipHours><hour>' . $skipHours[0] . '</hour><hour>' . $skipHours[1] . '</hour></skipHours>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -490,7 +490,7 @@ public function testHandleTitle()
$title = 'My Title.';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement("<title>$title</title>");

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -520,7 +520,7 @@ public function testHandleTtl()
$ttl = '45';

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement("<ttl>$ttl</ttl>");

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -553,7 +553,7 @@ public function testHandleWebmaster()
];

// It's currently not possible to mock simple xml element
// @see https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement('<webmaster>' . $webmaster['email'] . ' ' . $webmaster['name'] . '</webmaster>');

$feedMock = $this->createMock(Feed::class);
Expand Down Expand Up @@ -636,7 +636,7 @@ public function testProcessFeedEntry()
];

// It's currently not possible to mock simple xml element
// @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
$xmlElement = new \SimpleXMLElement(
'<entry>
<link>' . $entry['link'] . '</link>
Expand Down

0 comments on commit c4b3a4c

Please sign in to comment.