Skip to content

Commit aedba29

Browse files
committed
Drop magic getters and setters
1 parent 521966c commit aedba29

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/OutputFormat.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,7 @@ public function set($aNames, $mValue)
227227
*/
228228
public function __call(string $sMethodName, array $aArguments)
229229
{
230-
if (\strpos($sMethodName, 'set') === 0) {
231-
return $this->set(\substr($sMethodName, 3), $aArguments[0]);
232-
} elseif (\strpos($sMethodName, 'get') === 0) {
233-
return $this->get(\substr($sMethodName, 3));
234-
} elseif (\method_exists(OutputFormatter::class, $sMethodName)) {
230+
if (\method_exists(OutputFormatter::class, $sMethodName)) {
235231
return \call_user_func_array([$this->getFormatter(), $sMethodName], $aArguments);
236232
} else {
237233
throw new \Exception('Unknown OutputFormat method called: ' . $sMethodName);

0 commit comments

Comments
 (0)