Commit d1c4d43e authored by gbyte.co's avatar gbyte.co

Clean up

parent ca87b78e
...@@ -134,10 +134,7 @@ class QueueWorker { ...@@ -134,10 +134,7 @@ class QueueWorker {
* @todo Lock functionality * @todo Lock functionality
*/ */
public function rebuildQueue($variants = NULL) { public function rebuildQueue($variants = NULL) {
$variants = NULL === $variants ? NULL : (array) $variants;
$data_sets = []; $data_sets = [];
$sitemap_variants = $this->manager->getSitemapVariants(); $sitemap_variants = $this->manager->getSitemapVariants();
$this->moduleHandler->alter('simple_sitemap_variants', $sitemap_variants); $this->moduleHandler->alter('simple_sitemap_variants', $sitemap_variants);
...@@ -147,7 +144,7 @@ class QueueWorker { ...@@ -147,7 +144,7 @@ class QueueWorker {
foreach ($sitemap_variants as $variant_name => $variant_definition) { foreach ($sitemap_variants as $variant_name => $variant_definition) {
// Skipping unwanted sitemap variants. // Skipping unwanted sitemap variants.
if (NULL !== $variants && !in_array($variant_name, $variants)) { if (NULL !== $variants && !in_array($variant_name, (array) $variants)) {
continue; continue;
} }
...@@ -196,7 +193,6 @@ class QueueWorker { ...@@ -196,7 +193,6 @@ class QueueWorker {
* @todo Lock functionality * @todo Lock functionality
*/ */
public function generateSitemap($variants = NULL) { public function generateSitemap($variants = NULL) {
$variants = NULL === $variants ? NULL : (array) $variants;
$this->generatorSettings = [ $this->generatorSettings = [
'base_url' => $this->settings->getSetting('base_url', ''), 'base_url' => $this->settings->getSetting('base_url', ''),
......
...@@ -210,7 +210,7 @@ class Simplesitemap { ...@@ -210,7 +210,7 @@ class Simplesitemap {
$this->manager->getSitemapVariants(NULL, FALSE)); $this->manager->getSitemapVariants(NULL, FALSE));
} }
else { else {
$this->variants = is_array($variants) ? $variants : [$variants]; $this->variants = (array) $variants;
} }
return $this; return $this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment