Skip to content

Commit 7ffd01c

Browse files
committed
Merge branch 'master' into magento2.4.x
2 parents ce584bb + 949de5b commit 7ffd01c

File tree

20 files changed

+351
-31
lines changed

20 files changed

+351
-31
lines changed

.github/workflows/coding-standard.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: M2 Coding Standard
2+
on: [push, pull_request]
3+
4+
jobs:
5+
static:
6+
name: M2 Coding Standard
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: extdn/github-actions-m2/magento-coding-standard@master

.github/workflows/mess-detector.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: M2 Mess Detector
2+
on: [push, pull_request]
3+
4+
jobs:
5+
phpmd:
6+
name: M2 Mess Detector
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: extdn/github-actions-m2/magento-mess-detector@master

.github/workflows/phpstan.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: M2 PHPStan
2+
on: [push, pull_request, workflow_dispatch]
3+
4+
jobs:
5+
phpstan:
6+
name: M2 PHPStan
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: extdn/github-actions-m2/magento-phpstan@master
11+
with:
12+
composer_name: opengento/module-gdpr

Model/Action/PerformedBy/Guest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ public function get(): string
3636
{
3737
$order = $this->coreRegistry->registry('current_order');
3838

39-
return $order && $order instanceof Order
40-
? $order->getData($this->attributeName)
41-
: '';
39+
return $order && $order instanceof Order ? $order->getData($this->attributeName) : '';
4240
}
4341
}

Model/Entity/EntityIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function iterate(object $entity): void
4747
$values = $this->hydratorPool->getHydrator($this->typeResolver->resolve($entity))->extract($entity);
4848

4949
foreach ($values as $key => $value) {
50-
$this->processor->process($entity, $key, $value);
50+
$this->processor->process($key, $value);
5151
}
5252
}
5353
}

Model/ResourceModel/ActionEntity/Validator.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
use Magento\Framework\Validator\AbstractValidator;
1111
use Magento\Framework\Validator\ValidatorInterface;
12-
use function array_merge_recursive;
1312

1413
final class Validator extends AbstractValidator
1514
{
@@ -26,15 +25,14 @@ public function __construct(
2625

2726
public function isValid($value): bool
2827
{
29-
$isValid = true;
30-
$messages = [];
28+
$this->_clearMessages();
3129

3230
foreach ($this->validators as $validator) {
33-
$isValid = $isValid && $validator->isValid($value);
34-
$messages[] = $validator->getMessages();
31+
if (!$validator->isValid($value)) {
32+
$this->_addMessages($validator->getMessages());
33+
}
3534
}
36-
$this->_addMessages(array_merge_recursive(...$messages));
3735

38-
return $isValid && !$this->hasMessages();
36+
return !$this->hasMessages();
3937
}
4038
}

Model/ResourceModel/ActionEntity/Validator/StateValidator.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,19 @@ public function __construct(
3333
*/
3434
public function isValid($actionEntity): bool
3535
{
36-
if (!in_array($actionEntity->getState(), array_column($this->actionStates->toOptionArray(), 'value'), true)) {
36+
$this->_clearMessages();
37+
$isValid = in_array(
38+
$actionEntity->getState(),
39+
array_column($this->actionStates->toOptionArray(), 'value'),
40+
true
41+
);
42+
43+
if (!$isValid) {
3744
$this->_addMessages([
3845
'state' => new Phrase('State "%1" does not exists.', [$actionEntity->getState()])
3946
]);
40-
41-
return false;
4247
}
4348

44-
return true;
49+
return $isValid;
4550
}
4651
}

README.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,26 @@ the idle time for the users before they are erase, and the sales information lif
7171

7272
Details:
7373

74-
- [ ] Erasure: delete or anonymize specific data thanks to configurable settings in admin ui.
75-
- [ ] Configure which order can be erased, regarding their state and life time.
76-
- [ ] Privacy data will be automatically erased after a delay.
77-
- [ ] Sales data are safely keeped till the preservation delay expired.
78-
- [ ] Choose the file name and the format of your choice for the privacy data export.
79-
- [ ] Choose which data is interpreted as privacy data and will be exported.
80-
- [ ] Actions related to the GDPR compliance are reported in the admin ui.
81-
- [ ] Merchants can execute and keep an eye on the performed actions from the admin ui.
82-
- [ ] Choose the CMS static block to show on the storefront by scope and features.
83-
- [ ] Enable or disable features for the storefront.
84-
- [ ] Notify the user when a GDPR action is performed, configure the template and sending settings.
85-
- [ ] Display the cookie disclosure pop-in and edit its content as you want.
74+
- [x] Erasure: delete or anonymize specific data thanks to configurable settings in admin ui.
75+
- [x] Configure which order can be erased, regarding their state and life time.
76+
- [x] Privacy data will be automatically erased after a delay.
77+
- [x] Sales data are safely keeped till the preservation delay expired.
78+
- [x] Choose the file name and the format of your choice for the privacy data export.
79+
- [x] Choose which data is interpreted as privacy data and will be exported.
80+
- [x] Actions related to the GDPR compliance are reported in the admin ui.
81+
- [x] Merchants can execute and keep an eye on the performed actions from the admin ui.
82+
- [x] Choose the CMS static block to show on the storefront by scope and features.
83+
- [x] Enable or disable features for the storefront.
84+
- [x] Notify the user when a GDPR action is performed, configure the template and sending settings.
85+
- [x] Display the cookie disclosure pop-in and edit its content as you want.
86+
87+
Languages:
88+
89+
- [x] en_US ; English
90+
- [x] de_DE ; German
91+
- [x] fr_FR ; French (partial)
92+
- [ ] nl_NL ; Dutch (partial)
93+
- [ ] it_IT ; Italian (partial)
8694

8795
## Settings
8896

0 commit comments

Comments
 (0)