From a3f9968cca820a2c108482f93d9a8e471bf553fb Mon Sep 17 00:00:00 2001 From: Justus Dieckmann Date: Mon, 13 May 2024 17:48:33 +0200 Subject: [PATCH] Fix codestyle --- .../local/backup/restore_lifecycle_workflow.php | 2 +- step/email/tests/privacy/provider_test.php | 14 ++++++++++++++ tests/process_error_test.php | 4 +++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/classes/local/backup/restore_lifecycle_workflow.php b/classes/local/backup/restore_lifecycle_workflow.php index 5e9b1fe9..cd05dba4 100644 --- a/classes/local/backup/restore_lifecycle_workflow.php +++ b/classes/local/backup/restore_lifecycle_workflow.php @@ -87,7 +87,7 @@ public function execute(bool $force = false) { $this->check_subplugin_validity(); if (empty($this->errors) || $force) { // If all loaded data is valid, the new workflow and the steps can be stored in the database. - // If we force the import, we empty the errors; + // If we force the import, we empty the errors. $this->errors = []; $this->persist(); } diff --git a/step/email/tests/privacy/provider_test.php b/step/email/tests/privacy/provider_test.php index fcb8311e..0700d7bf 100644 --- a/step/email/tests/privacy/provider_test.php +++ b/step/email/tests/privacy/provider_test.php @@ -46,6 +46,20 @@ */ final class provider_test extends provider_testcase { + /** @var stdClass test user1 */ + private $user1; + /** @var stdClass test user2 */ + private $user2; + /** @var stdClass test user3 */ + private $user3; + + /** @var stdClass test course1 */ + private $course1; + /** @var stdClass test course2 */ + private $course2; + /** @var stdClass test course3 */ + private $course3; + /** * Basic setup for the provider tests. * diff --git a/tests/process_error_test.php b/tests/process_error_test.php index 49259054..217af94d 100644 --- a/tests/process_error_test.php +++ b/tests/process_error_test.php @@ -112,8 +112,10 @@ public function test_process_error_in_table(): void { $this->assertEquals($this->course->id, $record->courseid); if (version_compare(PHP_VERSION, '8.0', '<')) { $this->assertStringContainsString("Trying to get property 'id' of non-object", $record->errormessage); - } else { + } else if (version_compare(PHP_VERSION, '8.3', '<')) { $this->assertStringContainsString("Attempt to read property \"id\" on bool", $record->errormessage); + } else { + $this->assertStringContainsString("Attempt to read property \"id\" on false", $record->errormessage); } $this->assertEquals($process->id, $record->id); }