66
77namespace Rancoud \Database ;
88
9- /**
10- * Class Database.
11- */
129class Database
1310{
1411 /** @var Configurator|null Configurator */
@@ -32,7 +29,6 @@ class Database
3229 /** @var int Transaction depth */
3330 protected int $ transactionDepth = 0 ;
3431
35- /** Database constructor. */
3632 public function __construct (Configurator $ configurator )
3733 {
3834 $ this ->configurator = $ configurator ;
@@ -116,7 +112,7 @@ protected function prepareBind(string $sql, array $parameters = []): \PDOStateme
116112 if ($ statement === false ) {
117113 throw new DatabaseException ('Error Prepare Statement ' );
118114 }
119- } catch (\Exception $ e ) {
115+ } catch (\Exception ) {
120116 $ this ->addErrorPrepare ($ sql , $ parameters );
121117
122118 throw new DatabaseException ('Error Prepare Statement ' );
@@ -140,7 +136,7 @@ protected function prepareBind(string $sql, array $parameters = []): \PDOStateme
140136 throw new DatabaseException ('Error Bind Value ' );
141137 }
142138 // @codeCoverageIgnoreStart
143- } catch (\Exception $ e ) {
139+ } catch (\Exception ) {
144140 // Could not reach this statement without mocking database
145141 $ this ->addErrorPrepare ($ sql , $ parameters );
146142
@@ -268,7 +264,7 @@ protected function executeStatement(\PDOStatement $statement): void
268264 if ($ success === false ) {
269265 throw new DatabaseException ('Error Execute ' );
270266 }
271- } catch (\Exception $ e ) {
267+ } catch (\Exception ) {
272268 $ this ->addErrorStatement ($ statement );
273269
274270 throw new DatabaseException ('Error Execute ' );
@@ -519,7 +515,7 @@ public function startTransaction(): void
519515
520516 ++$ this ->transactionDepth ;
521517 // @codeCoverageIgnoreStart
522- } catch (\Exception $ e ) {
518+ } catch (\Exception ) {
523519 // Could not reach this statement without mocking database
524520 throw new DatabaseException ('Error Begin Transaction ' );
525521 }
@@ -562,7 +558,7 @@ public function commitTransaction(): void
562558 $ this ->exec ('RELEASE SAVEPOINT LEVEL ' . $ this ->transactionDepth );
563559 }
564560 // @codeCoverageIgnoreStart
565- } catch (\Exception $ e ) {
561+ } catch (\Exception ) {
566562 // Could not reach this statement without mocking database
567563 throw new DatabaseException ('Error Commit Transaction ' );
568564 }
@@ -591,7 +587,7 @@ public function rollbackTransaction(): void
591587 $ this ->exec ('ROLLBACK TO SAVEPOINT LEVEL ' . $ this ->transactionDepth );
592588 }
593589 // @codeCoverageIgnoreStart
594- } catch (\Exception $ e ) {
590+ } catch (\Exception ) {
595591 // Could not reach this statement without mocking database
596592 throw new DatabaseException ('Error Rollback Transaction ' );
597593 }
0 commit comments