aboutsummaryrefslogtreecommitdiff
path: root/app/Services
diff options
context:
space:
mode:
authorGravatar Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> 2023-07-07 22:36:27 +0200
committerGravatar GitHub <noreply@github.com> 2023-07-07 22:36:27 +0200
commitf8f163d054110f7e0ff6650fca146b474335f4bd (patch)
treedbd831e600bc76ca2830cd417bd52b712ff97309 /app/Services
parent7f9594b8c7d7799f2e5f89328bd5981410db8cf0 (diff)
Chore/processing of depreciations and updating code to php72 minimum (#5504)
* processing of depreciations and updating of code to php7.2 minimum * Autoformat many strange array indenting And revert a few unwanted changes --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Services')
-rw-r--r--app/Services/ImportService.php17
1 files changed, 4 insertions, 13 deletions
diff --git a/app/Services/ImportService.php b/app/Services/ImportService.php
index 8565be41c..e92351c0f 100644
--- a/app/Services/ImportService.php
+++ b/app/Services/ImportService.php
@@ -36,7 +36,7 @@ class FreshRSS_Import_Service {
public function importOpml(string $opml_file, ?FreshRSS_Category $forced_category = null, bool $dry_run = false): void {
@set_time_limit(300);
$this->lastStatus = true;
- $opml_array = array();
+ $opml_array = [];
try {
$libopml = new \marienfressinaud\LibOpml\LibOpml(false);
$opml_array = $libopml->parseString($opml_file);
@@ -70,10 +70,7 @@ class FreshRSS_Import_Service {
// Process the OPML outlines to get a list of categories and a list of
// feeds elements indexed by their categories names.
- list (
- $categories_elements,
- $categories_to_feeds,
- ) = $this->loadFromOutlines($opml_array['body'], '');
+ [$categories_elements, $categories_to_feeds] = $this->loadFromOutlines($opml_array['body'], '');
foreach ($categories_to_feeds as $category_name => $feeds_elements) {
$category_element = $categories_elements[$category_name] ?? null;
@@ -302,10 +299,7 @@ class FreshRSS_Import_Service {
foreach ($outlines as $outline) {
// Get the categories and feeds from the child outline (it may
// return several categories and feeds if the outline is a category).
- list (
- $outline_categories,
- $outline_categories_to_feeds,
- ) = $this->loadFromOutline($outline, $parent_category_name);
+ [$outline_categories, $outline_categories_to_feeds] = $this->loadFromOutline($outline, $parent_category_name);
// Then, we merge the initial arrays with the arrays returned by
// the outline.
@@ -367,10 +361,7 @@ class FreshRSS_Import_Service {
$category_name = $parent_category_name;
}
- list (
- $categories_elements,
- $categories_to_feeds,
- ) = $this->loadFromOutlines($outline['@outlines'], $category_name);
+ [$categories_elements, $categories_to_feeds] = $this->loadFromOutlines($outline['@outlines'], $category_name);
unset($outline['@outlines']);
$categories_elements[$category_name] = $outline;