Code Duplication    Length = 7-8 lines in 2 locations

src/Calculator/WienerSachtextFormel1Calculator.php 1 location

@@ 69-76 (lines=8) @@
66
     * @see https://de.wikipedia.org/wiki/Lesbarkeitsindex
67
     * @return mixed
68
     */
69
    public function calculate(Text $text)
70
    {
71
        return 0.1935 * $this->percentWordsWithMoreThanThreeSyllables->calculate($text)
72
             + 0.1672 * $this->averageSentenceLenght->calculate($text)
73
             + 0.1297 * $this->percentWordsWithMoreThanSixChars->calculate($text)
74
             - 0.0327 * $this->percentSingleSyllableWords->calculate($text)
75
             - 0.875;
76
    }
77
}
78

src/Calculator/WienerSachtextFormel2Calculator.php 1 location

@@ 65-71 (lines=7) @@
62
     * @see https://de.wikipedia.org/wiki/Lesbarkeitsindex
63
     * @return mixed
64
     */
65
    public function calculate(Text $text)
66
    {
67
        return 0.2007 * $this->percentWordsWithMoreThanThreeSyllables->calculate($text)
68
             + 0.1682 * $this->averageSentenceLenght->calculate($text)
69
             + 0.1373 * $this->percentWordsWithMoreThanSixChars->calculate($text)
70
             - 2.779;
71
    }
72
}
73