Skip to content

Commit b6b26a1

Browse files
author
adunn
committed
ss4upgrade: Tidy up code style
1 parent 5900e5c commit b6b26a1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

code/DropdownImageField.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ public function Field($properties = array()) {
3636
$options = array();
3737
if ($source) {
3838
if (is_object($source) && $this->hasEmptyDefault) {
39-
$options[] = new ArrayData(array(
39+
$options[] = new ArrayData([
4040
'Value' => '',
4141
'Title' => $this->emptyString,
4242
'Image' => ''
43-
));
43+
]);
4444
}
4545

4646
foreach ($source as $item) {
@@ -72,17 +72,19 @@ public function Field($properties = array()) {
7272
$disabled = 'disabled';
7373
}
7474

75-
$options[] = new ArrayData(array(
75+
$options[] = new ArrayData([
7676
'Title' => $title,
7777
'Value' => $value,
7878
'Image' => $image,
7979
'Selected' => $selected,
8080
'Disabled' => $disabled,
81-
));
81+
]);
8282
}
8383
}
8484

85-
$properties = array_merge($properties, array('Options' => new ArrayList($options)));
85+
$properties = array_merge($properties, [
86+
'Options' => new ArrayList($options)
87+
]);
8688

8789
return FormField::Field($properties);
8890
}

0 commit comments

Comments
 (0)