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

Moodle Coding Style

Results 55 moodle-cs issues
Sort by recently updated
recently updated
newest added

MDLSITE-2719 agreed that string concatenation should not be allowed in lang files. It should be possible to get phpcs to check this for us, and it is a mistake people...

enhancement

You can share data providers between separate unit tests with: ```php /** * Test something. * * @dataProvider \some\class\test_class::test_provider */ public function test_something(){} ``` This generates the error message: `Data...

And also to current dev phpcompatibility 96072c30

Introduced in #112 as a temporary solution until Moodle 4.2 is min required.

task

While it's not critical right now, we'll need to ensure that all the chain of parents are always executed, else, we may be missing cleaning stuff. More important, with PHPUnit...

enhancement

There are a few troublesome things I find about BoilerplateCommentSniff: 1. It doesn't allow you to use `declare(strict_types=1)` in the standard place - on the same line as the opening...

The `setAccessible()` methods are, since PHP 8.1 no-op. That implies that, since Moodle 4.4.0 (that requires PHP 8.1), there shouldn't be any use in core. This issue is about to...