forked from opengento/magento2-gdpr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6306ec7
commit 55fbcba
Showing
45 changed files
with
182 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,31 +7,25 @@ | |
|
||
namespace Opengento\Gdpr\Service\Anonymize\Anonymizer; | ||
|
||
use Magento\Framework\Exception\LocalizedException; | ||
use Magento\Framework\Math\Random; | ||
use Magento\Framework\Phrase; | ||
use Opengento\Gdpr\Service\Anonymize\AnonymizerInterface; | ||
|
||
/** | ||
* Class Email | ||
*/ | ||
final class Email implements AnonymizerInterface | ||
{ | ||
/**#@+ | ||
/** | ||
* Constants for value anonymizer | ||
*/ | ||
private const PHRASE = '%1-anonymous-%[email protected]'; | ||
private const PREFIX_LENGTH = 3; | ||
private const SUFFIX_LENGTH = 2; | ||
/**#@-*/ | ||
|
||
/** | ||
* @var \Magento\Framework\Math\Random | ||
* @var Random | ||
*/ | ||
private $mathRandom; | ||
|
||
/** | ||
* @param \Magento\Framework\Math\Random $mathRandom | ||
*/ | ||
public function __construct( | ||
Random $mathRandom | ||
) { | ||
|
@@ -40,7 +34,7 @@ public function __construct( | |
|
||
/** | ||
* @inheritdoc | ||
* @throws \Magento\Framework\Exception\LocalizedException | ||
* @throws LocalizedException | ||
*/ | ||
public function anonymize($value): string | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.