| Conditions | 5 |
| Paths | 5 |
| Total Lines | 12 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | public function getMetaBoxByModel(string $model, int $modelId, string $lang = 'en'): ?Model |
||
| 40 | { |
||
| 41 | if ($model === 'post') { |
||
| 42 | return $this->metaBoxService->getPostMetaBox($modelId, $lang); |
||
| 43 | } elseif ($model === 'page') { |
||
| 44 | return $this->metaBoxService->getPageMetaBox($modelId, $lang); |
||
| 45 | } elseif ($model === 'category') { |
||
| 46 | return $this->metaBoxService->getCategoryMetaBox($modelId, $lang); |
||
| 47 | } elseif ($model === 'tag') { |
||
| 48 | return $this->metaBoxService->getTagMetaBox($modelId, $lang); |
||
| 49 | } else { |
||
| 50 | return null; |
||
| 51 | } |
||
| 54 |