@@ 342-344 (lines=3) @@ | ||
339 | $intSyllableCount = 0; |
|
340 | $arrWords = explode(' ', $strText); |
|
341 | $intWordCount = count($arrWords); |
|
342 | for ($i = 0; $i < $intWordCount; $i++) { |
|
343 | $intSyllableCount += self::syllableCount($arrWords[$i], $strEncoding); |
|
344 | } |
|
345 | ||
346 | return $intSyllableCount; |
|
347 | } |
|
@@ 360-362 (lines=3) @@ | ||
357 | $intSyllableCount = 0; |
|
358 | $intWordCount = Text::wordCount($strText, $strEncoding); |
|
359 | $arrWords = explode(' ', $strText); |
|
360 | for ($i = 0; $i < $intWordCount; $i++) { |
|
361 | $intSyllableCount += self::syllableCount($arrWords[$i], $strEncoding); |
|
362 | } |
|
363 | $averageSyllables = (Maths::bcCalc($intSyllableCount, '/', $intWordCount)); |
|
364 | return $averageSyllables; |
|
365 | } |