Completed
Push — master ( 70a8a6...4bb011 )
by Guillaume
02:28
created
src/Starkerxp/StructureBundle/Manager/EntityManager.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     /**
40 40
      * @param Entity $object
41 41
      *
42
-     * @return bool|ManagerInterface
42
+     * @return Entity
43 43
      */
44 44
     public function getSupport(Entity $object)
45 45
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,8 +102,8 @@
 block discarded – undo
102 102
      *
103 103
      * @return bool|EntityRepository
104 104
      */
105
-    public function getRepository(Entity $object){
106
-        if(!$manager = $this->getManager( $object)){
105
+    public function getRepository(Entity $object) {
106
+        if (!$manager = $this->getManager($object)) {
107 107
             return false;
108 108
         }
109 109
         return $manager->getRepository();
Please login to merge, or discard this patch.
var/SymfonyRequirements.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      * Adds a mandatory requirement in form of a php.ini configuration.
224 224
      *
225 225
      * @param string        $cfgName           The configuration name used for ini_get()
226
-     * @param bool|callback $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
226
+     * @param boolean|string $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
227 227
      *                                         or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
228 228
      * @param bool          $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
229 229
      *                                         This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      * Adds an optional recommendation in form of a php.ini configuration.
242 242
      *
243 243
      * @param string        $cfgName           The configuration name used for ini_get()
244
-     * @param bool|callback $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
244
+     * @param string|false $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
245 245
      *                                         or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
246 246
      * @param bool          $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
247 247
      *                                         This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
Please login to merge, or discard this patch.
web/app_dev.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
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('dev', true);
Please login to merge, or discard this patch.
src/Starkerxp/CampagneBundle/Render/HtmlToTxtRender.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $monTexte = implode(
41 41
             "\n",
42 42
             array_map(
43
-                function ($ligne) {
43
+                function($ligne) {
44 44
                     return trim($ligne);
45 45
                 },
46 46
                 explode("\n", $monTexte)
Please login to merge, or discard this patch.
src/Starkerxp/CampagneBundle/Render/OctosendHtmlRender.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
             return "<a href='{{unsubscribe:".$lien."}}' style='".$style."' title='Désinscription'>".$texte.'</a>';
59 59
         }
60 60
 
61
-        return "<a href='{{click:".$lien."}}' style='".$style."'>".$texte.'</a>';;
61
+        return "<a href='{{click:".$lien."}}' style='".$style."'>".$texte.'</a>'; ;
62 62
     }
63 63
 
64 64
     public function getSupport($api, $version)
Please login to merge, or discard this patch.
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -33,6 +33,9 @@  discard block
 block discarded – undo
33 33
         return $contenuReplace;
34 34
     }
35 35
 
36
+    /**
37
+     * @param string $type
38
+     */
36 39
     private function renderLien($type, $contenu)
37 40
     {
38 41
         $arrayContenu = [];
@@ -49,6 +52,11 @@  discard block
 block discarded – undo
49 52
 
50 53
     }
51 54
 
55
+    /**
56
+     * @param string $lien
57
+     * @param string $texte
58
+     * @param string $style
59
+     */
52 60
     protected function retournerLaChaine($type, $lien, $texte, $style = null)
53 61
     {
54 62
         if ($type == "unsub") {
Please login to merge, or discard this patch.
src/Starkerxp/RabbitmqBundle/Command/ReceiverLockCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
                 true,
57 57
                 true,
58 58
                 [
59
-                    'x-message-ttl'          => ['I', $this->getDelaiTemporisation() * 1000],   // delay in seconds to milliseconds
59
+                    'x-message-ttl'          => ['I', $this->getDelaiTemporisation() * 1000], // delay in seconds to milliseconds
60 60
                     "x-expires"              => ["I", $this->getDelaiTemporisation() * 1000 + 1000],
61 61
                     'x-dead-letter-exchange' => ['S', 'exchange_'.$nomChannel] // after message expiration in delay queue, move message to the right.now.queue
62 62
                 ]
Please login to merge, or discard this patch.
src/Starkerxp/CampagneBundle/Controller/TemplateController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
             return new JsonResponse([]);
28 28
         }
29 29
         $retour = array_map(
30
-            function ($element) use ($manager, $options) {
30
+            function($element) use ($manager, $options) {
31 31
                 return $manager->toArray($element, $this->getFields($options['fields']));
32 32
             },
33 33
             $resultSets
Please login to merge, or discard this patch.
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 class TemplateController extends StructureController
16 16
 {
17
-	/**
17
+    /**
18 18
      * @ApiDoc(
19 19
      *      resource=true,
20 20
      *      description="Liste les templates.",
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
     }
77 77
 
78 78
 	
79
-	/**
79
+    /**
80 80
      * @ApiDoc(
81 81
      *      resource=true,
82 82
      *      description="Affiche un template.",
83 83
      *      section="starkerxp_campagne.template",
84
-	 *      requirements={
84
+     *      requirements={
85 85
      *          {
86 86
      *              "name"="template_id",
87 87
      *              "dataType"="integer",
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $manager = $this->get("starkerxp_campagne.manager.template");
107 107
         try {
108 108
             $options = $this->resolveParams()->resolve($request->query->all());
109
-			if (!$entite = $manager->findOneBy(['id' => $request->get('template_id')])) {
109
+            if (!$entite = $manager->findOneBy(['id' => $request->get('template_id')])) {
110 110
                 return new JsonResponse(["payload" => $this->translate("entity.not_found", "template")], 404);
111 111
             }
112 112
         } catch (\Exception $e) {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         return new JsonResponse($retour);
119 119
     }
120 120
 
121
-	/**
121
+    /**
122 122
      * @ApiDoc(
123 123
      *      resource=true,
124 124
      *      description="Ajoute un template.",
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                 $template = $form->getData();
138 138
                 $template->setUuid($this->getUuid());
139 139
                 $manager->insert($template);
140
-				$this->dispatch(Events::TEMPLATE_CREATED, new GenericEvent($entite));
140
+                $this->dispatch(Events::TEMPLATE_CREATED, new GenericEvent($entite));
141 141
                 return new JsonResponse(["payload" => $this->translate("template.entity.created", "template")], 201);
142 142
             }
143 143
         } catch (\Exception $e) {
@@ -148,12 +148,12 @@  discard block
 block discarded – undo
148 148
         return new JsonResponse(["payload" => $this->getFormErrors($form)], 400);
149 149
     }
150 150
 
151
-	/**
151
+    /**
152 152
      * @ApiDoc(
153 153
      *      resource=true,
154 154
      *      description="Modifie un template.",
155 155
      *      section="starkerxp_campagne.template",
156
-	 *      requirements={
156
+     *      requirements={
157 157
      *          {
158 158
      *              "name"="template_id",
159 159
      *              "dataType"="integer",
@@ -167,9 +167,9 @@  discard block
 block discarded – undo
167 167
     public function putAction(Request $request)
168 168
     {
169 169
         $manager = $this->get("starkerxp_campagne.manager.template");
170
-		if (!$entite = $manager->findOneBy(['id' => $request->get('template_id')])) {
171
-			return new JsonResponse(["payload" => $this->translate("entity.not_found", "template")], 404);
172
-		}
170
+        if (!$entite = $manager->findOneBy(['id' => $request->get('template_id')])) {
171
+            return new JsonResponse(["payload" => $this->translate("entity.not_found", "template")], 404);
172
+        }
173 173
         $manager->beginTransaction();
174 174
         try {
175 175
             $form = $this->createForm(TemplateType::class, $entite, ['method' => 'PUT']);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             if ($form->isValid()) {
178 178
                 $entite = $form->getData();
179 179
                 $manager->update($entite);
180
-				$this->dispatch(Events::TEMPLATE_UPDATED, new GenericEvent($entite));
180
+                $this->dispatch(Events::TEMPLATE_UPDATED, new GenericEvent($entite));
181 181
                 return new JsonResponse(["payload" => $this->translate("template.entity.updated", "template")], 204);
182 182
             }
183 183
         } catch (\Exception $e) {
@@ -187,12 +187,12 @@  discard block
 block discarded – undo
187 187
         return new JsonResponse(["payload" => $this->getFormErrors($form)], 400);
188 188
     }
189 189
 
190
-	/**
190
+    /**
191 191
      * @ApiDoc(
192 192
      *      resource=true,
193 193
      *      description="Supprime un template.",
194 194
      *      section="starkerxp_campagne.template",
195
-	 *      requirements={
195
+     *      requirements={
196 196
      *          {
197 197
      *              "name"="template_id",
198 198
      *              "dataType"="integer",
@@ -207,15 +207,15 @@  discard block
 block discarded – undo
207 207
     {
208 208
         $manager = $this->get("starkerxp_campagne.manager.template");
209 209
         if (!$entite = $manager->findOneBy(['id' => $request->get('template_id')])) {
210
-			return new JsonResponse(["payload" => $this->translate("entity.not_found", "template")], 404);
211
-		}
210
+            return new JsonResponse(["payload" => $this->translate("entity.not_found", "template")], 404);
211
+        }
212 212
         try {
213 213
             $manager->delete($entite);
214 214
         } catch (\Exception $e) {
215 215
             $manager->rollback();
216 216
             return new JsonResponse(["payload" => $e->getMessage()], 400);
217 217
         }
218
-		$this->dispatch(Events::TEMPLATE_DELETED, new GenericEvent($request->get('template_id')));
218
+        $this->dispatch(Events::TEMPLATE_DELETED, new GenericEvent($request->get('template_id')));
219 219
 		
220 220
         return new JsonResponse(["payload" => $this->translate("template.entity.deleted", "template")], 204);
221 221
     }
Please login to merge, or discard this patch.
src/Starkerxp/CampagneBundle/Render/BuzzExpertRender.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -11,6 +11,9 @@
 block discarded – undo
11 11
         return $contenu;
12 12
     }
13 13
 
14
+    /**
15
+     * @param string $contenu
16
+     */
14 17
     public function remplacerLesCaracteresSpeciaux($contenu)
15 18
     {
16 19
         // Gestion des accents.
Please login to merge, or discard this patch.
web/app_test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.