@@ -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,7 +158,7 @@ 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(){ |
|
161 | + public function rollback() { |
|
162 | 162 | $this->entityManager->rollback(); |
163 | 163 | $this->entityManager->close(); |
164 | 164 | $this->modeTransactionnal = false; |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | /** |
168 | 168 | * Permet de gérer un flush en mode transactions manuelles. |
169 | 169 | */ |
170 | - private function flush(){ |
|
171 | - if($this->modeTransactionnal){ |
|
170 | + private function flush() { |
|
171 | + if ($this->modeTransactionnal) { |
|
172 | 172 | $this->entityManager->commit(); |
173 | 173 | } |
174 | 174 | $this->entityManager->flush(); |