Issues (3641)

Business/Executor/CustomerPluginExecutor.php (2 issues)

1
<?php
2
3
/**
4
 * Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace Spryker\Zed\Customer\Business\Executor;
9
10
use Generated\Shared\Transfer\CustomerTransfer;
11
12
class CustomerPluginExecutor implements CustomerPluginExecutorInterface
13
{
14
    /**
15
     * @var list<\Spryker\Zed\CustomerExtension\Dependency\Plugin\PostCustomerRegistrationPluginInterface>
16
     */
17
    protected array $postCustomerRegistrationPlugins;
18
19
    /**
20
     * @var list<\Spryker\Zed\CustomerExtension\Dependency\Plugin\CustomerPostDeletePluginInterface>
21
     */
22
    protected array $customerPostDeletePlugins;
23
24
    /**
25
     * @param list<\Spryker\Zed\CustomerExtension\Dependency\Plugin\PostCustomerRegistrationPluginInterface> $postCustomerRegistrationPlugins
26
     * @param list<\Spryker\Zed\CustomerExtension\Dependency\Plugin\CustomerPostDeletePluginInterface> $customerPostDeletePlugins
27
     */
28
    public function __construct(
29
        array $postCustomerRegistrationPlugins = [],
30
        array $customerPostDeletePlugins = []
31
    ) {
32
        $this->postCustomerRegistrationPlugins = $postCustomerRegistrationPlugins;
0 ignored issues
show
Documentation Bug introduced by
It seems like $postCustomerRegistrationPlugins of type array is incompatible with the declared type Spryker\Zed\Customer\Business\Executor\list of property $postCustomerRegistrationPlugins.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
33
        $this->customerPostDeletePlugins = $customerPostDeletePlugins;
0 ignored issues
show
Documentation Bug introduced by
It seems like $customerPostDeletePlugins of type array is incompatible with the declared type Spryker\Zed\Customer\Business\Executor\list of property $customerPostDeletePlugins.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
34
    }
35
36
    /**
37
     * @param \Generated\Shared\Transfer\CustomerTransfer $customerTransfer
38
     *
39
     * @return void
40
     */
41
    public function executePostCustomerRegistrationPlugins(CustomerTransfer $customerTransfer): void
42
    {
43
        foreach ($this->postCustomerRegistrationPlugins as $postCustomerRegistrationPlugin) {
44
            $postCustomerRegistrationPlugin->execute($customerTransfer);
45
        }
46
    }
47
48
    /**
49
     * @param \Generated\Shared\Transfer\CustomerTransfer $customerTransfer
50
     *
51
     * @return void
52
     */
53
    public function executeCustomerPostDeletePlugins(CustomerTransfer $customerTransfer): void
54
    {
55
        foreach ($this->customerPostDeletePlugins as $customerPostDeletePlugin) {
56
            $customerPostDeletePlugin->execute($customerTransfer);
57
        }
58
    }
59
}
60