moodle-cs icon indicating copy to clipboard operation
moodle-cs copied to clipboard

moodle-extra doesn't catch 'Functions must not contain multiple empty lines in a row'

Open individual-it opened this issue 1 year ago • 4 comments

my .phpcs.xml looks like this

<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="MoodleCore">
  <rule ref="moodle-extra"/>
</ruleset>

and in db/install.php I have this code:

        } else {
            $issuerdata->image = $ocislogourl;
        }


        $issuer = core\oauth2\api::create_issuer($issuerdata);
        $result = $issuer->is_valid();
        if (!$result) {
            return $result;
        }

The multi empty line issue is not reported by phpcs

When I change the rule to <rule ref="moodle"/> it works correctly.

individual-it avatar Dec 27 '23 10:12 individual-it