| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function generateTableAlias(string|Expression $table, string $postfix = 'Doc'): string |
||
| 11 | { |
||
| 12 | if (Str::startsWith($table, 'laravel_')) { |
||
|
|
|||
| 13 | return $table; |
||
| 14 | } |
||
| 15 | |||
| 16 | if ($table instanceof Expression) { |
||
| 17 | return 'laravel_expression_' . spl_object_id($table); |
||
| 18 | } |
||
| 19 | |||
| 20 | return Str::camel(Str::singular($table)) . $postfix; |
||
| 21 | } |
||
| 22 | } |