| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 8 | protected function indentationMode(string $line): int |
|
| 18 | { |
||
| 19 | 8 | $mode = 0; |
|
| 20 | |||
| 21 | 8 | $line = trim($line); |
|
| 22 | |||
| 23 | 8 | if (str_starts_with($line, 'alter table') && !str_ends_with($line, ';')) |
|
| 24 | { |
||
| 25 | 5 | $mode |= self::C_INDENT_INCREMENT_AFTER; |
|
| 26 | } |
||
| 27 | |||
| 28 | 8 | if (str_starts_with($line, ';')) |
|
| 29 | { |
||
| 30 | 5 | $mode |= self::C_INDENT_DECREMENT_BEFORE; |
|
| 31 | } |
||
| 32 | |||
| 33 | 8 | return $mode; |
|
| 34 | } |
||
| 40 |