| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 5 | public function __toString(): string |
|
| 26 | { |
||
| 27 | 5 | switch ($this->getTypeCategory()) { |
|
| 28 | 5 | case self::CATEGORY_PK: |
|
| 29 | 1 | $format = '{type}{check}{append}'; |
|
| 30 | 1 | break; |
|
| 31 | 5 | case self::CATEGORY_NUMERIC: |
|
| 32 | 4 | $format = '{type}{length}{unsigned}{notnull}{unique}{check}{default}{append}'; |
|
| 33 | 4 | break; |
|
| 34 | default: |
||
| 35 | 2 | $format = '{type}{length}{notnull}{unique}{check}{default}{append}'; |
|
| 36 | } |
||
| 37 | |||
| 38 | 5 | return $this->buildCompleteString($format); |
|
| 39 | } |
||
| 41 |