diff --git a/src/Libs/Neuron.php b/src/Libs/Neuron.php index 59678b1..c86f477 100644 --- a/src/Libs/Neuron.php +++ b/src/Libs/Neuron.php @@ -25,9 +25,15 @@ class Neuron { /** * __construct * - * @param object|array $data + * @param array $data */ - public function __construct(array|object $data = []) { + public function __construct(...$data) { + if (count($data) === 1 && + isset($data[0]) && + (is_array($data[0]) || + is_object($data[0]))) + $data = $data[0]; + foreach($data as $key => $value) $this->{$key} = $value; }