public static function prepareConstructorArgs(\ReflectionClass $reflectionClass, array $params)
    {

        // prepare the array for the initialized arguments
        $initializedParams = array();

        // prepare the array for the arguments in camel case (in configuration we use a '-' notation)
        $paramsInCamelCase = array();

        // convert the configuration keys to camelcase
        foreach ($params as $key => $value) {
            $paramsInCamelCase[lcfirst(str_replace('-', '', ucwords($key, '-')))] = $value;
        }

        // load the constructor's reflection parameters
        $constructorParameters = $reflectionClass->getConstructor()->getParameters();

        // prepare the arguments by applying the values from the configuration
        /** @var \ReflectionParameter $reflectionParameter */
        foreach ($constructorParameters as $reflectionParameter) {
            if (isset($paramsInCamelCase[$paramName = $reflectionParameter->getName()])) {
                $initializedParams[$paramName] = $paramsInCamelCase[$paramName];
            } elseif ($reflectionParameter->isOptional()) {
                $initializedParams[$paramName] = $reflectionParameter->getDefaultValue();
            } else {
                $initializedParams[$paramName] = null;
            }
        }

        // return the array with the prepared arguments
        return $initializedParams;
    }