@@ 58-71 (lines=14) @@ | ||
55 | ||
56 | // region VALIDATE ******************************************************** |
|
57 | ||
58 | protected function validateJobParams(Job $job) |
|
59 | { |
|
60 | if (empty($job->getSender())) { |
|
61 | throw new ResultException(ResultException::ERROR_PARAM_SENDER); |
|
62 | } |
|
63 | ||
64 | if (empty($job->getRecipient())) { |
|
65 | throw new ResultException(ResultException::ERROR_PARAM_RECIPIENT); |
|
66 | } |
|
67 | ||
68 | if (empty($job->getText())) { |
|
69 | throw new ResultException(ResultException::ERROR_PARAM_TEXT); |
|
70 | } |
|
71 | } |
|
72 | ||
73 | // endregion ************************************************************* |
|
74 |
@@ 90-103 (lines=14) @@ | ||
87 | ||
88 | // region VALIDATE ******************************************************** |
|
89 | ||
90 | protected function validateJobParams(Job $job) |
|
91 | { |
|
92 | if (empty($job->getSender())) { |
|
93 | throw new ResultException(ResultException::ERROR_PARAM_SENDER); |
|
94 | } |
|
95 | ||
96 | if (empty($job->getRecipient())) { |
|
97 | throw new ResultException(ResultException::ERROR_PARAM_RECIPIENT); |
|
98 | } |
|
99 | ||
100 | if (empty($job->getText())) { |
|
101 | throw new ResultException(ResultException::ERROR_PARAM_TEXT); |
|
102 | } |
|
103 | } |
|
104 | ||
105 | // endregion ************************************************************* |
|
106 |