| Conditions | 2 |
| Paths | 2 |
| Total Lines | 6 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 27 | public static function getByTable(string $table): AbstractStrategy |
|
| 32 | { |
||
| 33 | 27 | $isPageRelated = in_array($table, ['tt_content', 'pages']); |
|
| 34 | 27 | return $isPageRelated |
|
| 35 | 23 | ? GeneralUtility::makeInstance(PageStrategy::class) |
|
| 36 | 27 | : GeneralUtility::makeInstance(RecordStrategy::class); |
|
| 37 | } |
||
| 39 |