/home/suroeste/public_html/payments.transportessuroeste.com/src/Exceptions
Edit: /home/suroeste/public_html/payments.transportessuroeste.com/src/Exceptions/DatabaseException.php (1157B)
dbErrorCode = $dbErrorCode;
$this->constraintName = $constraintName;
parent::__construct($message, $httpCode, $previous);
}
public function getDbErrorCode(): string
{
return $this->dbErrorCode;
}
public function getConstraintName(): string
{
return $this->constraintName;
}
public function isDuplicate(): bool
{
return $this->dbErrorCode === '1062';
}
public function isForeignKey(): bool
{
return in_array($this->dbErrorCode, ['1451', '1452']);
}
}