<commit_before><?php

namespace PHPCD\PHPFileInfo;

use SplFileObject;

/**
 *
 */
class StringBasedPHPFileInfo implements PHPFileInfo
{
    const USE_PATTERN =
        '/^use\s+((?<type>(constant|function)) )?(?<left>[\\\\\w]+\\\\)?({)?(?<right>[\\\\,\w\s]+)(})?\s*;$/';

    const ALIAS_PATTERN = '/(?<suffix>[\\\\\w]+)(\s+as\s+(?<alias>\w+))?/';

    const CLASS_PATTERN = '/^\s*\b(?<type>(((final|abstract)\s+)?(?<isClass>class))|interface|trait)\s+(?<name>\S+)/i';

    const EXTENDS_PATTERN = '/\s*\bextends\s+(?<superclass>\S+)\b/i';

    const IMPLEMENTS_PATTERN = '/\s*\bimplements\s+(?<interfaces>([\w\\\\]+(,\s+)?)+)/i';<commit_msg>StringBasedPHPFileInfo: added TODO-s for bugs<commit_after><?php

namespace PHPCD\PHPFileInfo;

use SplFileObject;

/**
 * @TODO fix for aliased namespaces (example in Mockery\Exception\InvalidOrderException)
 * @TODO fix validation when there exists class in the current namespace
 *      and built-in with the same name (e.g. Exception)
 */
class StringBasedPHPFileInfo implements PHPFileInfo
{
    const USE_PATTERN =
        '/^use\s+((?<type>(constant|function)) )?(?<left>[\\\\\w]+\\\\)?({)?(?<right>[\\\\,\w\s]+)(})?\s*;$/';

    const ALIAS_PATTERN = '/(?<suffix>[\\\\\w]+)(\s+as\s+(?<alias>\w+))?/';

    const CLASS_PATTERN = '/^\s*\b(?<type>(((final|abstract)\s+)?(?<isClass>class))|interface|trait)\s+(?<name>\S+)/i';

    const EXTENDS_PATTERN = '/\s*\bextends\s+(?<superclass>\S+)\b/i';

    const IMPLEMENTS_PATTERN = '/\s*\bimplements\s+(?<interfaces>([\w\\\\]+(,\s+)?)+)/i';
{'fraction_non_alphanumeric': 0.27835723598435463, 'fraction_numerical': 0.0, 'mean_word_length': 4.099667774086379, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, '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': '7138877', 'n_tokens_mistral': 636, 'n_tokens_neox': 589, 'n_words': 80}