Conditions | 4 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
28 | 248 | public function validate(): void |
|
29 | { |
||
30 | 248 | if ($this->property->isAi()) { |
|
31 | 19 | if (!$this->property->isPk()) { |
|
32 | 1 | throw new InvalidSchemaAttributeException('Autoincrement must be Primary Key too.'); |
|
33 | } |
||
34 | |||
35 | 18 | if (!$this->isInt($this->property)) { |
|
36 | 1 | throw new InvalidSchemaAttributeException('Autoincrement must be numeric.'); |
|
37 | } |
||
41 |