Result.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. /**
  3. * @copyright Vertex. All rights reserved. https://www.vertexinc.com/
  4. * @author Mediotype https://www.mediotype.com/
  5. */
  6. namespace Vertex\Tax\Model\ConfigurationValidator;
  7. use Vertex\Tax\Model\ConfigurationValidator;
  8. /**
  9. * Contains the result of a Credential Check
  10. *
  11. * @see ConfigurationValidator
  12. */
  13. class Result
  14. {
  15. /** @var boolean */
  16. private $valid;
  17. /** @var string */
  18. private $message;
  19. /** @var array */
  20. private $arguments = [];
  21. /**
  22. * Get whether or not the credential check was valid
  23. *
  24. * @return bool
  25. */
  26. public function isValid()
  27. {
  28. return $this->valid;
  29. }
  30. /**
  31. * Set whether or not the credential check was valid
  32. *
  33. * @param bool $valid
  34. * @return Result
  35. */
  36. public function setValid($valid)
  37. {
  38. $this->valid = $valid;
  39. return $this;
  40. }
  41. /**
  42. * Get the message associated with an invalid credential check
  43. *
  44. * @return string
  45. */
  46. public function getMessage()
  47. {
  48. return $this->message;
  49. }
  50. /**
  51. * Set the message associated with an invalid credential check
  52. *
  53. * @param string $message
  54. * @return Result
  55. */
  56. public function setMessage($message)
  57. {
  58. $this->message = $message;
  59. return $this;
  60. }
  61. /**
  62. * Get arguments for the message when ran through the localization layer
  63. *
  64. * @return array
  65. */
  66. public function getArguments()
  67. {
  68. return $this->arguments;
  69. }
  70. /**
  71. * Set arguments for the message when ran through the localization layer
  72. *
  73. * @param array $arguments
  74. * @return Result
  75. */
  76. public function setArguments($arguments)
  77. {
  78. $this->arguments = $arguments;
  79. return $this;
  80. }
  81. }