@@ -62,7 +62,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |