| Total Complexity | 3 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | trait CompilesMySqlExpressions |
||
| 8 | { |
||
| 9 | use CompilesExpressions; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Compile the cycle detection. |
||
| 13 | * |
||
| 14 | * @param \Illuminate\Database\Query\Builder $query |
||
| 15 | * @param array $expression |
||
| 16 | * @return string |
||
| 17 | */ |
||
| 18 | 40 | public function compileCycle(Builder $query, array $expression) |
|
|
|
|||
| 19 | { |
||
| 20 | 40 | if (!$expression['cycle']) { |
|
| 21 | 38 | return ''; |
|
| 22 | } |
||
| 23 | |||
| 24 | 2 | $columns = $this->columnize($expression['cycle']['columns']); |
|
| 25 | |||
| 26 | 2 | return " cycle $columns restrict"; |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Compile an insert statement using a subquery into SQL. |
||
| 31 | * |
||
| 32 | * @param \Illuminate\Database\Query\Builder $query |
||
| 33 | * @param array $columns |
||
| 34 | * @param string $sql |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | 4 | public function compileInsertUsing(Builder $query, array $columns, string $sql) |
|
| 42 | } |
||
| 43 | } |
||
| 44 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.