private function getFileLoader(ContainerBuilder $container, FileLocator $locator, string $fileType): ?FileLoader
    {
        $loader = null;

        switch ($fileType) {
            case ConfigurationFileType::YAML:
                $loader = new YamlFileLoader($container, $locator);

                break;
            case ConfigurationFileType::XML:
                $loader = new XmlFileLoader($container, $locator);

                break;
            case ConfigurationFileType::PHP:
                $loader = new PhpFileLoader($container, $locator);

                break;
        }

        return $loader;
    }
private function getFileLoader(ContainerBuilder $container, FileLocator $locator, string $fileType): ?FileLoader
    {
        $loader = null;

        switch ($fileType) {
            case ConfigurationFileType::YAML:
                $loader = new YamlFileLoader($container, $locator);

                break;
            case ConfigurationFileType::XML:
                $loader = new XmlFileLoader($container, $locator);

                break;
            case ConfigurationFileType::PHP:
                $loader = new PhpFileLoader($container, $locator);

                break;
        }

        return $loader;
    }
private function getFileLoader ( ContainerBuilder $ container , FileLocator $ locator , string $ fileType ) : ? FileLoader { $ loader = null ; switch ( $ fileType ) { case ConfigurationFileType :: YAML : $ loader = new YamlFileLoader ( $ container , $ locator ) ; break ; case ConfigurationFileType :: XML : $ loader = new XmlFileLoader ( $ container , $ locator ) ; break ; case ConfigurationFileType :: PHP : $ loader = new PhpFileLoader ( $ container , $ locator ) ; break ; } return $ loader ; }
Returns loader of the configuration file

@param ContainerBuilder $container Container for the Dependency Injection (DI)
@param FileLocator      $locator   Locator used to find files
@param string           $fileType  Type of the configuration file
@return null|FileLoader
Returns loader of the configuration file