Passed
Push — master ( ac79bd...625dce )
by Dispositif
13:46 queued 16s
created
src/Domain/ExternLink/CheckURL.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,17 +51,17 @@  discard block
 block discarded – undo
51 51
         $this->url = $url;
52 52
         $this->registrableDomain = null;
53 53
         if (!HttpUtil::isHttpURL($url)) {
54
-            $this->log->debug('Skip : not Http URL : ' . $url, ['stats' => 'externref.skip.notRawURL']);
54
+            $this->log->debug('Skip : not Http URL : '.$url, ['stats' => 'externref.skip.notRawURL']);
55 55
             return false;
56 56
         }
57 57
 
58 58
         if ($this->hasForbiddenFilenameExtension()) {
59
-            $this->log->debug('Skip : ForbiddenFilenameExtension : ' . $url, ['stats' => 'externref.skip.forbiddenFilenameExtension']);
59
+            $this->log->debug('Skip : ForbiddenFilenameExtension : '.$url, ['stats' => 'externref.skip.forbiddenFilenameExtension']);
60 60
             return false;
61 61
         }
62 62
 
63 63
         if (WikiTextUtil::containsWikiTag($url)) {
64
-            $this->log->debug('Skip : URL contains HTML tag : ' . $url, ['stats' => 'externref.skip.URLcontainsTag']);
64
+            $this->log->debug('Skip : URL contains HTML tag : '.$url, ['stats' => 'externref.skip.URLcontainsTag']);
65 65
             return false;
66 66
         }
67 67
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     protected function hasForbiddenFilenameExtension(): bool
79 79
     {
80
-        return (bool)preg_match(
80
+        return (bool) preg_match(
81 81
             '#\.(pdf|jpg|jpeg|gif|png|webp|xls|xlsx|xlr|xml|xlt|txt|csv|js|docx|exe|gz|zip|ini|movie|mp3|mp4|ogg|raw|rss|tar|tgz|wma)$#i',
82 82
             $this->url
83 83
         );
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         try {
89 89
             $this->registrableDomain = $this->internetDomainParser->getRegistrableDomainFromURL($this->url);
90 90
         } catch (Exception) {
91
-            $this->log->warning('Skip : registrableDomain not a valid URL : ' . $this->url,
91
+            $this->log->warning('Skip : registrableDomain not a valid URL : '.$this->url,
92 92
                 ['stats' => 'externref.skip.URLAuthorized.exception2']
93 93
             );
94 94
             return null;
Please login to merge, or discard this patch.
src/Domain/Utils/WikiTextUtil.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             }
116 116
         }
117 117
 
118
-        return (string)$text;
118
+        return (string) $text;
119 119
     }
120 120
 
121 121
     /**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
         // fu_bar => [[fu_bar]] / Fu, fu => [[fu]]
131 131
         if (empty($page) || self::str2WikiTitle($label) === self::str2WikiTitle($page)) {
132
-            return '[[' . $label . ']]';
132
+            return '[['.$label.']]';
133 133
         }
134 134
 
135 135
         // fu, bar => [[Bar|fu]]
Please login to merge, or discard this patch.
src/Application/AbstractRefBotWorker.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
     public function hasWarning(): bool
26 26
     {
27
-        return (bool)$this->warning;
27
+        return (bool) $this->warning;
28 28
     }
29 29
 
30 30
     /**
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $refs = array_slice($refs, 0, self::MAX_REFS_PROCESSED_IN_ARTICLE, true);
53 53
 
54 54
         foreach ($refs as $ref) {
55
-            $refContent = WikiTextUtil::stripFinalPoint(trim((string)$ref[1]));
55
+            $refContent = WikiTextUtil::stripFinalPoint(trim((string) $ref[1]));
56 56
 
57 57
             $newRefContent = $this->processRefContent($refContent);
58 58
 
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
     protected function replaceRefInText(array $ref, string $replace, string $text): string
68 68
     {
69 69
         // Pas de changement
70
-        if (WikiTextUtil::stripFinalPoint(trim($replace)) === WikiTextUtil::stripFinalPoint(trim((string)$ref[1]))) {
70
+        if (WikiTextUtil::stripFinalPoint(trim($replace)) === WikiTextUtil::stripFinalPoint(trim((string) $ref[1]))) {
71 71
             return $text;
72 72
         }
73 73
         $replace = $this->addFinalPeriod($ref[0], $replace);
74
-        $result = str_replace($ref[1], $replace, (string)$ref[0]);
74
+        $result = str_replace($ref[1], $replace, (string) $ref[0]);
75 75
         $this->printDiff($ref[0], $result);
76 76
 
77 77
         return str_replace($ref[0], $result, $text);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     protected function addFinalPeriod($ref, string $replace): string
84 84
     {
85
-        if (preg_match('#</ref>#', (string)$ref)) {
85
+        if (preg_match('#</ref>#', (string) $ref)) {
86 86
             $replace .= '.';
87 87
         }
88 88
         return $replace;
Please login to merge, or discard this patch.
src/Application/OuvrageScan/ScanWiki2DB.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         try {
81 81
             $parsedTemplates = TemplateParser::parseAllTemplateByName('ouvrage', $text);
82 82
         } catch (Exception $e) {
83
-            $this->logger->error("SKIP : parse error " . $e->getMessage());
83
+            $this->logger->error("SKIP : parse error ".$e->getMessage());
84 84
 
85 85
             return false;
86 86
         }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         return !empty($result);
95 95
     }
96 96
 
97
-    protected function insertDB(array $ouvrages, string $title): bool|array
97
+    protected function insertDB(array $ouvrages, string $title): bool | array
98 98
     {
99 99
         $data = [];
100 100
         foreach ($ouvrages as $res) {
Please login to merge, or discard this patch.