<commit_before><?php

namespace Silktide\Reposition\QueryBuilder;

use Silktide\Reposition\QueryBuilder\QueryToken\Token;
use Silktide\Reposition\Metadata\EntityMetadata;

interface TokenSequencerInterface
{

    const TYPE_EXPRESSION = "expression";
    const TYPE_FIND = "find";
    const TYPE_SAVE = "save";
    const TYPE_UPDATE = "update";
    const TYPE_DELETE = "delete";

    const SORT_ASC = 1;
    const SORT_DESC = -1;

    const JOIN_INNER = "inner";
    const JOIN_LEFT = "left";
    const JOIN_RIGHT = "right";
    const JOIN_FULL = "full";

    /**
     * @return string
     */
    public function getType();

    /**
     * @return bool
     */
    public function isQuery();

    /**
     * @return string
     */
    public function getEntityName();

    /**
     * @return array
     */
    public function getIncludes();

    /**
     * @return array
     */
    public function getSequence();

    /**
     * Returns the next token in the sequence or false if the sequence has ended
     *
     * @return Token|bool
     */
    public function getNextToken();

    /**<commit_msg>Add getEntityMetadata to the Token Sequencer Interface<commit_after><?php

namespace Silktide\Reposition\QueryBuilder;

use Silktide\Reposition\QueryBuilder\QueryToken\Token;
use Silktide\Reposition\Metadata\EntityMetadata;

interface TokenSequencerInterface
{

    const TYPE_EXPRESSION = "expression";
    const TYPE_FIND = "find";
    const TYPE_SAVE = "save";
    const TYPE_UPDATE = "update";
    const TYPE_DELETE = "delete";

    const SORT_ASC = 1;
    const SORT_DESC = -1;

    const JOIN_INNER = "inner";
    const JOIN_LEFT = "left";
    const JOIN_RIGHT = "right";
    const JOIN_FULL = "full";

    /**
     * @return string
     */
    public function getType();

    /**
     * @return bool
     */
    public function isQuery();

    /**
     * @return string
     */
    public function getEntityName();

    /**
     * @return EntityMetadata
     */
    public function getEntityMetadata();

    /**
     * @return array
     */
    public function getIncludes();

    /**
     * @return array
     */
    public function getSequence();

    /**
     * Returns the next token in the sequence or false if the sequence has ended
     *
     * @return Token|bool
     */
    public function getNextToken();

    /**
{'fraction_non_alphanumeric': 0.11144449207029576, 'fraction_numerical': 0.0017145306472353193, 'mean_word_length': 2.4526627218934913, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1478', 'n_tokens_mistral': 709, 'n_tokens_neox': 674, 'n_words': 183}