1212
1313use ReflectionClass , ReflectionProperty ;
1414
15- use function call_user_func , call_user_func_array , get_object_vars , json_decode , json_encode , method_exists , property_exists ;
15+ use function get_object_vars , json_decode , json_encode , method_exists , property_exists ;
1616use const JSON_THROW_ON_ERROR ;
1717
1818abstract class SettingsContainerAbstract implements SettingsContainerInterface{
@@ -40,7 +40,7 @@ protected function construct():void{
4040 $ method = $ trait ->getShortName ();
4141
4242 if (method_exists ($ this , $ method )){
43- call_user_func ([ $ this , $ method] );
43+ $ this ->{ $ method}( );
4444 }
4545 }
4646
@@ -58,7 +58,7 @@ public function __get(string $property){
5858 $ method = 'get_ ' .$ property ;
5959
6060 if (method_exists ($ this , $ method )){
61- return call_user_func ([ $ this , $ method] );
61+ return $ this ->{ $ method}( );
6262 }
6363
6464 return $ this ->{$ property };
@@ -76,7 +76,7 @@ public function __set(string $property, $value):void{
7676 $ method = 'set_ ' .$ property ;
7777
7878 if (method_exists ($ this , $ method )){
79- call_user_func_array ([ $ this , $ method], [ $ value] );
79+ $ this ->{ $ method}( $ value );
8080
8181 return ;
8282 }
0 commit comments