<commit_before><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2017-2018, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / Framework / Server
 */

namespace PH7\Framework\Server;

defined('PH7') or exit('Restricted access');

class Environment
{
    const PRODUCTION_MODE = 'production';
    const DEVELOPMENT_MODE = 'development';

    const MODES = [
        self::PRODUCTION_MODE,
        self::DEVELOPMENT_MODE
    ];

    /**
     * @param string $sEnvName The chosen environment name.
     *
     * @return string The correct config environment filename (without .php ext).
     */
    public static function getFileName($sEnvName)
    {
        $sFileName = in_array($sEnvName, self::MODES, true) ? $sEnvName : self::MODES[0];

        return $sFileName . '.env';
    }
}<commit_msg>[Readability] Use PRODUCTION constant instead<commit_after><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2017-2018, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / Framework / Server
 */

namespace PH7\Framework\Server;

defined('PH7') or exit('Restricted access');

class Environment
{
    const PRODUCTION_MODE = 'production';
    const DEVELOPMENT_MODE = 'development';

    const MODES = [
        self::PRODUCTION_MODE,
        self::DEVELOPMENT_MODE
    ];

    /**
     * @param string $sEnvName The chosen environment name.
     *
     * @return string The correct config environment filename (without .php ext).
     */
    public static function getFileName($sEnvName)
    {
        $sFileName = in_array($sEnvName, self::MODES, true) ? $sEnvName : self::PRODUCTION_MODE;

        return $sFileName . '.env';
    }
}
{'fraction_non_alphanumeric': 0.12137203166226913, 'fraction_numerical': 0.01424802110817942, 'mean_word_length': 2.845841784989858, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '6607058', 'n_tokens_mistral': 595, 'n_tokens_neox': 554, 'n_words': 156}