Skip to content

Commit bf96cbc

Browse files
committed
Fix
1 parent 1c9cc53 commit bf96cbc

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ echo "Words: {$stats->wordCount}, Syllables: {$stats->syllableCount}\n";
5555

5656
// Readability formulas
5757
$fre = $engine->fleschReadingEase($text);
58-
echo "Flesch Reading Ease: {$fre->score} - {$fre->gradeLabel}\n";
58+
echo "Flesch Reading Ease: {$fre->score} - {$fre->interpretation}\n";
5959

6060
$fog = $engine->gunningFog($text);
6161
echo "Gunning Fog: {$fog->score} (grade {$fog->gradeLevel})\n";
@@ -147,11 +147,10 @@ $result = $engine->score('wiener_sachtextformel', $text);
147147
```php
148148
$result->score; // float - raw formula score
149149
$result->gradeLevel; // ?float - normalized grade level (FKGL, GF, SMOG, CL, ARI)
150-
$result->gradeLabel; // ?string - human-readable label ("6th Grade")
151150
$result->interpretation; // string - qualitative interpretation ("Easy", "Hard")
152151
$result->formulaName; // string - formula key
153152
$result->languageCode; // string - language code used
154-
$result->inputs; // array - intermediate values for debugging
153+
$result->inputs; // array<string, float|int> - intermediate values for debugging
155154
```
156155

157156
### API Reference
@@ -168,7 +167,7 @@ $engine->totalSyllables(string $text): int
168167
$engine->averageSyllablesPerWord(string $text): float
169168
$engine->averageWordsPerSentence(string $text): float
170169
$engine->polysyllableCount(string $text, bool $countProperNouns = true): int
171-
$engine->wordsWithNSyllables(string $text, int $n, bool $countProperNouns = true): int
170+
$engine->wordsWithMoreThanNSyllables(string $text, int $n, bool $countProperNouns = true): int
172171
$engine->histogramSyllables(string $text): array<int, int>
173172
$engine->analyze(string $text): TextStatistics
174173
```
@@ -269,7 +268,7 @@ Engine (facade)
269268
```bash
270269
composer install # Install dependencies
271270

272-
composer test # Run PHPUnit (259 tests)
271+
composer test # Run PHPUnit (257 tests)
273272
composer test:coverage # With HTML coverage report
274273
composer analyse # PHPStan level max
275274
composer cs:check # PHP CS Fixer (dry-run)
@@ -280,13 +279,12 @@ composer check # All checks: CS + PHPStan + Tests
280279
### Quality Metrics
281280

282281
| Metric | Value |
283-
|---|---|
284-
| Tests | **259** |
285-
| Assertions | **1 031** |
282+
|---|---|---|
283+
| Tests | **257** |
284+
| Assertions | **1 047** |
286285
| PHPStan | **Level max, 0 errors** |
287-
| PHP | 8.5.4 |
288-
| Source classes | 48 |
289-
| Test classes | 20 |
286+
| Source classes | 53 |
287+
| Test classes | 21 |
290288
| Supported languages | 86 |
291289
| Writing systems | 19 |
292290
| Readability formulas | 17 |

tests/Unit/Syllable/CompositeSyllableCounterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private function makeHeuristic(): HeuristicSyllableCounter
2828

2929
private function makeTexStub(): SyllableCounter
3030
{
31-
return new readonly class implements SyllableCounter {
31+
return new class implements SyllableCounter {
3232
public function countSyllables(string $word): int
3333
{
3434
if ($word === '') {

0 commit comments

Comments
 (0)