Passed
Push — master ( 6a0f29...9f46c8 )
by Dispositif
02:51
created
src/Domain/WikiOptimizer/Handlers/DateHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         foreach ($params as $param) {
24 24
             if (
25 25
                 $this->ouvrage->hasParamValue($param)
26
-                && WikiTextUtil::isWikify(' ' . $this->ouvrage->getParam($param))
26
+                && WikiTextUtil::isWikify(' '.$this->ouvrage->getParam($param))
27 27
             ) {
28 28
                 $this->ouvrage->setParam($param, WikiTextUtil::unWikify($this->ouvrage->getParam($param)));
29 29
             }
Please login to merge, or discard this patch.
src/Domain/WikiOptimizer/Handlers/LangParamHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
             if ($lang2 && $lang !== $lang2) {
48 48
                 $this->ouvrage->setParam($this->langParam, $lang2);
49 49
                 if (OuvrageOptimize::WIKI_LANGUAGE !== $lang2) {
50
-                    $this->optiStatus->addSummaryLog('±' . $this->langParam);
50
+                    $this->optiStatus->addSummaryLog('±'.$this->langParam);
51 51
                 }
52 52
             }
53 53
         }
Please login to merge, or discard this patch.
src/Domain/WikiOptimizer/Handlers/DistinguishAuthorsHandler.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
         $auteur1 = $this->ouvrage->getParam('auteur') ?? '';
30 30
         $auteur1 .= $this->ouvrage->getParam('auteurs') ?? '';
31 31
         $auteur1 .= $this->ouvrage->getParam('prénom1') ?? '';
32
-        $auteur1 .= ' ' . $this->ouvrage->getParam('nom1') ?? '';
32
+        $auteur1 .= ' '.$this->ouvrage->getParam('nom1') ?? '';
33 33
         $auteur1 = trim($auteur1);
34 34
         // of authors 2
35 35
         $auteur2 = $this->ouvrage->getParam('auteur2') ?? '';
36 36
         $auteur2 .= $this->ouvrage->getParam('prénom2') ?? '';
37
-        $auteur2 .= ' ' . $this->ouvrage->getParam('nom2') ?? '';
37
+        $auteur2 .= ' '.$this->ouvrage->getParam('nom2') ?? '';
38 38
         $auteur2 = trim($auteur2);
39 39
 
40 40
         // skip if wikilink in author
@@ -45,21 +45,21 @@  discard block
 block discarded – undo
45 45
         $machine = new PredictAuthors();
46 46
         $res = $machine->predictAuthorNames($auteur1);
47 47
 
48
-        if (1 === count((array)$res)) {
48
+        if (1 === count((array) $res)) {
49 49
             // auteurs->auteur?
50 50
             return;
51 51
         }
52 52
         // Many authors... and empty "auteur2"
53
-        if (count((array)$res) >= 2 && empty($auteur2)) {
53
+        if (count((array) $res) >= 2 && empty($auteur2)) {
54 54
             // delete author-params
55 55
             array_map(
56
-                function ($param) {
56
+                function($param) {
57 57
                     $this->ouvrage->unsetParam($param);
58 58
                 },
59 59
                 ['auteur', 'auteurs', 'prénom1', 'nom1']
60 60
             );
61 61
             // iterate and edit new values
62
-            $count = count((array)$res);
62
+            $count = count((array) $res);
63 63
             for ($i = 0; $i < $count; ++$i) {
64 64
                 $this->ouvrage->setParam(sprintf('auteur%s', $i + 1), $res[$i]);
65 65
             }
Please login to merge, or discard this patch.
src/Domain/WikiOptimizer/Handlers/EditionCitebookHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 
65 65
     private function isEditionYear(string $str): bool
66 66
     {
67
-        return preg_match('#^\d{4}$#', $str) && (int)$str > 1700 && (int)$str < 2025;
67
+        return preg_match('#^\d{4}$#', $str) && (int) $str > 1700 && (int) $str < 2025;
68 68
     }
69 69
 
70 70
     private function correctReimpressionByParam(string $param): void
Please login to merge, or discard this patch.
src/Domain/WikiOptimizer/OuvrageOptimize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 {
36 36
     public const CONVERT_GOOGLEBOOK_TEMPLATE = false; // change OuvrageOptimizeTest !!
37 37
     public const WIKI_LANGUAGE = 'fr';
38
-    public const PUBLISHER_FRWIKI_FILENAME = __DIR__ . '/../resources/data_editors_wiki.json';
38
+    public const PUBLISHER_FRWIKI_FILENAME = __DIR__.'/../resources/data_editors_wiki.json';
39 39
 
40 40
     /**
41 41
      * @var OptiStatus
Please login to merge, or discard this patch.
src/Domain/WikiOptimizer/Handlers/WebSitePeriodiqueHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
             return;
72 72
         }
73 73
         $newTitle = preg_replace(
74
-            '#[- ]*(vidéo|site de|site|sur) ?' . $siteName . '$#i',
74
+            '#[- ]*(vidéo|site de|site|sur) ?'.$siteName.'$#i',
75 75
             '',
76 76
             $this->template->getParam('titre')
77 77
         );
Please login to merge, or discard this patch.
src/Domain/Transformers/Handlers/MixAutoParams.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
                     continue;
57 57
                 }
58 58
 
59
-                $this->optiStatus->addSummaryLog('++' . $param);
59
+                $this->optiStatus->addSummaryLog('++'.$param);
60 60
                 $this->optiStatus->setMajor(true);
61 61
                 $this->optiStatus->setNotCosmetic(true);
62 62
             }
Please login to merge, or discard this patch.
src/Domain/Transformers/Handlers/MixLienAuteur.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,10 +62,10 @@
 block discarded – undo
62 62
      */
63 63
     private function concatParamsAuteur1(OuvrageTemplate $ouvrage, ?int $num = 1): ?string
64 64
     {
65
-        $auteur = $ouvrage->getParam('auteur' . $num) ?? '';
66
-        $prenom = $ouvrage->getParam('prénom' . $num) ?? '';
67
-        $nom = $ouvrage->getParam('nom' . $num) ?? '';
65
+        $auteur = $ouvrage->getParam('auteur'.$num) ?? '';
66
+        $prenom = $ouvrage->getParam('prénom'.$num) ?? '';
67
+        $nom = $ouvrage->getParam('nom'.$num) ?? '';
68 68
 
69
-        return trim($auteur . ' ' . $prenom . ' ' . $nom);
69
+        return trim($auteur.' '.$prenom.' '.$nom);
70 70
     }
71 71
 }
72 72
\ No newline at end of file
Please login to merge, or discard this patch.
src/Infrastructure/GoogleApiQuota.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     {
50 50
         $data = $this->getFileData();
51 51
         $this->lastDate = new DateTime($data['date'], new DateTimeZone(static::REBOOT_TIMEZONE));
52
-        $this->count = (int)$data['count'];
52
+        $this->count = (int) $data['count'];
53 53
 
54 54
         // Today reboot date/time of the quota
55 55
         $todayBoot = new DateTime();
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         try {
72 72
             $json = file_get_contents(static::JSON_FILENAME);
73
-            $array = (array)json_decode($json, true, 512, JSON_THROW_ON_ERROR);
73
+            $array = (array) json_decode($json, true, 512, JSON_THROW_ON_ERROR);
74 74
         } catch (Throwable) {
75 75
             throw new ConfigException('Error on Google Quota file : reading or JSON malformed.');
76 76
         }
Please login to merge, or discard this patch.