diff options
Diffstat (limited to 'vendor/doctrine/orm/src/Exception/UnrecognizedIdentifierFields.php')
| -rw-r--r-- | vendor/doctrine/orm/src/Exception/UnrecognizedIdentifierFields.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/doctrine/orm/src/Exception/UnrecognizedIdentifierFields.php b/vendor/doctrine/orm/src/Exception/UnrecognizedIdentifierFields.php new file mode 100644 index 0000000..645bdae --- /dev/null +++ b/vendor/doctrine/orm/src/Exception/UnrecognizedIdentifierFields.php | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | declare(strict_types=1); | ||
| 4 | |||
| 5 | namespace Doctrine\ORM\Exception; | ||
| 6 | |||
| 7 | use LogicException; | ||
| 8 | |||
| 9 | use function implode; | ||
| 10 | use function sprintf; | ||
| 11 | |||
| 12 | final class UnrecognizedIdentifierFields extends LogicException implements ManagerException | ||
| 13 | { | ||
| 14 | /** @param string[] $fieldNames */ | ||
| 15 | public static function fromClassAndFieldNames(string $className, array $fieldNames): self | ||
| 16 | { | ||
| 17 | return new self(sprintf( | ||
| 18 | 'Unrecognized identifier fields: "%s" are not present on class "%s".', | ||
| 19 | implode("', '", $fieldNames), | ||
| 20 | $className, | ||
| 21 | )); | ||
| 22 | } | ||
| 23 | } | ||
