Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit e4c8d1a

Browse files
committed
Merge branch 'hotfix/151'
Close #151
2 parents 21da65b + a5a2247 commit e4c8d1a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Generator/ClassGenerator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
use function array_map;
1616
use function array_pop;
1717
use function array_search;
18+
use function array_values;
1819
use function array_walk;
19-
use function call_user_func_array;
2020
use function explode;
2121
use function get_class;
2222
use function gettype;
@@ -620,7 +620,7 @@ public function addConstants(array $constants)
620620
$this->addPropertyFromGenerator($constant);
621621
} else {
622622
if (is_array($constant)) {
623-
call_user_func_array([$this, 'addConstant'], $constant);
623+
$this->addConstant(...array_values($constant));
624624
}
625625
}
626626
}
@@ -641,7 +641,7 @@ public function addProperties(array $properties)
641641
if (is_string($property)) {
642642
$this->addProperty($property);
643643
} elseif (is_array($property)) {
644-
call_user_func_array([$this, 'addProperty'], $property);
644+
$this->addProperty(...array_values($property));
645645
}
646646
}
647647
}
@@ -822,7 +822,7 @@ public function addMethods(array $methods)
822822
if (is_string($method)) {
823823
$this->addMethod($method);
824824
} elseif (is_array($method)) {
825-
call_user_func_array([$this, 'addMethod'], $method);
825+
$this->addMethod(...array_values($method));
826826
}
827827
}
828828
}

0 commit comments

Comments
 (0)