Moodle's coding style cleanup (codechecker).
Class structure adjustments and Moodle's coding style cleanup (codechecker).
PHPDoc and coding adjustments.
Block getlinks refactoring; support for phpunit testing.
Phpunit tests.
Code cleanup.