<commit_before><?php
namespace Ouzo;

use Ouzo\Utilities\Path;

class ViewPathResolver
{
    public static function resolveViewPath($name)
    {
        return Path::join(ROOT_PATH, 'application', 'view', $name . self::getViewPostfix());
    }

    private static function getViewPostfix()
    {
        if (Uri::isAjax()) {
            return '.ajax.phtml';
        }

        switch (ContentType::getFromServer()) {
            case 'text/xml':
                return '.xml.phtml';
            case 'application/json':
            case 'text/json':
                return '.json.phtml';
            default:
                return '.phtml';
        }
    }
}<commit_msg>Fix getting view path name.<commit_after><?php
namespace Ouzo;

use Ouzo\Utilities\Path;

class ViewPathResolver
{
    public static function resolveViewPath($name)
    {
        return Path::join(ROOT_PATH, 'application', 'view', $name . self::getViewPostfix());
    }

    private static function getViewPostfix()
    {
        if (Uri::isAjax()) {
            return '.ajax.phtml';
        }

        switch (ContentType::value()) {
            case 'text/xml':
                return '.xml.phtml';
            case 'application/json':
            case 'text/json':
                return '.json.phtml';
            default:
                return '.phtml';
        }
    }
}
{'fraction_non_alphanumeric': 0.12814814814814815, 'fraction_numerical': 0.0, 'mean_word_length': 1.7913223140495869, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '5190941', 'n_tokens_mistral': 387, 'n_tokens_neox': 379, 'n_words': 84}