Passed
Push — master ( fd6b1a...a766ea )
by Dispositif
02:28
created
src/Domain/Models/Wiki/BiblioTemplateTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
             $id .= ($this->getParam('nom'.$i)) ?? $this->getParam('auteur'.$i) ?? '';
52 52
         }
53 53
 
54
-        return $id . ($this->getParam('année') ?? '');
54
+        return $id.($this->getParam('année') ?? '');
55 55
     }
56 56
 
57 57
 }
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
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             $string .= "\n";
95 95
         }
96 96
 
97
-        return $string . '}}';
97
+        return $string.'}}';
98 98
     }
99 99
 
100 100
     /**
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         // Gestion alias
270 270
         if (!$this->isValidParamName($name)) {
271 271
             // hack : 1 => "ouvrage collectif"
272
-            $name = (string)$name;
272
+            $name = (string) $name;
273 273
             $this->log[] = "parameter $name not found";
274 274
 
275 275
             // todo keep there
Please login to merge, or discard this patch.
src/Domain/Publisher/GoogleBookMapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             'titre' => $volume->title,
52 52
             'sous-titre' => $this->filterSubtitle($volume),
53 53
             'année' => $this->convertDate2Year($volume->publishedDate ?? null),
54
-            'pages totales' => (string)$volume->pageCount ?? null,
54
+            'pages totales' => (string) $volume->pageCount ?? null,
55 55
             'isbn' => $this->convertIsbn($volume),
56 56
             'présentation en ligne' => $this->presentationEnLigne($volume),
57 57
             'lire en ligne' => $this->lireEnLigne($volume),
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         // so isbn-13 replace isbn-10
113 113
         // todo refac algo (if 2x isbn13?)
114 114
         $isbn = null;
115
-        $ids = (array)$volume->industryIdentifiers;
115
+        $ids = (array) $volume->industryIdentifiers;
116 116
         foreach ($ids as $id) {
117 117
             if (!$isbn && in_array($id->type, ['ISBN_10', 'ISBN_13'])) {
118 118
                 $isbn = $id->identifier;
Please login to merge, or discard this patch.
src/Domain/Publisher/GoogleBooksUtil.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
         // todo verify http_build_query() enc_type parameter
114 114
         // todo http_build_query() process an urlencode, but a not encoded q= value ("fu+bar") is beautiful
115
-        return $googleURL . '?' . http_build_query($dat);
115
+        return $googleURL.'?'.http_build_query($dat);
116 116
     }
117 117
 
118 118
     /**
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     public static function isGoogleBookURL(string $text): bool
122 122
     {
123
-        return preg_match('#^' . self::GOOGLEBOOKS_START_URL_PATTERN . '[^>\]} \n]+$#i', $text) > 0;
123
+        return preg_match('#^'.self::GOOGLEBOOKS_START_URL_PATTERN.'[^>\]} \n]+$#i', $text) > 0;
124 124
     }
125 125
 
126 126
     /**
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
      */
153 153
     private static function isNewGoogleBookUrl(string $url): bool
154 154
     {
155
-        return (bool)preg_match(
156
-            '#^' . self::GOOGLEBOOKS_NEW_START_URL_PATTERN . self::GOOGLEBOOKS_ID_REGEX . '(?:&.+)?#',
155
+        return (bool) preg_match(
156
+            '#^'.self::GOOGLEBOOKS_NEW_START_URL_PATTERN.self::GOOGLEBOOKS_ID_REGEX.'(?:&.+)?#',
157 157
             $url
158 158
         );
159 159
     }
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     private static function getIDFromNewGBurl(string $url): ?string
232 232
     {
233 233
         if (preg_match(
234
-            '#^' . self::GOOGLEBOOKS_NEW_START_URL_PATTERN . '(' . self::GOOGLEBOOKS_ID_REGEX . ')(?:&.+)?#',
234
+            '#^'.self::GOOGLEBOOKS_NEW_START_URL_PATTERN.'('.self::GOOGLEBOOKS_ID_REGEX.')(?:&.+)?#',
235 235
             $url,
236 236
             $matches
237 237
         )
@@ -244,6 +244,6 @@  discard block
 block discarded – undo
244 244
 
245 245
     protected static function validateGoogleBooksId(string $id): bool
246 246
     {
247
-        return preg_match('#' . self::GOOGLEBOOKS_ID_REGEX . '#', $id) > 0;
247
+        return preg_match('#'.self::GOOGLEBOOKS_ID_REGEX.'#', $id) > 0;
248 248
     }
249 249
 }
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
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     public function deleteEmptyValueArray(array $array): array
28 28
     {
29
-        return array_filter($array, function ($value) {
29
+        return array_filter($array, function($value) {
30 30
             return (null !== $value && '' !== $value);
31 31
         });
32 32
     }
Please login to merge, or discard this patch.
src/Domain/Models/Wiki/AbstractStrictWikiTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
     protected function isValidParamName($name): bool
156 156
     {
157 157
         if (is_int($name)) {
158
-            $name = (string)$name;
158
+            $name = (string) $name;
159 159
         }
160 160
         // that parameter exists in template ?
161 161
         // @phpstan-ignore-next-line
Please login to merge, or discard this patch.
src/Domain/Utils/TextUtil.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@
 block discarded – undo
274 274
         if (mb_strlen($text) > $maxLength) {
275 275
             $spacePos = mb_strrpos(mb_substr($text, 0, $maxLength), ' ');
276 276
             $spacePos = ($spacePos > ($maxLength - 12)) ? $spacePos : $maxLength;
277
-            $text = trim(mb_substr($text, 0, $spacePos)) . self::SYMBOL_TEXT_CUT;
277
+            $text = trim(mb_substr($text, 0, $spacePos)).self::SYMBOL_TEXT_CUT;
278 278
         }
279 279
 
280 280
         return $text;
Please login to merge, or discard this patch.
src/Domain/Publisher/SeoSanitizer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         }
55 55
 
56 56
         // rebuild title but keep only the first 2 segments
57
-        return trim($titleSegments[0]) . self::REBUILD_SEPARATOR . trim($titleSegments[1]);
57
+        return trim($titleSegments[0]).self::REBUILD_SEPARATOR.trim($titleSegments[1]);
58 58
     }
59 59
 
60 60
     /**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
         return array_values(array_filter(
104 104
             $seoSegments,
105
-            function ($segment) use ($prettyDomainName, $siteName) {
105
+            function($segment) use ($prettyDomainName, $siteName) {
106 106
                 $strippedSegment = mb_strtolower(TextUtil::stripPunctuation(TextUtil::stripAccents($segment)));
107 107
                 $strippedSegment = str_replace(['.', '-', ' '], '', $strippedSegment);
108 108
 
Please login to merge, or discard this patch.
src/Application/Traits/WorkerCLITrait.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
         if ($this->modeAuto) {
24 24
             return true;
25 25
         }
26
-        $ask = readline(Color::LIGHT_MAGENTA . '*** '.$question.' [y/n/auto]' . Color::NORMAL);
26
+        $ask = readline(Color::LIGHT_MAGENTA.'*** '.$question.' [y/n/auto]'.Color::NORMAL);
27 27
         if ('auto' === $ask) {
28 28
             $this->modeAuto = true;
29 29
 
Please login to merge, or discard this patch.