MDL-57486 tool_recyclebin: Coding style fix
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 30 May 2018 00:35:08 +0000 (08:35 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 30 May 2018 00:35:08 +0000 (08:35 +0800)
admin/tool/recyclebin/classes/category_bin.php
admin/tool/recyclebin/classes/course_bin.php

index e9795f5..f352de2 100644 (file)
@@ -295,9 +295,11 @@ class category_bin extends base_bin {
             $fs->delete_area_files($context->id, 'tool_recyclebin', TOOL_RECYCLEBIN_COURSECAT_BIN_FILEAREA, $item->id);
         } else {
             // Course category has been deleted. Find records using $item->id as this is unique for coursecat recylebin.
-            $files = $DB->get_recordset('files', array('component' => 'tool_recyclebin',
-                                                           'filearea' => TOOL_RECYCLEBIN_COURSECAT_BIN_FILEAREA,
-                                                           'itemid' => $item->id));
+            $files = $DB->get_recordset('files', [
+                'component' => 'tool_recyclebin',
+                'filearea' => TOOL_RECYCLEBIN_COURSECAT_BIN_FILEAREA,
+                'itemid' => $item->id,
+            ]);
             $fs = get_file_storage();
             foreach ($files as $filer) {
                 $file = $fs->get_file_instance($filer);
index 3b0896c..fb5d779 100644 (file)
@@ -282,9 +282,11 @@ class course_bin extends base_bin {
             $fs->delete_area_files($context->id, 'tool_recyclebin', TOOL_RECYCLEBIN_COURSE_BIN_FILEAREA, $item->id);
         } else {
             // Course context has been deleted. Find records using $item->id as this is unique for course bin recyclebin.
-            $files = $DB->get_recordset('files', array('component' => 'tool_recyclebin',
-                                                           'filearea' => TOOL_RECYCLEBIN_COURSE_BIN_FILEAREA,
-                                                           'itemid' => $item->id));
+            $files = $DB->get_recordset('files', [
+                'component' => 'tool_recyclebin',
+                'filearea' => TOOL_RECYCLEBIN_COURSE_BIN_FILEAREA,
+                'itemid' => $item->id,
+            ]);
             $fs = get_file_storage();
             foreach ($files as $filer) {
                 $file = $fs->get_file_instance($filer);