Passed
Push — dev ( 043eb4...bf3609 )
by Dispositif
06:23
created
src/Application/Examples/plumeBot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     echo "$title \n";
35 35
 
36 36
     $pageAction = new WikiPageAction($wiki, $title);
37
-    if($pageAction->getNs() !== 0 ) {
37
+    if ($pageAction->getNs() !== 0) {
38 38
         throw new \Exception("La page n'est pas dans Main (ns!==0)");
39 39
     }
40 40
     $text = $pageAction->getText();
Please login to merge, or discard this patch.
src/Application/ZiziBot.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $editInfo = new EditInfo(static::BOT_TALK_SUMMARY);
59 59
         $success = $page->addToBottomOfThePage($addText, $editInfo);
60 60
 
61
-        return (bool)$success;
61
+        return (bool) $success;
62 62
     }
63 63
 
64 64
     /**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             return null;
87 87
         }
88 88
 
89
-        return (string)trim($sentences[array_rand($sentences)]);
89
+        return (string) trim($sentences[array_rand($sentences)]);
90 90
     }
91 91
 
92 92
     /**
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
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
     //    const TRADE = '™'; // ™
89 89
     //    const REG = '®'; // ®
90 90
     //    const COPY = '©'; // ©
91
-    const ALL_SPACES         = "\xE2\x80\xAF|\xC2\xAD|\xC2\xA0|\\s"; // Used in regexps. Better than \s
91
+    const ALL_SPACES = "\xE2\x80\xAF|\xC2\xAD|\xC2\xA0|\\s"; // Used in regexps. Better than \s
92 92
 
93 93
     /**
94 94
      * UTF8 first letter in upper case.
Please login to merge, or discard this patch.
src/Infrastructure/GoogleBooksAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
         return $this->api->volumes->get($googleId);
67 67
     }
68 68
 
69
-    private function checkGoogleQuota(){
70
-        if($this->quotaCounter->getCount() > 1000 ){
69
+    private function checkGoogleQuota() {
70
+        if ($this->quotaCounter->getCount() > 1000) {
71 71
             throw new \DomainException('Quota Google 1000 dépassé');
72 72
         }
73 73
         $this->quotaCounter->increment();
Please login to merge, or discard this patch.
src/Domain/Models/Wiki/ArticleTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
     {
112 112
         // Style "auto1234"
113 113
         if (empty($this->getParam('périodique') || empty($this->getParam('date')))) {
114
-            return 'auto'.(string)rand(1000, 9999);
114
+            return 'auto'.(string) rand(1000, 9999);
115 115
         }
116 116
         // Style "LeMonde15022017"
117 117
         $periodique = str_replace(
Please login to merge, or discard this patch.
src/Domain/Publisher/LiberationMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 {
23 23
     public function process($data): array
24 24
     {
25
-        if(!isset($data['JSON-LD'])) {
25
+        if (!isset($data['JSON-LD'])) {
26 26
             return [];
27 27
         }
28 28
         $data = $data['JSON-LD'];
Please login to merge, or discard this patch.
src/Domain/Publisher/LeMondeMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 {
22 22
     public function process($data): array
23 23
     {
24
-        if(!isset($data['JSON-LD'])) {
24
+        if (!isset($data['JSON-LD'])) {
25 25
             return [];
26 26
         }
27 27
         $ld = $data['JSON-LD'];
Please login to merge, or discard this patch.
src/Domain/Utils/TemplateParser.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
             /**
53 53
              * @var AbstractWikiTemplate
54 54
              */
55
-            try{
55
+            try {
56 56
                 $tplObject = WikiTemplateFactory::create($tplName);
57
-            }catch (\Throwable $e){
57
+            } catch (\Throwable $e) {
58 58
                 unset($e);
59 59
                 continue;
60 60
             }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         ) {
190 190
             array_walk(
191 191
                 $matches,
192
-                function (&$value) {
192
+                function(&$value) {
193 193
                     $value = str_replace(['CURLYBRACKETO', 'CURLYBRACKETC'], ['{', '}'], $value);
194 194
                 }
195 195
             );
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
              */
55 55
             try{
56 56
                 $tplObject = WikiTemplateFactory::create($tplName);
57
-            }catch (\Throwable $e){
57
+            } catch (\Throwable $e){
58 58
                 unset($e);
59 59
                 continue;
60 60
             }
Please login to merge, or discard this patch.
src/Application/EditProcess.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,13 +69,13 @@
 block discarded – undo
69 69
     private $dataAnalysis;
70 70
 
71 71
     public function __construct(DbAdapter $dbAdapter, Bot $bot, Memory $memory, RefGoogleBook $refGoogleBook,
72
-        ?DataAnalysis $dataAnalysis=null)
72
+        ?DataAnalysis $dataAnalysis = null)
73 73
     {
74 74
         $this->db = $dbAdapter;
75 75
         $this->bot = $bot;
76 76
         $this->memory = $memory;
77 77
         $this->refGooConverter = $refGoogleBook;
78
-        if($dataAnalysis) {
78
+        if ($dataAnalysis) {
79 79
             $this->dataAnalysis = $dataAnalysis;
80 80
         }
81 81
 
Please login to merge, or discard this patch.