@@ -15,7 +15,7 @@ |
||
15 | 15 | { |
16 | 16 | $html = <<<'EOF' |
17 | 17 | <html><style>background-color:black;</style><body><div style="text-align:center;">{{prenom|capitalize}}</div>Ceci[@e] est mon <span class="bold">contenu</span>. <p class="text-faded">Design and code an email that <strong>works on every device</strong> and client is a huge and <strong>demanding work</strong> also for professionals.<br>Mosaico allows you to realize <strong>a beautiful and effective template</strong>,<br> without a <strong>team of professionals</strong> and hours of testing to let it works everywhere.</p> Vous pouvez le télécharger <a href="http://google.com/test.php">ici</a></body></html> |
18 | -EOF; |
|
18 | +eof; |
|
19 | 19 | /** @var \Starkerxp\CampagneBundle\Render\RenderManager $renderManager */ |
20 | 20 | $renderManager = $this->get('starkerxp_campagne.manager.render'); |
21 | 21 | $renderManager->setData(['prenom' => 'guillaume']); |
@@ -6,7 +6,7 @@ |
||
6 | 6 | /** |
7 | 7 | * @var Composer\Autoload\ClassLoader $loader |
8 | 8 | */ |
9 | -$loader = require __DIR__ . '/../app/autoload.php'; |
|
9 | +$loader = require __DIR__.'/../app/autoload.php'; |
|
10 | 10 | Debug::enable(); |
11 | 11 | |
12 | 12 | $kernel = new AppKernel('test', true); |
@@ -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(); |