Override momentjs's digit transform logic with MW's
[lhc/web/wiklou.git] / includes / FormOptions.php
index c91c336..5e5e8d4 100644 (file)
@@ -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 );