<commit_before><?php

namespace wcf\system\database\table\index;

use wcf\system\database\table\TDroppableDatabaseComponent;

/**
 * Represents an index of a database table.
 *
 * @author  <NAME>
 * @copyright   2001-2019 WoltLab GmbH
 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
 * @package WoltLabSuite\Core\System\Database\Table\Index
 * @since   5.2
 */
final class DatabaseTableIndex
{
    use TDroppableDatabaseComponent;

    /**
     * indexed columns
     * @var string[]
     */
    protected array $columns;

    /**
     * is `true` if index name has been automatically generated
     */
    protected bool $generatedName = false;

    /**
     * name of index
     */
    protected string $name;

    /**
     * type of index (see `*_TYPE` constants)
     */
    protected ?string $type = null;

    const DEFAULT_TYPE = null;

    const PRIMARY_TYPE = 'PRIMARY';

    const UNIQUE_TYPE = 'UNIQUE';

    const FULLTEXT_TYPE = 'FULLTEXT';

    /**
     * Creates a new `DatabaseTableIndex` object.
     */
    protected function __construct(string $name)
    {
        $this->name = $name;
    }

    /**<commit_msg>Mark protected as private in final classes<commit_after><?php

namespace wcf\system\database\table\index;

use wcf\system\database\table\TDroppableDatabaseComponent;

/**
 * Represents an index of a database table.
 *
 * @author  <NAME>
 * @copyright   2001-2019 WoltLab GmbH
 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
 * @package WoltLabSuite\Core\System\Database\Table\Index
 * @since   5.2
 */
final class DatabaseTableIndex
{
    use TDroppableDatabaseComponent;

    /**
     * indexed columns
     * @var string[]
     */
    private array $columns;

    /**
     * is `true` if index name has been automatically generated
     */
    private bool $generatedName = false;

    /**
     * name of index
     */
    private string $name;

    /**
     * type of index (see `*_TYPE` constants)
     */
    private ?string $type = null;

    const DEFAULT_TYPE = null;

    const PRIMARY_TYPE = 'PRIMARY';

    const UNIQUE_TYPE = 'UNIQUE';

    const FULLTEXT_TYPE = 'FULLTEXT';

    /**
     * Creates a new `DatabaseTableIndex` object.
     */
    private function __construct(string $name)
    {
        $this->name = $name;
    }

    /**
{'fraction_non_alphanumeric': 0.11527135044173328, 'fraction_numerical': 0.008413967185527976, 'mean_word_length': 2.5975794251134645, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '422981', 'n_tokens_mistral': 757, 'n_tokens_neox': 712, 'n_words': 192}