Skip to content
This repository was archived by the owner on Sep 23, 2023. It is now read-only.

Commit a13f015

Browse files
committed
Fix incomplete switch in service provider
* Missing break on sqlite case * Throw exception if driver type is not mysql or sqlite
1 parent 078643c commit a13f015

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/AgileDataServiceProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ protected function registerPersistence()
4040
break;
4141
case 'sqlite':
4242
$dsn .= "{$connectionDetails['database']}";
43+
break;
44+
default:
45+
throw new \Exception('Driver must mysql or sqlite');
4346
}
4447

4548
return Persistence::connect($dsn, ArrayUtil::get($connectionDetails['username']), ArrayUtil::get($connectionDetails['password']));

0 commit comments

Comments
 (0)