Issues (3641)

Event/Listener/AssetStorageUnpublishListener.php (1 issue)

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\AssetStorage\Communication\Plugin\Event\Listener;
9
10
use Spryker\Shared\Kernel\Transfer\TransferInterface;
11
use Spryker\Zed\Event\Dependency\Plugin\EventHandlerInterface;
12
use Spryker\Zed\Kernel\Communication\AbstractPlugin;
13
14
/**
15
 * @deprecated Use {@link \Spryker\Zed\AssetStorage\Communication\Plugin\Publisher\Asset\AssetDeletePublisherPlugin} instead.
16
 *
17
 * @method \Spryker\Zed\AssetStorage\Business\AssetStorageFacadeInterface getFacade()
18
 * @method \Spryker\Zed\AssetStorage\AssetStorageConfig getConfig()
19
 * @method \Spryker\Zed\AssetStorage\Communication\AssetStorageCommunicationFactory getFactory()
20
 */
21
class AssetStorageUnpublishListener extends AbstractPlugin implements EventHandlerInterface
22
{
23
    /**
24
     * @param \Generated\Shared\Transfer\EventEntityTransfer $eventEntityTransfer
25
     * @param string $eventName
26
     *
27
     * @return void
28
     */
29
    public function handle(TransferInterface $eventEntityTransfer, $eventName)
30
    {
31
        $this->getFacade()->unpublish($eventEntityTransfer->getId());
0 ignored issues
show
The method getId() does not exist on Spryker\Shared\Kernel\Transfer\TransferInterface. It seems like you code against a sub-type of Spryker\Shared\Kernel\Transfer\TransferInterface such as SprykerTest\Zed\PriceCar...Fixture\CartItemFixture. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

31
        $this->getFacade()->unpublish($eventEntityTransfer->/** @scrutinizer ignore-call */ getId());
Loading history...
32
    }
33
}
34