@@ -143,14 +143,14 @@ discard block |
||
143 | 143 | /** |
144 | 144 | * Vide l'UnitOfWork de l'entity manager. |
145 | 145 | */ |
146 | - public function clear(){ |
|
146 | + public function clear() { |
|
147 | 147 | $this->entityManager->clear(); |
148 | 148 | } |
149 | 149 | |
150 | 150 | /** |
151 | 151 | * Permet de passer en gestion des transations manuelles. (Conseillé par SensioLabs). |
152 | 152 | */ |
153 | - public function beginTransaction(){ |
|
153 | + public function beginTransaction() { |
|
154 | 154 | $this->modeTransactionnal = true; |
155 | 155 | $this->entityManager->beginTransaction(); |
156 | 156 | } |
@@ -158,8 +158,8 @@ discard block |
||
158 | 158 | /** |
159 | 159 | * Dans le cas d'une gestion des transactions manuelles en cas d'échec on rollback le tout. |
160 | 160 | */ |
161 | - public function rollback(){ |
|
162 | - if($this->modeTransactionnal) { |
|
161 | + public function rollback() { |
|
162 | + if ($this->modeTransactionnal) { |
|
163 | 163 | $this->entityManager->rollback(); |
164 | 164 | $this->entityManager->close(); |
165 | 165 | $this->modeTransactionnal = false; |
@@ -169,8 +169,8 @@ discard block |
||
169 | 169 | /** |
170 | 170 | * Permet de gérer un flush en mode transactions manuelles. |
171 | 171 | */ |
172 | - private function flush(){ |
|
173 | - if($this->modeTransactionnal){ |
|
172 | + private function flush() { |
|
173 | + if ($this->modeTransactionnal) { |
|
174 | 174 | $this->entityManager->commit(); |
175 | 175 | } |
176 | 176 | $this->entityManager->flush(); |