StatusDeterminerInterface.php 601 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Consolidation\AnnotatedCommand\Hooks;
  3. /**
  4. * A StatusDeterminer maps from a result to a status exit code.
  5. *
  6. * @deprecated. Instead of using a Status Determiner hook, commands
  7. * should simply return their exit code and result data separately
  8. * using a CommandResult object.
  9. *
  10. * @see HookManager::addStatusDeterminer()
  11. */
  12. interface StatusDeterminerInterface
  13. {
  14. /**
  15. * Convert a result object into a status code, if
  16. * possible. Return null if the result object is unknown.
  17. *
  18. * @return null|integer
  19. */
  20. public function determineStatusCode($result);
  21. }