NullCommand.php 808 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Payment\Gateway\Command;
  7. use Magento\Payment\Gateway\Command;
  8. use Magento\Payment\Gateway\CommandInterface;
  9. /**
  10. * Null command. Does nothing.
  11. *
  12. * Use this class as an implementation of CommandInterface to ignore some action
  13. * or in case if command invoked by Magento has no sense for payment method.
  14. *
  15. * @api
  16. * @since 100.0.2
  17. */
  18. class NullCommand implements CommandInterface
  19. {
  20. /**
  21. * Process command without any side effect.
  22. *
  23. * @param array $commandSubject
  24. *
  25. * @return null|Command\ResultInterface
  26. * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  27. */
  28. public function execute(array $commandSubject)
  29. {
  30. return null;
  31. }
  32. }