return also default value in toArray()
authorLars Kneschke <l.kneschke@metaways.de>
Tue, 10 Feb 2015 08:08:43 +0000 (09:08 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 10 Feb 2015 10:16:24 +0000 (11:16 +0100)
Change-Id: I09d88a22e00c69e97ad65be31fa8d6cb1dc3eb94
Reviewed-on: http://gerrit.tine20.com/customers/1627
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Setup/Backend/Schema/Field/Abstract.php

index aff14da..e9344a7 100644 (file)
@@ -116,25 +116,30 @@ abstract class Setup_Backend_Schema_Field_Abstract extends Setup_Backend_Schema_
                 }
             }
         }
-    }    
+    }
     
-        
+    /**
+     * 
+     * @return array
+     */
     public function toArray()
     {
         if ('decimal' == $this->type) {
             return array();
         } 
         
-        return array('name'=> $this->name, 
-                    'type' => $this->type,
-                    'autoincrement' => $this->autoincrement,
-                    'length' => (int) $this->length ,
-                    'unsigned' => $this->unsigned,
-                    'value' => $this->value,
-                    'mul' => $this->mul,
-                    'primary' => $this->primary,
-                    'unique' => $this->unique,
-                   );
+        return array(
+            'name'          => $this->name, 
+            'type'          => $this->type,
+            'autoincrement' => $this->autoincrement,
+            'length'        => (int) $this->length ,
+            'unsigned'      => $this->unsigned,
+            'value'         => $this->value,
+            'mul'           => $this->mul,
+            'primary'       => $this->primary,
+            'unique'        => $this->unique,
+            'default'       => $this->default
+       );
     }
     
     /**