<commit_before><?php namespace Aedart\Config\Loader\Contracts\Loaders;

use Aedart\Config\Loader\Contracts\ParserFactoryAware;
use Aedart\Config\Loader\Exceptions\DirectoryNotSpecifiedException;
use Aedart\Config\Loader\Exceptions\InvalidPathException;
use Aedart\Config\Loader\Exceptions\ParseException;
use Aedart\Laravel\Helpers\Contracts\Config\ConfigAware;
use Aedart\Laravel\Helpers\Contracts\Filesystem\FileAware;

/**
 * <h1>Config Loader</h1>
 *
 * Responsible for loading and parsing various types of configuration files,
 * that are found in a given directory. The actual parsing is performed
 * by the loaders available configuration parsers.
 *
 * @see Parser
 *
 * @author <NAME> <<EMAIL>>
 * @package Aedart\Config\Loader\Loaders
 */
interface ConfigLoader extends ConfigAware, FileAware, ParserFactoryAware
{

    /**
     * Set the path to where the configuration
     * files are located
     *
     * @param string $path
     *
     * @return \Aedart\Config\Loader\Loaders\ConfigLoader
     *
     * @throws InvalidPathException If given path does not exist
     */
    public function setDirectory($path);

    /**
     * Returns the path to where the configuration
     * files are located
     *
     * @return string|null
     */
    public function getDirectory();

    /**
     * Check if a directory was set
     *
     * @return bool
     */
    public function hasDirectory();

    /**
     * Loads and parses the configuration files found inside
     * the specified directory
     *
     * @see getDirectory()
     * @see parse()
     * @see getConfig()
     *
     * @throws ParseException If unable to parse a given configuration file
     * @throws DirectoryNotSpecifiedException If no directory was specified
     */
    public function load();

    /**
     * Parse the given configuration file, and return instance
     * of the repository, in which the configuration is contained
     *
     * @param string $filePath Path to configuration file
     *
     * @return \Illuminate\Contracts\Config\Repository
     *
     * @throws ParseException If unable to parse given configuration file
     */
    public function parse($filePath);
}<commit_msg>Adapt to PHP 7.1<commit_after><?php

namespace Aedart\Config\Loader\Contracts\Loaders;

use Aedart\Config\Loader\Contracts\ParserFactoryAware;
use Aedart\Config\Loader\Contracts\Parsers\Parser;
use Aedart\Config\Loader\Exceptions\DirectoryNotSpecifiedException;
use Aedart\Config\Loader\Exceptions\InvalidPathException;
use Aedart\Config\Loader\Exceptions\ParseException;
use Aedart\Laravel\Helpers\Contracts\Config\ConfigAware;
use Aedart\Laravel\Helpers\Contracts\Filesystem\FileAware;
use Illuminate\Contracts\Config\Repository;

/**
 * <h1>Config Loader</h1>
 *
 * Responsible for loading and parsing various types of configuration files,
 * that are found in a given directory. The actual parsing is performed
 * by the loaders available configuration parsers.
 *
 * @see Parser
 *
 * @author <NAME> <<EMAIL>>
 * @package Aedart\Config\Loader\Loaders
 */
interface ConfigLoader extends ConfigAware,
    FileAware,
    ParserFactoryAware
{
    /**
     * Set the path to where the configuration
     * files are located
     *
     * @param string $path
     *
     * @return self
     *
     * @throws InvalidPathException If given path does not exist
     */
    public function setDirectory(string $path) : ConfigLoader;

    /**
     * Returns the path to where the configuration
     * files are located
     *
     * @return string|null
     */
    public function getDirectory() : ?string;

    /**
     * Check if a directory was set
     *
     * @return bool
     */
    public function hasDirectory(): bool;

    /**
     * Loads and parses the configuration files found inside
     * the specified directory
     *
     * @see getDirectory()
     * @see parse()
     * @see getConfig()
     *
     * @throws ParseException If unable to parse a given configuration file
     * @throws DirectoryNotSpecifiedException If no directory was specified
     */
    public function load(): void;

    /**
     * Parse the given configuration file, and return instance
     * of the repository, in which the configuration is contained
     *
     * @param string $filePath Path to configuration file
     *
     * @return Repository
     *
     * @throws ParseException If unable to parse given configuration file
     */
    public function parse(string $filePath) : Repository;
}
{'fraction_non_alphanumeric': 0.08588682621337508, 'fraction_numerical': 0.0013419816595839856, 'mean_word_length': 3.0433996383363473, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5201980', 'n_tokens_mistral': 1236, 'n_tokens_neox': 1219, 'n_words': 384}