MDL-81521 core: Update all possibly data providers to be static

Note: Some data providers could not be automatically be converted to
being static. These will be handled in a separate issue.
This commit is contained in:
Andrew Nicols
2024-04-13 14:40:07 +08:00
parent eaa25cf51b
commit 3d51aed3e2
387 changed files with 1442 additions and 1404 deletions
@@ -23,9 +23,9 @@ namespace mlbackend_python;
* @category test
* @copyright 2019 David Mudrák <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \mlbackend_python\processor
*/
class processor_test extends \advanced_testcase {
final class processor_test extends \advanced_testcase {
/**
* Test implementation of the {@link \mlbackend_python\processor::check_pip_package_version()} method.
*
@@ -41,11 +41,12 @@ class processor_test extends \advanced_testcase {
/**
* Check that the {@link \mlbackend_python\processor::check_pip_package_version()} can be called with single argument.
*/
public function test_check_pip_package_version_default() {
public function test_check_pip_package_version_default(): void {
$this->assertSame(-1, \mlbackend_python\processor::check_pip_package_version('0.0.1'));
$this->assertSame(0, \mlbackend_python\processor::check_pip_package_version(
\mlbackend_python\processor::REQUIRED_PIP_PACKAGE_VERSION));
$this->assertSame(
0,
\mlbackend_python\processor::check_pip_package_version(\mlbackend_python\processor::REQUIRED_PIP_PACKAGE_VERSION),
);
}
/**
@@ -53,7 +54,7 @@ class processor_test extends \advanced_testcase {
*
* @return array
*/
public function check_pip_package_versions() {
public static function check_pip_package_versions(): array {
return [
// Exact match.
[