Skip to content

Commit 04197aa

Browse files
committed
Drop magic getters and setters
1 parent 82ac96d commit 04197aa

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
@@ -225,11 +225,7 @@ public function set($aNames, $mValue)
225225
*/
226226
public function __call(string $sMethodName, array $aArguments)
227227
{
228-
if (\strpos($sMethodName, 'set') === 0) {
229-
return $this->set(\substr($sMethodName, 3), $aArguments[0]);
230-
} elseif (\strpos($sMethodName, 'get') === 0) {
231-
return $this->get(\substr($sMethodName, 3));
232-
} elseif (\method_exists(OutputFormatter::class, $sMethodName)) {
228+
if (\method_exists(OutputFormatter::class, $sMethodName)) {
233229
return \call_user_func_array([$this->getFormatter(), $sMethodName], $aArguments);
234230
} else {
235231
throw new \Exception('Unknown OutputFormat method called: ' . $sMethodName);

0 commit comments

Comments
 (0)