forked from doctrine/dbal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInvalidState.php
More file actions
92 lines (74 loc) · 3.17 KB
/
InvalidState.php
File metadata and controls
92 lines (74 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
declare(strict_types=1);
namespace Doctrine\DBAL\Schema\Exception;
use Doctrine\DBAL\Schema\SchemaException;
use LogicException;
use function sprintf;
final class InvalidState extends LogicException implements SchemaException
{
public static function objectNameNotInitialized(): self
{
return new self('Object name has not been initialized.');
}
public static function indexHasInvalidType(string $indexName): self
{
return new self(sprintf('Index "%s" has invalid type.', $indexName));
}
public static function indexHasInvalidPredicate(string $indexName): self
{
return new self(sprintf('Index "%s" has invalid predicate.', $indexName));
}
public static function indexHasInvalidColumns(string $indexName): self
{
return new self(sprintf('Index "%s" has invalid columns.', $indexName));
}
public static function foreignKeyConstraintHasInvalidReferencedTableName(string $constraintName): self
{
return new self(sprintf(
'Foreign key constraint "%s" has invalid referenced table name.',
$constraintName,
));
}
public static function foreignKeyConstraintHasInvalidReferencingColumnNames(string $constraintName): self
{
return new self(sprintf(
'Foreign key constraint "%s" has one or more invalid referencing column names.',
$constraintName,
));
}
public static function foreignKeyConstraintHasInvalidReferencedColumnNames(string $constraintName): self
{
return new self(sprintf(
'Foreign key constraint "%s" has one or more invalid referenced column name.',
$constraintName,
));
}
public static function foreignKeyConstraintHasInvalidMatchType(string $constraintName): self
{
return new self(sprintf('Foreign key constraint "%s" has invalid match type.', $constraintName));
}
public static function foreignKeyConstraintHasInvalidOnUpdateAction(string $constraintName): self
{
return new self(sprintf('Foreign key constraint "%s" has invalid ON UPDATE action.', $constraintName));
}
public static function foreignKeyConstraintHasInvalidOnDeleteAction(string $constraintName): self
{
return new self(sprintf('Foreign key constraint "%s" has invalid ON DELETE action.', $constraintName));
}
public static function foreignKeyConstraintHasInvalidDeferrability(string $constraintName): self
{
return new self(sprintf('Foreign key constraint "%s" has invalid deferrability.', $constraintName));
}
public static function uniqueConstraintHasInvalidColumnNames(string $constraintName): self
{
return new self(sprintf('Unique constraint "%s" has one or more invalid column names.', $constraintName));
}
public static function uniqueConstraintHasEmptyColumnNames(string $constraintName): self
{
return new self(sprintf('Unique constraint "%s" has no column names.', $constraintName));
}
public static function tableHasInvalidPrimaryKeyConstraint(string $tableName): self
{
return new self(sprintf('Table "%s" has invalid primary key constraint.', $tableName));
}
}