| Conditions | 4 |
| Paths | 5 |
| Total Lines | 23 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public function getArrayList(): ArrayList |
||
| 12 | { |
||
| 13 | $arrayList = new ArrayList(); |
||
| 14 | |||
| 15 | $products = parent::getArrayBasic(); |
||
| 16 | |||
| 17 | foreach ($products as $id => $className) { |
||
| 18 | $productArray = []; |
||
| 19 | |||
| 20 | if (method_exists($className, 'get_data_for_google_shopping_feed')) { |
||
| 21 | $productArray = $className::get_data_for_google_shopping_feed($id); |
||
| 22 | } |
||
| 23 | |||
| 24 | if (! empty($productArray)) { |
||
| 25 | $arrayList->push( |
||
| 26 | ArrayData::create( |
||
| 27 | $productArray |
||
| 28 | ) |
||
| 29 | ); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | return $arrayList; |
||
| 34 | } |
||
| 77 |