| @@ 34-45 (lines=12) @@ | ||
| 31 | /** |
|
| 32 | * @return bool |
|
| 33 | */ |
|
| 34 | public function AllQuestionsAnswered() |
|
| 35 | { |
|
| 36 | if ($answers = $this->owner->ProductQuestionsAnswers()) { |
|
| 37 | foreach ($answers as $productQuestion) { |
|
| 38 | if (!$productQuestion->Answer) { |
|
| 39 | return false; |
|
| 40 | } |
|
| 41 | } |
|
| 42 | } |
|
| 43 | ||
| 44 | return true; |
|
| 45 | } |
|
| 46 | ||
| 47 | /** |
|
| 48 | * @return bool |
|
| @@ 50-63 (lines=14) @@ | ||
| 47 | /** |
|
| 48 | * @return bool |
|
| 49 | */ |
|
| 50 | public function AllRequiredQuestionsAnswered() |
|
| 51 | { |
|
| 52 | if ($answers = $this->owner->ProductQuestionsAnswers()) { |
|
| 53 | foreach ($answers as $productQuestion) { |
|
| 54 | if ($productQuestion->AnswerRequired) { |
|
| 55 | if (!$productQuestion->Answer) { |
|
| 56 | return false; |
|
| 57 | } |
|
| 58 | } |
|
| 59 | } |
|
| 60 | } |
|
| 61 | ||
| 62 | return true; |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * casted variable. |
|