Skip to content

Commit edc2e65

Browse files
committed
Allow chaining from additional set methods
1 parent d1c0d57 commit edc2e65

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/FileConverter.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,26 +291,27 @@ public function optimizeFile($source = NULL, $destination = NULL, $ext = NULL) {
291291
return $this;
292292
}
293293

294-
public function setConverter($convert_path = 'null->null', $configuration = 'null:default') {
294+
public function &setConverter($convert_path = 'null->null', $configuration = 'null:default') {
295295
$conf = new ConfigurationOverride($this->settings);
296296
$conf->setConverter($convert_path, $configuration);
297297
array_unshift($this->configurations, $conf);
298+
return $this;
298299
}
299300

300-
public function setReplacements($hash, $mode = 'string') {
301+
public function &setReplacements($hash, $mode = 'string') {
301302
if (!isset($this->replacements[$mode])) {
302303
throw new \UnexpectedValueException("Invalid replacement mode.");
303304
}
304305
$this->replacements[$mode] = array_merge($this->replacements[$mode], (array) $hash);
305306
return $this;
306307
}
307308

308-
public function setSetting($key, $value) {
309+
public function &setSetting($key, $value) {
309310
$this->settings[$key] = $value;
310311
return $this;
311312
}
312313

313-
public function setSettings($settings) {
314+
public function &setSettings($settings) {
314315
$this->settings = array_merge($this->settings, (array) $settings);
315316
return $this;
316317
}

0 commit comments

Comments
 (0)