Passed
Branch master (61ab03)
by Dispositif
05:16 queued 02:29
created
src/Domain/Publisher/BnfMapper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $this->xml = $xml;
41 41
 
42 42
         // skip multi-records
43
-        $nbResults = (int)$xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0;
43
+        $nbResults = (int) $xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0;
44 44
         if (1 !== $nbResults) {
45 45
             echo "BNF : $nbResults records (skip)\n";
46 46
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $res = [];
124 124
         foreach ($elements as $element) {
125 125
             if (isset($element) && $element instanceof SimpleXMLElement) {
126
-                $res[] = (string)$element;
126
+                $res[] = (string) $element;
127 127
             }
128 128
         }
129 129
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     {
192 192
         $raw = $this->xpath2string('//mxc:datafield[@tag="215"]/mxc:subfield[@code="a"]');
193 193
         if (!empty($raw) && preg_match('#([0-9]{2,}) p\.#', $raw, $matches) > 0) {
194
-            return (string)$matches[1];
194
+            return (string) $matches[1];
195 195
         }
196 196
 
197 197
         return null;
Please login to merge, or discard this patch.
src/Domain/Publisher/Tests/ExternalMapperTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         $data = $mapper->process($page->getData());
32 32
 
33 33
         if (isset($data['consulté le'])) {
34
-            $data['consulté le'] = '11-04-2020';// unit testing date...
34
+            $data['consulté le'] = '11-04-2020'; // unit testing date...
35 35
         }
36 36
         $this::assertSame($expected, $data);
37 37
     }
Please login to merge, or discard this patch.
src/Domain/Models/Wiki/Tests/AbstractWikiTemplateTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 class AbstractWikiTemplateTest extends TestCase
18 18
 {
19
-    public function testIsValidForEdit(){
19
+    public function testIsValidForEdit() {
20 20
         $article = WikiTemplateFactory::create('article');
21 21
         $article->hydrate(
22 22
             [
Please login to merge, or discard this patch.
src/Application/Http/ExternHttpClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
             return null;
66 66
         }
67 67
 
68
-        return (string)$response->getBody()->getContents() ?? '';
68
+        return (string) $response->getBody()->getContents() ?? '';
69 69
     }
70 70
 
71 71
     public static function isWebURL(string $url): bool
Please login to merge, or discard this patch.
src/Application/AbstractBotTaskWorker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         }
66 66
         $this->setUpInConstructor();
67 67
 
68
-        $this->run();//todo delete that and use (Worker)->run($duration) or process management
68
+        $this->run(); //todo delete that and use (Worker)->run($duration) or process management
69 69
     }
70 70
 
71 71
     protected function setUpInConstructor(): void
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             new EditInfo($this->taskName, $this->minorFlag, $this->botFlag, $this->maxLag)
190 190
         );
191 191
         dump($result);
192
-        echo "Sleep ".(string)static::SLEEP_AFTER_EDITION."\n";
192
+        echo "Sleep ".(string) static::SLEEP_AFTER_EDITION."\n";
193 193
         sleep(static::SLEEP_AFTER_EDITION);
194 194
     }
195 195
 }
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
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $data = $this->getFileData();
56 56
         $this->lastDate = new DateTime($data['date'], new DateTimeZone(static::REBOOT_TIMEZONE));
57
-        $this->count = (int)$data['count'];
57
+        $this->count = (int) $data['count'];
58 58
 
59 59
         // Today reboot date/time of the quota
60 60
         $todayBoot = new DateTime();
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
         try {
78 78
             $json = file_get_contents(static::JSON_FILENAME);
79
-            $array = (array)json_decode($json, true);
79
+            $array = (array) json_decode($json, true);
80 80
         } catch (Throwable $e) {
81 81
             throw new ConfigException('Error on Google Quota file : reading or JSON malformed.');
82 82
         }
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
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     const REQUIRED_PARAMETERS = ['titre', 'url'];
22 22
 
23 23
     const MINIMUM_PARAMETERS
24
-                     = [
24
+                        = [
25 25
 //            'langue' => '', // suggéré
26 26
             'titre' => '', // required
27 27
             'url' => '', // required
Please login to merge, or discard this patch.
src/Application/OuvrageCompleteWorker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     public function __construct(QueueInterface $queueAdapter, ?bool $verbose = false)
61 61
     {
62 62
         $this->queueAdapter = $queueAdapter;
63
-        $this->verbose = (bool)$verbose;
63
+        $this->verbose = (bool) $verbose;
64 64
     }
65 65
 
66 66
     public function run(?int $limit = 10000)
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
                 $this->completeOuvrage($googleOuvrage);
229 229
             } catch (Throwable $e) {
230 230
                 echo "*** ERREUR GOOGLE Isbn Search ***".$e->getMessage()."\n";
231
-                if( strpos($e->getMessage(), 'Could not resolve host: www.googleapis.com') === false) {
231
+                if (strpos($e->getMessage(), 'Could not resolve host: www.googleapis.com') === false) {
232 232
                     throw $e;
233 233
                 }
234 234
                 unset($e);
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
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
     protected function isValidParamName($name): bool
152 152
     {
153 153
         if (is_int($name)) {
154
-            $name = (string)$name;
154
+            $name = (string) $name;
155 155
         }
156 156
 
157 157
         // that parameter exists in template ?
Please login to merge, or discard this patch.