@@ -110,7 +110,7 @@ |
||
| 110 | 110 | * @return string |
| 111 | 111 | */ |
| 112 | 112 | protected function translate($id, $domain = null, array $parameters = []){ |
| 113 | - return $this->get('translator')->trans($id, $parameters, $domain); |
|
| 113 | + return $this->get('translator')->trans($id, $parameters, $domain); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * |
| 87 | 87 | * @return array |
| 88 | 88 | */ |
| 89 | - protected function getFormErrors($form){ |
|
| 89 | + protected function getFormErrors($form) { |
|
| 90 | 90 | $errors = $this->get("starkerxp_structure.services.form_errors")->getFormErrors($form); |
| 91 | 91 | return $errors; |
| 92 | 92 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * |
| 97 | 97 | * @return string |
| 98 | 98 | */ |
| 99 | - protected function getUuid(){ |
|
| 99 | + protected function getUuid() { |
|
| 100 | 100 | return (\Ramsey\Uuid\Uuid::uuid4())->toString(); |
| 101 | 101 | } |
| 102 | 102 | |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * |
| 110 | 110 | * @return string |
| 111 | 111 | */ |
| 112 | - protected function translate($id, $domain = null, array $parameters = []){ |
|
| 112 | + protected function translate($id, $domain = null, array $parameters = []) { |
|
| 113 | 113 | return $this->get('translator')->trans($id, $parameters, $domain); |
| 114 | 114 | } |
| 115 | 115 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * |
| 121 | 121 | * @return array|mixed |
| 122 | 122 | */ |
| 123 | - protected function getRequestData(Request $request){ |
|
| 123 | + protected function getRequestData(Request $request) { |
|
| 124 | 124 | $data = json_decode($request->getContent(), true); |
| 125 | 125 | if (empty($data)) { |
| 126 | 126 | $data = $request->request->all(); |
@@ -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(); |