FixerFileProcessedEvent.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /*
  3. * This file is part of PHP CS Fixer.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. * Dariusz Rumiński <dariusz.ruminski@gmail.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. namespace PhpCsFixer;
  12. use PhpCsFixer\Event\Event;
  13. /**
  14. * Event that is fired when file was processed by Fixer.
  15. *
  16. * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
  17. *
  18. * @internal
  19. */
  20. final class FixerFileProcessedEvent extends Event
  21. {
  22. /**
  23. * Event name.
  24. */
  25. const NAME = 'fixer.file_processed';
  26. const STATUS_UNKNOWN = 0;
  27. const STATUS_INVALID = 1;
  28. const STATUS_SKIPPED = 2;
  29. const STATUS_NO_CHANGES = 3;
  30. const STATUS_FIXED = 4;
  31. const STATUS_EXCEPTION = 5;
  32. const STATUS_LINT = 6;
  33. /**
  34. * @var int
  35. */
  36. private $status;
  37. /**
  38. * @param int $status
  39. */
  40. public function __construct($status)
  41. {
  42. $this->status = $status;
  43. }
  44. /**
  45. * @return int
  46. */
  47. public function getStatus()
  48. {
  49. return $this->status;
  50. }
  51. }