Passed
Push — master ( cbc9cf...fb61b0 )
by Dispositif
03:00
created
src/Infrastructure/BnfAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
         }
77 77
 
78 78
         // note : multi-records filtered in BnFMapper
79
-        $nbResults = (int)$xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0;
79
+        $nbResults = (int) $xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0;
80 80
         if (0 === $nbResults) {
81 81
             return null;
82 82
         }
Please login to merge, or discard this patch.
src/Application/ZiziBot.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $editInfo = new EditInfo(static::BOT_TALK_SUMMARY);
54 54
         $success = $page->addToBottomOfThePage($addText, $editInfo);
55 55
 
56
-        return (bool)$success;
56
+        return (bool) $success;
57 57
     }
58 58
 
59 59
     /**
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $to = ($toEditor) ? sprintf('@%s : ', $toEditor) : ''; // {{notif}}
69 69
         $sentence = TextUtil::mb_ucfirst($this->getRandomSentence());
70
-        if(!$sentence){
70
+        if (!$sentence) {
71 71
             throw new Exception('no sentence');
72 72
         }
73 73
 
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
     private function getRandomSentence(): ?string
78 78
     {
79 79
         $sentences = file(self::BOT_TALK_FILE);
80
-        if(!$sentences){
80
+        if (!$sentences) {
81 81
             return null;
82 82
         }
83
-        return (string)trim($sentences[array_rand($sentences)]);
83
+        return (string) trim($sentences[array_rand($sentences)]);
84 84
     }
85 85
 
86 86
     /**
Please login to merge, or discard this patch.
src/Application/Examples/WikiDocument.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@
 block discarded – undo
23 23
 if (200 !== $response->getStatusCode()) {
24 24
     die('not 200 response');
25 25
 }
26
-try{
26
+try {
27 27
     $newText = $response->getBody()->getContents();
28
-}catch (Throwable $e){
28
+} catch (Throwable $e) {
29 29
     dump($e);
30 30
     die;
31 31
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 }
26 26
 try{
27 27
     $newText = $response->getBody()->getContents();
28
-}catch (Throwable $e){
28
+} catch (Throwable $e){
29 29
     dump($e);
30 30
     die;
31 31
 }
Please login to merge, or discard this patch.
src/Domain/Publisher/BnfMapper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $this->xml = $xml;
42 42
 
43 43
         // skip multi-records
44
-        $nbResults = (int)$xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0;
44
+        $nbResults = (int) $xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0;
45 45
         if (1 !== $nbResults) {
46 46
             echo "BNF : $nbResults records (skip)\n";
47 47
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $res = [];
102 102
         foreach ($elements as $element) {
103 103
             if (isset($element) && $element instanceof SimpleXMLElement) {
104
-                $res[] = (string)$element;
104
+                $res[] = (string) $element;
105 105
             }
106 106
         }
107 107
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
         $raw = $this->xpath2string('//mxc:datafield[@tag="215"]/mxc:subfield[@code="a"]');
124 124
         if (!empty($raw) && preg_match('#([0-9]{2,}) p\.#', $raw, $matches) > 0) {
125
-            return (string)$matches[1];
125
+            return (string) $matches[1];
126 126
         }
127 127
 
128 128
         return null;
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         $raw = $this->xpath2string('//srw:recordIdentifier[1]/text()');
206 206
 
207 207
         if ($raw && preg_match('#ark:/[0-9]+/cb([0-9]+)#', $raw, $matches) > 0) {
208
-            return (string)$matches[1];
208
+            return (string) $matches[1];
209 209
         }
210 210
 
211 211
         return null;
Please login to merge, or discard this patch.