mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-23 14:58:40 +00:00
Add default case/exception for database type
This commit is contained in:
parent
bdf7b705cc
commit
24c6194f5c
|
|
@ -16,6 +16,7 @@ namespace phpOMS\Module;
|
|||
|
||||
use phpOMS\DataStorage\Database\DatabaseType;
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
use phpOMS\DataStorage\Database\Exception\InvalidDatabaseTypeException;
|
||||
|
||||
/**
|
||||
* Installer Abstract class.
|
||||
|
|
@ -86,6 +87,8 @@ class ActivateAbstract
|
|||
$dbPool->get()->con->commit();
|
||||
|
||||
break;
|
||||
default:
|
||||
throw new InvalidDatabaseTypeException($dbPool->get()->getType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ namespace phpOMS\Module;
|
|||
|
||||
use phpOMS\DataStorage\Database\DatabaseType;
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
use phpOMS\DataStorage\Database\Exception\InvalidDatabaseTypeException;
|
||||
|
||||
/**
|
||||
* Installer Abstract class.
|
||||
|
|
@ -86,6 +87,8 @@ class DeactivateAbstract
|
|||
$dbPool->get()->con->commit();
|
||||
|
||||
break;
|
||||
default:
|
||||
throw new InvalidDatabaseTypeException($dbPool->get()->getType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ declare(strict_types = 1);
|
|||
namespace phpOMS\Module;
|
||||
|
||||
use phpOMS\DataStorage\Database\DatabaseType;
|
||||
use phpOMS\DataStorage\Database\Exception\InvalidDatabaseTypeException;
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
use phpOMS\System\File\Local\Directory;
|
||||
use phpOMS\System\File\PathException;
|
||||
|
|
@ -79,6 +80,8 @@ class InstallerAbstract
|
|||
|
||||
$dbPool->get()->con->commit();
|
||||
break;
|
||||
default:
|
||||
throw new InvalidDatabaseTypeException($dbPool->get()->getType());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user