Code Duplication    Length = 9-9 lines in 2 locations

src/Tokenization/NGramTokenizer.php 1 location

@@ 21-29 (lines=9) @@
18
     */
19
    private $maxGram;
20
21
    public function __construct(int $minGram = 1, int $maxGram = 2)
22
    {
23
        if ($minGram < 1 || $maxGram < 1 || $minGram > $maxGram) {
24
            throw new InvalidArgumentException(sprintf('Invalid (%s, %s) minGram and maxGram value combination', $minGram, $maxGram));
25
        }
26
27
        $this->minGram = $minGram;
28
        $this->maxGram = $maxGram;
29
    }
30
31
    /**
32
     * {@inheritdoc}

src/Tokenization/NGramWordTokenizer.php 1 location

@@ 21-29 (lines=9) @@
18
     */
19
    private $maxGram;
20
21
    public function __construct(int $minGram = 1, int $maxGram = 2)
22
    {
23
        if ($minGram < 1 || $maxGram < 1 || $minGram > $maxGram) {
24
            throw new InvalidArgumentException(sprintf('Invalid (%s, %s) minGram and maxGram value combination', $minGram, $maxGram));
25
        }
26
27
        $this->minGram = $minGram;
28
        $this->maxGram = $maxGram;
29
    }
30
31
    /**
32
     * {@inheritdoc}