31
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-06-09 08:32:22 +00:00

Add missed phpDoc for JEDCheckerHelper::resolveAliases method

This commit is contained in:
Denis Ryabov 2024-01-08 13:31:49 +04:00
parent 2d3d56436f
commit 31f689fdc7

View File

@ -400,6 +400,14 @@ abstract class JEDCheckerHelper
return str_repeat("\n", substr_count($content, "\n")); 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) public static function resolveAliases($content)
{ {
if (preg_match_all('/\buse\s+([\\\\\w]+)(?:\s+as\s+(\w+))?\s*;/i', $content, $matches, PREG_SET_ORDER)) { if (preg_match_all('/\buse\s+([\\\\\w]+)(?:\s+as\s+(\w+))?\s*;/i', $content, $matches, PREG_SET_ORDER)) {