@@ -148,7 +148,8 @@ public function write( $index = null, $replacement = null , $skip_if_exists = F
148148 $ mark = "{$ prefix }" ;
149149 // we can update multi dementional
150150 $ indece = is_array ($ index )? $ index : array ( $ index ) ;
151-
151+ $ comment_str = '' ;
152+
152153 foreach ( $ indece as $ index => $ i )
153154 {
154155 $ regex .= '\[\s*( \'|\")( ' . $ i . ')*( \'|\")\s*\] ' ;
@@ -177,7 +178,7 @@ public function write( $index = null, $replacement = null , $skip_if_exists = F
177178 if (is_array ($ comments ) && count ($ comments ) > 0 )
178179 {
179180 // add the comment
180- $ comment_str = '/** ' ;
181+ $ comment_str . = '/** ' ;
181182 $ comment_str .= "\n" ;
182183 foreach ($ comments as $ line )
183184 {
@@ -205,6 +206,8 @@ public function write( $index = null, $replacement = null , $skip_if_exists = F
205206 * Update the variable name of the array config
206207 *
207208 * @param string $name
209+ *
210+ * @return Array_Config_Writer for method chaining
208211 */
209212 public function setFilename ($ name = null )
210213 {
@@ -217,6 +220,8 @@ public function setFilename($name = null)
217220 * // actually we expect someting like '\$config' but user migt just provide 'config'
218221 *
219222 * @param string $name
223+ *
224+ * @return Array_Config_Writer
220225 */
221226 public function setVariableName ($ name = null )
222227 {
@@ -232,6 +237,8 @@ public function setVariableName($name = null)
232237 }
233238
234239 $ this ->_variable = $ name ;
240+
241+ return $ this ;
235242 }
236243
237244 /**
0 commit comments