Completed
Push — SWP-2230-fix ( 7ea1d1 )
by
unknown
41s
created
src/SWP/Bundle/CoreBundle/Command/FillArticleExtraTableCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             $options .= "- Truncate [1]\n";
63 63
             $options .= "- Overwrite [2]\n";
64 64
             $options .= "- Exit [3]\n";
65
-            $res = (int)readline($options);
65
+            $res = (int) readline($options);
66 66
             if ($res > 2) {
67 67
                 exit(1);
68 68
             }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $totalArticlesProcessed = 0;
77 77
         $isProcessing = true;
78 78
 
79
-        echo "Info: " . $totalArticles . " articles will be processed\n" ;
79
+        echo "Info: ".$totalArticles." articles will be processed\n";
80 80
         sleep(1);
81 81
         $startTime = microtime(true);
82 82
         $iterations = 0;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         while ($isProcessing) {
85 85
             $iterations++;
86 86
             echo "\033[1A\033[K";
87
-            echo "==> Processed: " . $totalArticlesProcessed . "/" . $totalArticles . " articles in " .  (microtime(true) - $startTime) . "\n";
87
+            echo "==> Processed: ".$totalArticlesProcessed."/".$totalArticles." articles in ".(microtime(true) - $startTime)."\n";
88 88
             $sql = "SELECT id, extra FROM swp_article LIMIT $limit OFFSET $totalArticlesProcessed";
89 89
             $query = $this->entityManager->getConnection()->prepare($sql);
90 90
             $query->execute();
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                     if (is_array($extraItem)) {
117 117
                         $extra = ArticleExtraEmbedField::newFromValue($key, $extraItem);
118 118
                     } else {
119
-                        $extra = ArticleExtraTextField::newFromValue($key, (string)$extraItem);
119
+                        $extra = ArticleExtraTextField::newFromValue($key, (string) $extraItem);
120 120
                     }
121 121
                     $extra->setArticle($article);
122 122
                 }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
     protected function deletePreviousExtra(int $id)
177 177
     {
178
-        $sql = "DELETE FROM swp_article_extra sae WHERE sae.article_id=" . $id;
178
+        $sql = "DELETE FROM swp_article_extra sae WHERE sae.article_id=".$id;
179 179
         $query = $this->entityManager->getConnection()->prepare($sql);
180 180
         $query->execute();
181 181
     }
Please login to merge, or discard this patch.