@@ -155,7 +155,7 @@ |
||
| 155 | 155 | /** |
| 156 | 156 | * Save a driver. |
| 157 | 157 | * |
| 158 | - * @param name $driver The class name of the driver. |
|
| 158 | + * @param name $driverClass The class name of the driver. |
|
| 159 | 159 | * @param array $config Driver data to save. |
| 160 | 160 | * @return void |
| 161 | 161 | */ |
@@ -143,13 +143,19 @@ |
||
| 143 | 143 | unset($data['_token']); |
| 144 | 144 | |
| 145 | 145 | // give the driver a change to validate this form if they want to |
| 146 | - if (method_exists($driver, 'validate')) $driver->validate($data); |
|
| 146 | + if (method_exists($driver, 'validate')) { |
|
| 147 | + $driver->validate($data); |
|
| 148 | + } |
|
| 147 | 149 | |
| 148 | 150 | // if the driver defined it's own save method, call it |
| 149 | - if (method_exists($driver, 'save')) $driver->save($data); |
|
| 151 | + if (method_exists($driver, 'save')) { |
|
| 152 | + $driver->save($data); |
|
| 153 | + } |
|
| 150 | 154 | |
| 151 | 155 | // otherwise just use the default save |
| 152 | - else $this->save($driverClass, $data); |
|
| 156 | + else { |
|
| 157 | + $this->save($driverClass, $data); |
|
| 158 | + } |
|
| 153 | 159 | } |
| 154 | 160 | |
| 155 | 161 | /** |