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

tempestphp / tempest-framework / 14049246919

24 Mar 2025 09:42PM UTC coverage: 79.353% (-0.04%) from 79.391%
14049246919

push

github

web-flow
feat(support): support array parameters in string manipulations (#1073)

48 of 48 new or added lines in 2 files covered. (100.0%)

735 existing lines in 126 files now uncovered.

10492 of 13222 relevant lines covered (79.35%)

90.78 hits per line

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

0.0
/src/Tempest/Database/src/QueryStatements/DropConstraintStatement.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\Database\QueryStatements;
6

7
use Tempest\Database\Config\DatabaseDialect;
8
use Tempest\Database\QueryStatement;
9

10
final readonly class DropConstraintStatement implements QueryStatement
11
{
12
    public function __construct(
×
13
        private string $localTable,
14
        private string $foreign,
UNCOV
15
    ) {}
×
16

UNCOV
17
    public function compile(DatabaseDialect $dialect): string
×
18
    {
UNCOV
19
        [$foreignTable] = explode('.', $this->foreign);
×
20

UNCOV
21
        $constraintName = sprintf(
×
22
            'fk_%s_%s',
×
23
            strtolower($foreignTable),
×
24
            strtolower($this->localTable),
×
25
        );
×
26

UNCOV
27
        return match ($dialect) {
×
28
            DatabaseDialect::MYSQL => sprintf(
×
29
                'ALTER TABLE `%s` DROP CONSTRAINT %s',
×
30
                $foreignTable,
×
31
                $constraintName,
×
32
            ),
×
33
            default => '',
×
34
        };
×
35
    }
36
}
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