private function createConfiguration(
        $sourcesDirs,
        $excludeDirs,
        $chDir,
        $timeout,
        $textLogFile,
        $jsonLogFile
    ) {
        $source = new \stdClass();
        $source->directories = $sourcesDirs;

        if (!empty($excludeDirs)) {
            $source->excludes = $excludeDirs;
        }

        $configuration = new \stdClass();
        $configuration->source = $source;

        if ($chDir) {
            $configuration->chdir = $chDir;
        }

        if ($timeout) {
            $configuration->timeout = $timeout;
        }

        $logs = $this->prepareLogs($textLogFile, $jsonLogFile);

        if ($logs) {
            $configuration->logs = $logs;
        }

        return $configuration;
    }
private function createConfiguration(
        $sourcesDirs,
        $excludeDirs,
        $chDir,
        $timeout,
        $textLogFile,
        $jsonLogFile
    ) {
        $source = new \stdClass();
        $source->directories = $sourcesDirs;

        if (!empty($excludeDirs)) {
            $source->excludes = $excludeDirs;
        }

        $configuration = new \stdClass();
        $configuration->source = $source;

        if ($chDir) {
            $configuration->chdir = $chDir;
        }

        if ($timeout) {
            $configuration->timeout = $timeout;
        }

        $logs = $this->prepareLogs($textLogFile, $jsonLogFile);

        if ($logs) {
            $configuration->logs = $logs;
        }

        return $configuration;
    }
@param $sourcesDirs
@param $excludeDirs
@param $chDir
@param $timeout
@param $textLogFile
@param $jsonLogFile

@return \stdClass