Completed
Push — master ( 062952...463605 )
by Guillaume
02:44
created
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.
src/Starkerxp/StructureBundle/Controller/StructureController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/Starkerxp/StructureBundle/Command/TestCommand.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     protected function execute(InputInterface $input, OutputInterface $output)
28 28
     {
29 29
         $metadata = $this->getContainer()->get('doctrine.orm.entity_manager')->getClassMetadata("StarkerxpCampagneBundle:Template2")
30
-           ;
30
+            ;
31 31
         dump($metadata);
32 32
 
33 33
     }
Please login to merge, or discard this patch.
src/Starkerxp/StructureBundle/Generator/AbstractGenerator.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -33,6 +33,10 @@  discard block
 block discarded – undo
33 33
         return $this;
34 34
     }
35 35
 
36
+    /**
37
+     * @param string[] $search
38
+     * @param string[] $replace
39
+     */
36 40
     protected function traiterLesFichiers($bundle, $parameters, $search, $replace)
37 41
     {
38 42
         foreach ($this->getFichiers() as $template) {
@@ -52,6 +56,9 @@  discard block
 block discarded – undo
52 56
 
53 57
     public abstract function getFichiers();
54 58
 
59
+    /**
60
+     * @param string $target
61
+     */
55 62
     public function traiterLeFichier($fichier, $target, $parameters)
56 63
     {
57 64
         if (file_exists($target) && explode('.', basename($target))[1] == 'yml') {
@@ -100,6 +107,9 @@  discard block
 block discarded – undo
100 107
         return true;
101 108
     }
102 109
 
110
+    /**
111
+     * @param string $clef
112
+     */
103 113
     protected function genererParameters($clef, $controller)
104 114
     {
105 115
         $controller = explode(':', $controller);
Please login to merge, or discard this patch.
src/Starkerxp/StructureBundle/Generator/ControllerGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
             '/Controller/_nomController_Controller.php',
40 40
             '/Tests/Controller/_nomController_ControllerTest.php',
41 41
             '/Form/Type/_nomController_Type.php',
42
-            '/Resources/config/routing.yml',  // Il faut récupérer la locale par défaut afin de générer le bon fichier.
43
-            '/Resources/translations/_lnomController_._locale_.yml',  // Il faut récupérer la locale par défaut afin de générer le bon fichier.
42
+            '/Resources/config/routing.yml', // Il faut récupérer la locale par défaut afin de générer le bon fichier.
43
+            '/Resources/translations/_lnomController_._locale_.yml', // Il faut récupérer la locale par défaut afin de générer le bon fichier.
44 44
         ];
45 45
     }
46 46
 
Please login to merge, or discard this patch.
src/Starkerxp/CampagneBundle/Entity/Campagne.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,6 @@
 block discarded – undo
144 144
      *
145 145
      * @param \DateTime $sendAt
146 146
      *
147
-
148 147
      */
149 148
     public function setSendAt($sendAt)
150 149
     {
Please login to merge, or discard this patch.
src/Starkerxp/StructureBundle/Manager/AbstractManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -143,14 +143,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/Starkerxp/StructureBundle/Command/AbstractImportCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
         $this->nombreElementsRestant = $this->input->getOption("nombreElements");
39 39
         $this->nombreElementsParPaquet = $this->input->getOption("nombreParPaquet");
40 40
         // Gestion de la configuration pour le mode trigger
41
-        if ($this->modeSelection == "trigger" && (int)$this->input->getOption("nombreDeMinutes")) {
42
-            $nombreDeMinutes = (int)$this->input->getOption("nombreDeMinutes");
41
+        if ($this->modeSelection == "trigger" && (int) $this->input->getOption("nombreDeMinutes")) {
42
+            $nombreDeMinutes = (int) $this->input->getOption("nombreDeMinutes");
43 43
             $dateMin = (new \DateTime())->sub(new \DateInterval("PT".$nombreDeMinutes."M"));
44 44
             $dateMax = new \DateTime();
45 45
             $this->dateMin = $dateMin->format("Y-m-d H:i:s");
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                 $jourMinimum = $tmp;
56 56
                 unset($tmp);
57 57
             }
58
-            $this->nombreDeJourATraiter = abs((int)$this->input->getOption("nombreDeJours"));
58
+            $this->nombreDeJourATraiter = abs((int) $this->input->getOption("nombreDeJours"));
59 59
             if (empty($jourMinimum) && empty($jourMaximum)) {
60 60
                 // min = j-1-$this->nombreDeJourATraiter max =j-1
61 61
                 $jourMinimum = (new \DateTime())->sub(new \DateInterval("P".($this->nombreDeJourATraiter + 1)."D"));
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         }
163 163
         // Dans le cas ou l'id est saisi et qu'il s'agit du mode par défaut.
164 164
         if (empty($this->modeSelection)) {
165
-            if ((int)$this->input->getOption("id")) {
165
+            if ((int) $this->input->getOption("id")) {
166 166
                 return $this->input->getOption("id");
167 167
             }
168 168
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             ->addOption('force', '', InputOption::VALUE_NONE, 'Permet de reimporter les données; même celles déjà importées')// Depends du mode choisis.
190 190
             //
191 191
             ->addOption('id', '', InputOption::VALUE_OPTIONAL, "permet de définir à partir de quel id inclus on importe les données")
192
-            ->addOption('nombreDeMinutes','',InputOption::VALUE_OPTIONAL,"permet de modifier le nombre de minute necessaire pour être présent dans la sélection, par défaut 5",5)
192
+            ->addOption('nombreDeMinutes', '', InputOption::VALUE_OPTIONAL, "permet de modifier le nombre de minute necessaire pour être présent dans la sélection, par défaut 5", 5)
193 193
             ->addOption(
194 194
                 'nombreDeJours',
195 195
                 '',
Please login to merge, or discard this patch.
src/Starkerxp/StructureBundle/Command/GenererDataTestCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
                 }
94 94
                 $export[strtolower($nomTable).'_'.$row['id']] = $dataExport;
95 95
             }
96
-            $contenu .= Yaml::dump([$namespace => $export,], 2, 4)."\n";
96
+            $contenu .= Yaml::dump([$namespace => $export, ], 2, 4)."\n";
97 97
         }
98 98
         echo $contenu;
99 99
     }
Please login to merge, or discard this patch.