• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

thecodingmachine / schema-analyzer / 15537876122

09 Jun 2025 03:10PM UTC coverage: 99.639%. Remained the same
15537876122

push

github

homersimpsons
:memo: Update README.md to target ^2.0 install

276 of 277 relevant lines covered (99.64%)

40.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/SchemaAnalyzerTableNotFoundException.php
1
<?php
2

3
namespace Mouf\Database\SchemaAnalyzer;
4

5
use Doctrine\DBAL\Schema\Schema;
6

7
class SchemaAnalyzerTableNotFoundException extends SchemaAnalyzerException
8
{
9
    public static function tableNotFound($tableName, Schema $schema, \Exception $previousException = null)
10
    {
11
        $closestTableName = '';
5✔
12
        $closestScore = INF;
5✔
13
        foreach ($schema->getTables() as $testedTable) {
5✔
14
            $testedTableName = $testedTable->getName();
5✔
15
            $l = levenshtein($testedTableName, $tableName);
5✔
16
            if ($l < $closestScore) {
5✔
17
                $closestScore = $l;
5✔
18
                $closestTableName = $testedTableName;
5✔
19
            }
20
        }
21

22
        return new self("Could not find table '$tableName'. Did you mean '$closestTableName'?", 0, $previousException);
5✔
23
    }
24
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc