Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Apply Rector rule set SetList::EARLY_RETURN #177

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Classes/Provider/BaseProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,8 @@ protected function getTileUrl($layer)
// if protocoll is missing, we add http:// or https://
if ($layer['tile_https'] == 1) {
return 'https://' . $layer['tile_url'];
} else {
return 'http://' . $layer['tile_url'];
}
return 'http://' . $layer['tile_url'];
}

public function setContentObjectRenderer(ContentObjectRenderer $cObj): void
Expand Down
8 changes: 3 additions & 5 deletions Classes/Provider/Leaflet.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,10 @@ protected function getLayerSwitcher()
}

if (empty($base) && empty($overlay)) {
$layerString = '';
} else {
$layerString = 'var layersControl=new L.Control.Layers({' . implode(',', $base) . '},{' . implode(',', $overlay) . '}' . ($this->config['show_layerswitcher'] == 2 ? ',{collapsed:false}' : '') . ');
' . $this->config['id'] . '.addControl(layersControl);';
return '';
}
return $layerString;
return 'var layersControl=new L.Control.Layers({' . implode(',', $base) . '},{' . implode(',', $overlay) . '}' . ($this->config['show_layerswitcher'] == 2 ? ',{collapsed:false}' : '') . ');
' . $this->config['id'] . '.addControl(layersControl);';
}

/**
Expand Down
10 changes: 4 additions & 6 deletions Classes/Provider/Openlayers.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ protected function getLayer($layer, $i, $backpath = '')
$layer['tile_url'] = strtr($this->getTileUrl($layer), ['{s}' => '{' . $layer['subdomains'] . '}']);

if ($layer['overlay'] == 1) {
$jsLayer = $this->config['id'] . "_" . $i . "_overlayLayer =
return $this->config['id'] . "_" . $i . "_overlayLayer =
new ol.layer.Tile({
visible: " . ($layer['visible'] == true ? 'true' : 'false') . ",
opacity: 0.99,
Expand All @@ -223,8 +223,9 @@ protected function getLayer($layer, $i, $backpath = '')
});
overlaygroup.getLayers().push(" . $this->config['id'] . "_" . $i . "_overlayLayer);
";
} else {
$jsLayer = $this->config['id'] . "_" . $i . "_baselayergroup =
}

return $this->config['id'] . "_" . $i . "_baselayergroup =
new ol.layer.Tile({
type: 'base',
combine: 'true',
Expand All @@ -239,9 +240,6 @@ protected function getLayer($layer, $i, $backpath = '')
});
baselayergroup.getLayers().push(" . $this->config['id'] . "_" . $i . "_baselayergroup);
";
}

return $jsLayer;
}

/**
Expand Down
10 changes: 6 additions & 4 deletions Classes/TceMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,13 @@ public function processDatamap_postProcessFieldArray($status, $table, $id, &$fie

// Update fieldArray if address is set
foreach ($tc as $def => $field) {
if ($def == strtolower($def)) {
if ($address[$def]) {
$fieldArray[$field] = $address[$def];
}
if ($def != strtolower($def)) {
continue;
}
if (!$address[$def]) {
continue;
}
$fieldArray[$field] = $address[$def];
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions Classes/Updates/FileLocationUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,8 @@ protected function falGetRecordsFromTable($countOnly = false)

if ($countOnly === true) {
return $numResults;
} else {
return $allResults;
}
return $allResults;
}


Expand Down