| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 1 | public function calculate(Request $request) |
|
| 18 | { |
||
| 19 | 1 | return $this->count($request, FormEntry::class, 'content_type') |
|
| 20 | 1 | ->label(function ($contentType) { |
|
| 21 | 1 | $class = \FormEntries\Forms\FormContent::getClassByType($contentType); |
|
| 22 | 1 | if ($class) { |
|
| 23 | 1 | return (new $class(FormEntry::query()->content($contentType)->first()))->formName(); |
|
| 24 | } |
||
| 25 | |||
| 26 | return '-'; |
||
| 27 | 1 | }); |
|
| 50 |