Skip to content

Commit

Permalink
[TASK] Local variable $resolvedIds in PlainDataResolver
Browse files Browse the repository at this point in the history
Protected class member $resolvedIds is only used
in get(), so it can be turned into a local variable.

Resolves: #92379
Releases: master, 10.4
Change-Id: I889f1c9ac60b990da15f866603c441aecc16472d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65817
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
lolli42 authored and bmack committed Sep 23, 2020
1 parent 43f6e10 commit 2b7ae8b
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions typo3/sysext/core/Classes/DataHandling/PlainDataResolver.php
Expand Up @@ -67,11 +67,6 @@ class PlainDataResolver
*/
protected $keepMovePlaceholder = true;

/**
* @var int[]
*/
protected $resolvedIds;

/**
* @param string $tableName
* @param int[] $liveIds
Expand Down Expand Up @@ -135,26 +130,22 @@ public function setKeepMovePlaceholder($keepMovePlaceholder)
*/
public function get()
{
if (isset($this->resolvedIds)) {
return $this->resolvedIds;
}

$this->resolvedIds = $this->processVersionOverlays($this->liveIds);
if ($this->resolvedIds !== $this->liveIds) {
$this->resolvedIds = $this->reindex($this->resolvedIds);
$resolvedIds = $this->processVersionOverlays($this->liveIds);
if ($resolvedIds !== $this->liveIds) {
$resolvedIds = $this->reindex($resolvedIds);
}

$tempIds = $this->processSorting($this->resolvedIds);
if ($tempIds !== $this->resolvedIds) {
$this->resolvedIds = $this->reindex($tempIds);
$tempIds = $this->processSorting($resolvedIds);
if ($tempIds !== $resolvedIds) {
$resolvedIds = $this->reindex($tempIds);
}

$tempIds = $this->applyLiveIds($this->resolvedIds);
if ($tempIds !== $this->resolvedIds) {
$this->resolvedIds = $this->reindex($tempIds);
$tempIds = $this->applyLiveIds($resolvedIds);
if ($tempIds !== $resolvedIds) {
$resolvedIds = $this->reindex($tempIds);
}

return $this->resolvedIds;
return $resolvedIds;
}

/**
Expand Down

0 comments on commit 2b7ae8b

Please sign in to comment.