<?php

/*
 * This file is part of the Sylius package.
 *
 * (c) Paweł Jędrzejewski
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sylius\Component\Promotion\Action;

use Sylius\Component\Promotion\Model\PromotionInterface;
use Sylius\Component\Promotion\Model\PromotionSubjectInterface;

/**
 * @author Saša Stamenković <umpirsky@gmail.com>
 */
interface PromotionActionCommandInterface
{
    /**
     * @param PromotionSubjectInterface $subject
     * @param array                     $configuration
     * @param PromotionInterface        $promotion
     *
     * @return mixed
     */
    public function execute(PromotionSubjectInterface $subject, array $configuration, PromotionInterface $promotion);

    /**
     * @param PromotionSubjectInterface $subject
     * @param array                     $configuration
     * @param PromotionInterface        $promotion
     *
     * @return mixed
     */
    public function revert(PromotionSubjectInterface $subject, array $configuration, PromotionInterface $promotion);

    /**
     * @return string
     */
    public function getConfigurationFormType();
}

<?php

/*
 * This file is part of the Sylius package.
 *
 * (c) Paweł Jędrzejewski
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sylius\Component\Promotion\Action;

use Sylius\Component\Promotion\Model\PromotionInterface;
use Sylius\Component\Promotion\Model\PromotionSubjectInterface;

/**
 * @author Saša Stamenković <umpirsky@gmail.com>
 */
interface PromotionActionCommandInterface
{
    /**
     * @param PromotionSubjectInterface $subject
     * @param array $configuration
     * @param PromotionInterface $promotion
     *
     * @return bool
     */
    public function execute(PromotionSubjectInterface $subject, array $configuration, PromotionInterface $promotion);

    /**
     * @param PromotionSubjectInterface $subject
     * @param array $configuration
     * @param PromotionInterface $promotion
     *
     * @return mixed
     */
    public function revert(PromotionSubjectInterface $subject, array $configuration, PromotionInterface $promotion);

    /**
     * @return string
     */
    public function getConfigurationFormType();
}

Return application result in promotion action command
[Core][Promotion] Return application result in promotion action command
