private function createValue($object, $arguments = [])
    {

        if ($this->isInstanceOf($arguments, ConfigObject::class)) {
            $arguments = $arguments->toArray();
        }

        if (!$this->isArray($arguments)) {
            throw new ServiceManagerException(ServiceManagerException::INVALID_SERVICE_ARGUMENTS_TYPE, [$object]);
        }

        if (!$this->isString($object)) {
            return $object;
        }

        $object = $this->str($object);

        if ($object->startsWith('@')) {
            return ServiceManager::getInstance()->getService($object->trimLeft('@')->val());
        } else {
            $value = $object->val();
            if (class_exists($value)) {
                $reflection = new \ReflectionClass($value);

                return $reflection->newInstanceArgs($arguments);
            }

            return $value;
        }
    }