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

remove leading '*' character to deal with multi-line license names

This commit is contained in:
Denis Ryabov 2021-02-23 21:07:30 +03:00
parent 02ccd6fa65
commit 53c5903fa0

View File

@ -191,6 +191,9 @@ class JedcheckerRulesGpl extends JEDcheckerRule
$content = file_get_contents($file);
// Remove leading "*" characters from phpDoc-like comments
$content = preg_replace('/^\s*\*/m', '', $content);
if (preg_match($this->regex_gpl_licenses, $content, $match, PREG_OFFSET_CAPTURE))
{
$line_no = substr_count($content, "\n", 0, $match[0][1]) + 1;