| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function isProductAssociated(string $associationName, string $productName): bool |
||
| 22 | { |
||
| 23 | /** @var NodeElement $associations */ |
||
| 24 | $associations = $this->getElement('associations'); |
||
| 25 | |||
| 26 | /** @var NodeElement $product */ |
||
| 27 | foreach ($this->getAssociatedProducts($associations, $associationName) as $product) { |
||
| 28 | if ($product->getText() === $productName) { |
||
| 29 | return true; |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | return false; |
||
| 34 | } |
||
| 35 | |||
| 51 |