src/Eloquent/Typhoon/Configuration/ConfigurationReader.php
protected function buildConfiguration($data)
    {
        $this->typeCheck->buildConfiguration(func_get_args());

        $this->validateData($data);

        if (property_exists($data, ConfigurationOption::OUTPUT_PATH()->value())) {
            $outputPath = $data->{ConfigurationOption::OUTPUT_PATH()->value()};
        } else {
            $outputPath = $this->inferOutputPath(
                $data->{ConfigurationOption::SOURCE_PATHS()->value()}
            );
        }

        $configuration = new Configuration(
            $outputPath,
            $data->{ConfigurationOption::SOURCE_PATHS()->value()}
        );

        if (property_exists($data, ConfigurationOption::LOADER_PATHS()->value())) {
            $configuration->setLoaderPaths(
                $data->{ConfigurationOption::LOADER_PATHS()->value()}
            );
        }
        if (property_exists($data, ConfigurationOption::VALIDATOR_NAMESPACE()->value())) {
            $configuration->setValidatorNamespace(
                ClassName::fromString(
                    $data->{ConfigurationOption::VALIDATOR_NAMESPACE()->value()}
                )
            );
        }
        if (property_exists($data, ConfigurationOption::USE_NATIVE_CALLABLE()->value())) {
            $configuration->setUseNativeCallable(
                $data->{ConfigurationOption::USE_NATIVE_CALLABLE()->value()}
            );
        }

        return $configuration;
    }
protected function buildConfiguration($data)
    {
        $this->typeCheck->buildConfiguration(func_get_args());

        $this->validateData($data);

        if (property_exists($data, ConfigurationOption::OUTPUT_PATH()->value())) {
            $outputPath = $data->{ConfigurationOption::OUTPUT_PATH()->value()};
        } else {
            $outputPath = $this->inferOutputPath(
                $data->{ConfigurationOption::SOURCE_PATHS()->value()}
            );
        }

        $configuration = new Configuration(
            $outputPath,
            $data->{ConfigurationOption::SOURCE_PATHS()->value()}
        );

        if (property_exists($data, ConfigurationOption::LOADER_PATHS()->value())) {
            $configuration->setLoaderPaths(
                $data->{ConfigurationOption::LOADER_PATHS()->value()}
            );
        }
        if (property_exists($data, ConfigurationOption::VALIDATOR_NAMESPACE()->value())) {
            $configuration->setValidatorNamespace(
                ClassName::fromString(
                    $data->{ConfigurationOption::VALIDATOR_NAMESPACE()->value()}
                )
            );
        }
        if (property_exists($data, ConfigurationOption::USE_NATIVE_CALLABLE()->value())) {
            $configuration->setUseNativeCallable(
                $data->{ConfigurationOption::USE_NATIVE_CALLABLE()->value()}
            );
        }

        return $configuration;
    }
@param mixed $data

@return Configuration