X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FFormOptions.php;h=5e5e8d4011a0d02765e525a80ec2969594e7c37c;hb=2873ccba9464db79bc7d6b0e5cd330703b919235;hp=c91c336762f645330fa0180d9b5297262982441e;hpb=abb5869cba1cca1c7d9bedfda6d3831bf2fc11a0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/FormOptions.php b/includes/FormOptions.php index c91c336762..5e5e8d4011 100644 --- a/includes/FormOptions.php +++ b/includes/FormOptions.php @@ -64,7 +64,7 @@ class FormOptions implements ArrayAccess { * consumeValue() or consumeValues() * - 'type' - one of the type constants (but never AUTO) */ - protected $options = array(); + protected $options = []; # Setting up @@ -76,7 +76,7 @@ class FormOptions implements ArrayAccess { * @param int $type One of the type constants (optional, defaults to AUTO) */ public function add( $name, $default, $type = self::AUTO ) { - $option = array(); + $option = []; $option['default'] = $default; $option['value'] = null; $option['consumed'] = false; @@ -228,7 +228,7 @@ class FormOptions implements ArrayAccess { * @return array Array of option values, or the default values if they are null */ public function consumeValues( $names ) { - $out = array(); + $out = []; foreach ( $names as $name ) { $this->validateName( $name, true ); @@ -278,7 +278,7 @@ class FormOptions implements ArrayAccess { * @return array */ public function getUnconsumedValues( $all = false ) { - $values = array(); + $values = []; foreach ( $this->options as $name => $data ) { if ( !$data['consumed'] ) { @@ -296,7 +296,7 @@ class FormOptions implements ArrayAccess { * @return array */ public function getChangedValues() { - $values = array(); + $values = []; foreach ( $this->options as $name => $data ) { if ( $data['value'] !== null ) { @@ -312,7 +312,7 @@ class FormOptions implements ArrayAccess { * @return array */ public function getAllValues() { - $values = array(); + $values = []; foreach ( $this->options as $name => $data ) { $values[$name] = $this->getValueReal( $data );