Skip to content

Commit 45794a1

Browse files
committed
API Rename FormField Value to getFormattedValue
1 parent b314413 commit 45794a1

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

code/FormField/UserFormsCheckboxSetField.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function getOptions()
4747

4848
public function getValueForValidation(): mixed
4949
{
50-
$value = $this->Value();
50+
$value = $this->getValue();
5151
if (is_iterable($value) || is_null($value)) {
5252
return $value;
5353
}

code/Model/Submission/SubmittedFileField.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ class SubmittedFileField extends SubmittedFormField
3636
/**
3737
* Return the value of this field for inclusion into things such as
3838
* reports.
39-
*
40-
* @return string
4139
*/
42-
public function getFormattedValue()
40+
public function getFormattedValue(): ?DBField
4341
{
4442
$name = $this->getFileName();
4543
$link = $this->getLink(false);
@@ -77,7 +75,7 @@ public function getFormattedValue()
7775
));
7876
}
7977
}
80-
return false;
78+
return null;
8179
}
8280

8381
/**

tests/php/Model/EditableFormField/EditableCountryDropdownFieldTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function testDefaultValue()
3838
/** @var EditableCountryDropdownField $field */
3939
$field = EditableCountryDropdownField::create();
4040
$field->Default = 'nz';
41-
$this->assertEquals($field->getFormField()->Value(), 'nz');
41+
$this->assertEquals($field->getFormField()->getValue(), 'nz');
4242
}
4343

4444
public function testEmptyDefaultValue()

0 commit comments

Comments
 (0)