@@ -59,19 +59,19 @@ function create_xapi_log_table($dbman, $tablename) {
5959 $ table ->add_field ('realuserid ' , XMLDB_TYPE_INTEGER , '10 ' , null , null , null , null );
6060
6161 // Adding keys to table.
62- $ table ->add_key ('primary ' , XMLDB_KEY_PRIMARY , array ( 'id ' ) );
62+ $ table ->add_key ('primary ' , XMLDB_KEY_PRIMARY , [ 'id ' ] );
6363
6464 // Adding indexes to table.
65- $ table ->add_index ('timecreated ' , XMLDB_INDEX_NOTUNIQUE , array ( 'timecreated ' ) );
66- $ table ->add_index ('course-time ' , XMLDB_INDEX_NOTUNIQUE , array ( 'courseid ' , 'anonymous ' , 'timecreated ' ) );
67- $ table ->add_index ('user-module ' , XMLDB_INDEX_NOTUNIQUE , array (
65+ $ table ->add_index ('timecreated ' , XMLDB_INDEX_NOTUNIQUE , [ 'timecreated ' ] );
66+ $ table ->add_index ('course-time ' , XMLDB_INDEX_NOTUNIQUE , [ 'courseid ' , 'anonymous ' , 'timecreated ' ] );
67+ $ table ->add_index ('user-module ' , XMLDB_INDEX_NOTUNIQUE , [
6868 'userid ' ,
6969 'contextlevel ' ,
7070 'contextinstanceid ' ,
7171 'crud ' ,
7272 'edulevel ' ,
73- 'timecreated '
74- ) );
73+ 'timecreated ' ,
74+ ] );
7575
7676 // Conditionally launch create table.
7777 if (!$ dbman ->table_exists ($ table )) {
@@ -97,12 +97,12 @@ function create_xapi_sent_log_table($dbman, $tablename) {
9797 $ table ->add_field ('timecreated ' , XMLDB_TYPE_INTEGER , '10 ' , null , XMLDB_NOTNULL , null , null );
9898
9999 // Adding keys to table.
100- $ table ->add_key ('primary ' , XMLDB_KEY_PRIMARY , array ( 'id ' ) );
100+ $ table ->add_key ('primary ' , XMLDB_KEY_PRIMARY , [ 'id ' ] );
101101
102102 // Adding indexes to table.
103- $ table ->add_index ('logstorestandardlogid ' , XMLDB_INDEX_NOTUNIQUE , array ( 'logstorestandardlogid ' ) );
104- $ table ->add_index ('type ' , XMLDB_INDEX_NOTUNIQUE , array ( 'type ' ) );
105- $ table ->add_index ('timecreated ' , XMLDB_INDEX_NOTUNIQUE , array ( 'timecreated ' ) );
103+ $ table ->add_index ('logstorestandardlogid ' , XMLDB_INDEX_NOTUNIQUE , [ 'logstorestandardlogid ' ] );
104+ $ table ->add_index ('type ' , XMLDB_INDEX_NOTUNIQUE , [ 'type ' ] );
105+ $ table ->add_index ('timecreated ' , XMLDB_INDEX_NOTUNIQUE , [ 'timecreated ' ] );
106106
107107 // Conditionally launch create table.
108108 if (!$ dbman ->table_exists ($ table )) {
@@ -127,7 +127,7 @@ function add_logstorestandardlogid_type_to_table($dbman, $tablename) {
127127 $ dbman ->add_field ($ table , $ field );
128128 }
129129
130- $ index = new xmldb_index ("logstorestandardlogid " , XMLDB_INDEX_NOTUNIQUE , array ( 'logstorestandardlogid ' ) );
130+ $ index = new xmldb_index ("logstorestandardlogid " , XMLDB_INDEX_NOTUNIQUE , [ 'logstorestandardlogid ' ] );
131131 if (!$ dbman ->index_exists ($ table , $ index )) {
132132 $ dbman ->add_index ($ table , $ index );
133133 }
@@ -138,7 +138,7 @@ function add_logstorestandardlogid_type_to_table($dbman, $tablename) {
138138 $ dbman ->add_field ($ table , $ field );
139139 }
140140
141- $ index = new xmldb_index ("type " , XMLDB_INDEX_NOTUNIQUE , array ( 'type ' ) );
141+ $ index = new xmldb_index ("type " , XMLDB_INDEX_NOTUNIQUE , [ 'type ' ] );
142142 if (!$ dbman ->index_exists ($ table , $ index )) {
143143 $ dbman ->add_index ($ table , $ index );
144144 }
@@ -173,12 +173,12 @@ function create_xapi_notification_table($dbman, $tablename) {
173173 $ table ->add_field ('timecreated ' , XMLDB_TYPE_INTEGER , '10 ' , null , XMLDB_NOTNULL , null , null );
174174
175175 // Adding keys to table.
176- $ table ->add_key ('primary ' , XMLDB_KEY_PRIMARY , array ( 'id ' ) );
176+ $ table ->add_key ('primary ' , XMLDB_KEY_PRIMARY , [ 'id ' ] );
177177
178178 // Adding indexes to table.
179- $ table ->add_index ('failedlogid ' , XMLDB_INDEX_NOTUNIQUE , array ( 'failedlogid ' ) );
180- $ table ->add_index ('email ' , XMLDB_INDEX_NOTUNIQUE , array ( 'email ' ) );
181- $ table ->add_index ('timecreated ' , XMLDB_INDEX_NOTUNIQUE , array ( 'timecreated ' ) );
179+ $ table ->add_index ('failedlogid ' , XMLDB_INDEX_NOTUNIQUE , [ 'failedlogid ' ] );
180+ $ table ->add_index ('email ' , XMLDB_INDEX_NOTUNIQUE , [ 'email ' ] );
181+ $ table ->add_index ('timecreated ' , XMLDB_INDEX_NOTUNIQUE , [ 'timecreated ' ] );
182182
183183 // Conditionally launch create table.
184184 if (!$ dbman ->table_exists ($ table )) {
0 commit comments