Skip to content

Commit

Permalink
Remove deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 committed Aug 26, 2024
1 parent 9ec6596 commit 02c211b
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 23 deletions.
5 changes: 1 addition & 4 deletions Model/Erase/EraseSalesInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\Exception\CouldNotSaveException;
use Magento\Framework\Stdlib\DateTime;
use Magento\Store\Model\ScopeInterface;
use Opengento\Gdpr\Api\Data\EraseEntityInterface;
use Opengento\Gdpr\Api\Data\EraseEntityInterfaceFactory;
use Opengento\Gdpr\Api\EraseEntityRepositoryInterface;
Expand All @@ -30,7 +29,6 @@ public function __construct(
) {}

/**
* @inheritdoc
* @throws CouldNotSaveException
*/
public function scheduleEraseEntity(int $entityId, string $entityType, DateTimeInterface $lastActive): EraseEntityInterface
Expand All @@ -52,7 +50,6 @@ public function scheduleEraseEntity(int $entityId, string $entityType, DateTimeI
}

/**
* @inheritdoc
* @throws Exception
*/
public function isAlive(DateTimeInterface $lastActive): bool
Expand All @@ -62,6 +59,6 @@ public function isAlive(DateTimeInterface $lastActive): bool

private function resolveErasureSalesMaxAge(): int
{
return (int)$this->scopeConfig->getValue(self::CONFIG_PATH_ERASURE_SALES_MAX_AGE, ScopeInterface::SCOPE_STORE);//Todo scope website
return (int)$this->scopeConfig->getValue(self::CONFIG_PATH_ERASURE_SALES_MAX_AGE);
}
}
2 changes: 1 addition & 1 deletion etc/adminhtml/system/erasure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</depends>
<config_path>gdpr/erasure/entity_max_age_schedule</config_path>
</field>
<field id="sales_max_age" type="text" translate="label comment" showInDefault="1" showInWebsite="1" showInStore="0" sortOrder="70" canRestore="1">
<field id="sales_max_age" type="text" translate="label comment" showInDefault="1" showInWebsite="0" showInStore="0" sortOrder="70" canRestore="1">
<label>Sales Information Lifetime</label>
<comment>The time is in days.</comment>
<validate>validate-number validate-number-range number-range-0-3650</validate>
Expand Down
2 changes: 0 additions & 2 deletions view/frontend/templates/account/erase.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use Opengento\Gdpr\ViewModel\Customer\Privacy\SettingsDataProvider;

/** @var Template $block */
/** @var Escaper $escaper */
$escaper = $escaper ?? $block;

/** @var SettingsDataProvider $settingsDataProvider */
$settingsDataProvider = $block->getData('settingsDataProvider');
?>
Expand Down
2 changes: 0 additions & 2 deletions view/frontend/templates/account/privacy/erase.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ use Opengento\Gdpr\ViewModel\Customer\Privacy\EraseDataProvider;

/** @var Template $block */
/** @var Escaper $escaper */
$escaper = $escaper ?? $block;

/** @var EraseDataProvider $eraseDataProvider */
$eraseDataProvider = $block->getData('eraseDataProvider');
/** @var EraseCustomerDataProvider $eraseCustomerDataProvider */
Expand Down
2 changes: 0 additions & 2 deletions view/frontend/templates/account/privacy/export.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ use Opengento\Gdpr\ViewModel\Customer\Privacy\ExportDataProvider;

/** @var Template $block */
/** @var Escaper $escaper */
$escaper = $escaper ?? $block;

/** @var ExportDataProvider $exportDataProvider */
$exportDataProvider = $block->getData('exportDataProvider');
/** @var ExportCustomerDataProvider $exportCustomerDataProvider */
Expand Down
2 changes: 0 additions & 2 deletions view/frontend/templates/account/settings.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use Opengento\Gdpr\ViewModel\Customer\Privacy\SettingsDataProvider;

/** @var Template $block */
/** @var Escaper $escaper */
$escaper = $escaper ?? $block;

/** @var SettingsDataProvider $settingsDataProvider */
$settingsDataProvider = $block->getData('settingsDataProvider');
?>
Expand Down
2 changes: 0 additions & 2 deletions view/frontend/templates/order/info/buttons/download.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use Opengento\Gdpr\ViewModel\Customer\Guest\ExportDataProvider;

/** @var Template $block */
/** @var Escaper $escaper */
$escaper = $escaper ?? $block;

/** @var ExportDataProvider $exportDataProvider */
$exportDataProvider = $block->getData('exportDataProvider');
?>
Expand Down
2 changes: 0 additions & 2 deletions view/frontend/templates/order/info/buttons/erase.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use Opengento\Gdpr\ViewModel\Customer\Guest\EraseDataProvider;

/** @var Template $block */
/** @var Escaper $escaper */
$escaper = $escaper ?? $block;

/** @var EraseDataProvider $eraseDataProvider */
$eraseDataProvider = $block->getData('eraseDataProvider');
?>
Expand Down
2 changes: 0 additions & 2 deletions view/frontend/templates/order/info/buttons/export.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use Opengento\Gdpr\ViewModel\Customer\Guest\ExportDataProvider;

/** @var Template $block */
/** @var Escaper $escaper */
$escaper = $escaper ?? $block;

/** @var ExportDataProvider $exportDataProvider */
$exportDataProvider = $block->getData('exportDataProvider');
?>
Expand Down
2 changes: 0 additions & 2 deletions view/frontend/templates/order/info/erase.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use Opengento\Gdpr\ViewModel\Customer\Privacy\EraseDataProvider;

/** @var Template $block */
/** @var Escaper $escaper */
$escaper = $escaper ?? $block;

/** @var EraseDataProvider $eraseDataProvider */
$eraseDataProvider = $block->getData('eraseDataProvider');
?>
Expand Down
2 changes: 0 additions & 2 deletions view/frontend/templates/order/info/export.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use Opengento\Gdpr\ViewModel\Customer\Privacy\ExportDataProvider;

/** @var Template $block */
/** @var Escaper $escaper */
$escaper = $escaper ?? $block;

/** @var ExportDataProvider $exportDataProvider */
$exportDataProvider = $block->getData('exportDataProvider');
?>
Expand Down

0 comments on commit 02c211b

Please sign in to comment.