Passed
Branch dev (1a31b5)
by Dispositif
03:03
created
src/Domain/Utils/TextUtil.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
     //    const TRADE = '™'; // ™
89 89
     //    const REG = '®'; // ®
90 90
     //    const COPY = '©'; // ©
91
-    const ALL_SPACES         = "\xE2\x80\xAF|\xC2\xAD|\xC2\xA0|\\s"; // Used in regexps. Better than \s
91
+    const ALL_SPACES = "\xE2\x80\xAF|\xC2\xAD|\xC2\xA0|\\s"; // Used in regexps. Better than \s
92 92
 
93 93
     /**
94 94
      * UTF8 first letter in upper case.
Please login to merge, or discard this patch.
src/Domain/Models/Wiki/ArticleTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
     {
112 112
         // Style "auto1234"
113 113
         if (empty($this->getParam('périodique') || empty($this->getParam('date')))) {
114
-            return 'auto'.(string)rand(1000, 9999);
114
+            return 'auto'.(string) rand(1000, 9999);
115 115
         }
116 116
         // Style "LeMonde15022017"
117 117
         $periodique = str_replace(
Please login to merge, or discard this patch.
src/Infrastructure/GoogleApiQuota.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     {
53 53
         $data = $this->getFileData();
54 54
         $this->lastDate = new DateTime($data['date'], new DateTimeZone(static::REBOOT_TIMEZONE));
55
-        $this->count = (int)$data['count'];
55
+        $this->count = (int) $data['count'];
56 56
 
57 57
         // Today reboot date/time of the quota
58 58
         $todayBoot = new DateTime();
Please login to merge, or discard this patch.
src/Domain/Models/Wiki/GoogleLivresTemplate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -258,10 +258,10 @@
 block discarded – undo
258 258
                 unset($dat['dq']);
259 259
             }
260 260
         }
261
-        if(empty($dat['q'])) {
261
+        if (empty($dat['q'])) {
262 262
             unset($dat['q']);
263 263
         }
264
-        if(empty($dat['dq'])) {
264
+        if (empty($dat['dq'])) {
265 265
             unset($dat['dq']);
266 266
         }
267 267
 
Please login to merge, or discard this patch.
src/Domain/Models/Wiki/AbstractWikiTemplate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     {
145 145
         // todo verify/useless ?
146 146
         if (is_int($name)) {
147
-            $name = (string)$name;
147
+            $name = (string) $name;
148 148
         }
149 149
 
150 150
         // that parameter exists in template ?
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         } catch (Throwable $e) {
268 268
             unset($e);
269 269
             // hack : 1 => "ouvrage collectif"
270
-            $name = (string)$name;
270
+            $name = (string) $name;
271 271
             $this->log[] = "parameter $name not found";
272 272
             if (!$noError) {
273 273
                 $this->parametersErrorFromHydrate[$name] = $value;
Please login to merge, or discard this patch.
src/Domain/Models/Wiki/LienWebTemplate.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     const MODEL_NAME = 'lien web';
20 20
 
21 21
     const REQUIRED_PARAMETERS
22
-                     = [
22
+                        = [
23 23
 //            'langue' => '', // suggéré
24 24
             'titre' => '', // required
25 25
             'url' => '', // required
Please login to merge, or discard this patch.
src/Domain/Utils/WikiTextUtilTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
             ['[[wikilien]', 'wikilien'],
108 108
             ['[[wiki|wikilien]]', 'wikilien'],
109 109
             ['{{en}}', '{{en}}'],
110
-            ['{{Lien|Jeffrey Robinson}}','Jeffrey Robinson'],
110
+            ['{{Lien|Jeffrey Robinson}}', 'Jeffrey Robinson'],
111 111
         ];
112 112
     }
113 113
 }
Please login to merge, or discard this patch.
src/Domain/Utils/ArrayProcessTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     {
40 40
         return array_filter(
41 41
             $myArray,
42
-            function ($value) {
42
+            function($value) {
43 43
                 return (null !== $value && '' !== $value);
44 44
             }
45 45
         );
Please login to merge, or discard this patch.
src/Domain/OuvrageOptimize.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
         }
107 107
 
108 108
         // translation : "London"->"Londres" seulement si langue=fr
109
-        if($this->hasParamValue('langue')
110
-        && $this->getParam('langue') === self::WIKI_LANGUAGE ) {
109
+        if ($this->hasParamValue('langue')
110
+        && $this->getParam('langue') === self::WIKI_LANGUAGE) {
111 111
             $manager = new FileManager();
112 112
             $row = $manager->findCSVline(__DIR__.'/resources/traduction_ville.csv', $location);
113 113
             if (!empty($row) && !empty($row[1])) {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         if (count($res) >= 2 && empty($auteur2)) {
193 193
             // delete author-params
194 194
             array_map(
195
-                function ($param) {
195
+                function($param) {
196 196
                     $this->unsetParam($param);
197 197
                 },
198 198
                 ['auteur', 'auteurs', 'prénom1', 'nom1']
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
             // todo bug {{citation bloc}} si "=" ou "|" dans texte de citation
733 733
             // Legacy : use {{début citation}} ... {{fin citation}}
734 734
             if (preg_match('#[=|]#', $extrait) > 0) {
735
-                $this->ouvrage->externalTemplates[] = (object)[
735
+                $this->ouvrage->externalTemplates[] = (object) [
736 736
                     'template' => 'début citation',
737 737
                     '1' => '',
738 738
                     'raw' => '{{Début citation}}'.$extrait.'{{Fin citation}}',
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
                 $this->notCosmetic = true;
742 742
             } else {
743 743
                 // StdClass
744
-                $this->ouvrage->externalTemplates[] = (object)[
744
+                $this->ouvrage->externalTemplates[] = (object) [
745 745
                     'template' => 'citation bloc',
746 746
                     '1' => $extrait,
747 747
                     'raw' => '{{Citation bloc|'.$extrait.'}}',
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
         // "commentaire=bla" => {{Commentaire biblio|1=bla}}
758 758
         if ($this->hasParamValue('commentaire')) {
759 759
             $commentaire = $this->getParam('commentaire');
760
-            $this->ouvrage->externalTemplates[] = (object)[
760
+            $this->ouvrage->externalTemplates[] = (object) [
761 761
                 'template' => 'commentaire biblio',
762 762
                 '1' => $commentaire,
763 763
                 'raw' => '{{Commentaire biblio|'.$commentaire.'}}',
Please login to merge, or discard this patch.