Skip to content

Commit a1d21af

Browse files
committed
WIP more codechecker fixups
1 parent 9336609 commit a1d21af

9 files changed

+24
-23
lines changed

classes/check/tagging_status.php

+16-16
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,28 @@
2929
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3030
*/
3131
class tagging_status extends check {
32-
// TODO action link.
32+
// TODO action link.
3333

3434
/**
3535
* Get result
3636
* @return result
3737
*/
38-
public function get_result(): result {
39-
if(!tag_manager::is_tagging_enabled_and_supported()) {
40-
return new result(result::NA, 'Not enabled or supported by fs'); // TODO lang.
41-
}
38+
public function get_result(): result {
39+
if(!tag_manager::is_tagging_enabled_and_supported()) {
40+
return new result(result::NA, 'Not enabled or supported by fs'); // TODO lang.
41+
}
4242

43-
// Do a tag set test.
43+
// Do a tag set test.
4444
$config = \tool_objectfs\local\manager::get_objectfs_config();
4545
$client = \tool_objectfs\local\manager::get_client($config);
46-
$result = $client->test_set_object_tag();
46+
$result = $client->test_set_object_tag();
4747

48-
if ($result->success) {
49-
// TODO lang.
50-
return new result(result::OK, 'tagging success', $result->details);
51-
} else {
52-
// TODO lang.
53-
return new result(result::ERROR, 'tagging failed', $result->details);
54-
}
55-
}
56-
}
48+
if ($result->success) {
49+
// TODO lang.
50+
return new result(result::OK, 'tagging success', $result->details);
51+
} else {
52+
// TODO lang.
53+
return new result(result::ERROR, 'tagging failed', $result->details);
54+
}
55+
}
56+
}

classes/local/store/object_file_system.php

+2
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,9 @@ public function copy_object_from_local_to_external_by_hash($contenthash, $object
353353
$finallocation = $initiallocation;
354354

355355
if ($initiallocation === OBJECT_LOCATION_LOCAL) {
356+
356357
$success = $this->copy_from_local_to_external($contenthash);
358+
357359
if ($success) {
358360
$finallocation = OBJECT_LOCATION_DUPLICATED;
359361
}

classes/local/store/s3/client.php

-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,6 @@ public function test_permissions($testdelete) {
392392
return $permissions;
393393
}
394394

395-
396395
/**
397396
* get_exception_details
398397
* @param \Exception $exception

classes/local/tag/file_type_source.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ public function get_value_for_contenthash(string $contenthash): ?string {
6060

6161
return self::TYPE_UNCATEGORISED;
6262
}
63-
}
63+
}

classes/local/tag/tag_manager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,4 @@ private static function mark_object_tag_sync_status(string $contenthash, int $st
257257
private static function are_tags_different(array $a, array $b): bool {
258258
return $a !== $b;
259259
}
260-
}
260+
}

classes/local/tag/tag_source.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ public static function get_identifier(): string;
4141
* @return string
4242
*/
4343
public function get_value_for_contenthash(string $contenthash): ?string;
44-
}
44+
}

classes/task/queue_objects_needing_tags.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ public function execute() {
5858
manager::queue_adhoc_task($task, true);
5959
}
6060
}
61-
}
61+
}

classes/task/update_object_tags.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ public function execute() {
4949
// TODO if this fails because of 404, just ignore since file is clearly not replicated yet
5050
tag_manager::replicate_local_to_external_tags_for_object($contenthash);
5151
}
52-
}
52+
}

tests/local/tagging_test.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,4 +308,4 @@ public function test_replicate_local_to_external_tags_for_object() {
308308
$status = $DB->get_field('tool_objectfs_objects', 'tagsyncstatus', ['id' => $object->id]);
309309
$this->assertEquals(tag_manager::SYNC_STATUS_SYNC_NOT_REQUIRED, $status);
310310
}
311-
}
311+
}

0 commit comments

Comments
 (0)