public static function args($object) : array
    {
        if (!is_object($object)) {
            throw new InvalidArgumentException('Argument must be'
                . ' an object ' . gettype($object) . ' found.');
        }

        $reflector = new ReflectionClass($object);

        $constructor = $reflector->getConstructor();

        if ($constructor instanceof ReflectionMethod) {
            $args = array_column($constructor->getParameters(), 'name');
        } else {
            $args = [];
        }

        return $args;
    }