33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-12-30 13:10:32 +00:00

Merge pull request #247 from dryabov/patch-90

Add missed phpDoc for JEDCheckerHelper::resolveAliases method
This commit is contained in:
Denis Ryabov 2024-01-08 12:40:51 +03:00 committed by GitHub
commit 797770507d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -400,6 +400,14 @@ abstract class JEDCheckerHelper
return str_repeat("\n", substr_count($content, "\n"));
}
/**
* Resolve all aliases in the PHP file
*
* @param string $content
*
* @return string
* @since 2.4.4
*/
public static function resolveAliases($content)
{
if (preg_match_all('/\buse\s+([\\\\\w]+)(?:\s+as\s+(\w+))?\s*;/i', $content, $matches, PREG_SET_ORDER)) {