MDL-76583 core_external: external_function_params coding style fixes

This commit is contained in:
Andrew Nicols
2023-01-19 07:33:46 +08:00
parent 59c9577912
commit 8e336beac3
+7 -2
View File
@@ -32,11 +32,16 @@ class external_function_parameters extends external_single_structure {
* @param int $required
* @param array $default
*/
public function __construct(array $keys, $desc = '', $required = VALUE_REQUIRED, $default = null) {
public function __construct(
array $keys,
$desc = '',
$required = VALUE_REQUIRED,
$default = null
) {
global $CFG;
if ($CFG->debugdeveloper) {
foreach ($keys as $key => $value) {
foreach (array_values($keys) as $value) {
if ($value instanceof external_value) {
if ($value->required == VALUE_OPTIONAL) {
debugging('External function parameters: invalid OPTIONAL value specified.', DEBUG_DEVELOPER);