| Total Complexity | 5 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class QueryResult implements QueryResultInterface { |
||
| 16 | /** |
||
| 17 | * @var int |
||
| 18 | */ |
||
| 19 | protected $affectedRows; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var int |
||
| 23 | */ |
||
| 24 | protected $warningsCount; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var int|null |
||
| 28 | */ |
||
| 29 | protected $insertID; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Constructor. |
||
| 33 | * @param int $affectedRows |
||
| 34 | * @param int $warningsCount |
||
| 35 | * @param int|null $insertID |
||
| 36 | */ |
||
| 37 | 6 | function __construct(int $affectedRows, int $warningsCount, ?int $insertID) { |
|
| 41 | 6 | } |
|
| 42 | |||
| 43 | /** |
||
| 44 | * Get the number of affected rows (for UPDATE, DELETE, etc.). |
||
| 45 | * @return int |
||
| 46 | */ |
||
| 47 | 1 | function getAffectedRows(): int { |
|
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Get the number of warnings sent by the server. |
||
| 53 | * @return int |
||
| 54 | */ |
||
| 55 | 1 | function getWarningsCount(): int { |
|
| 56 | 1 | return $this->warningsCount; |
|
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Get the field definitions, if any. `SELECT` statements only. |
||
| 61 | * @return array|null |
||
| 62 | */ |
||
| 63 | 1 | function getFieldDefinitions(): ?array { |
|
| 64 | 1 | return null; |
|
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Get the used insert ID for the row, if any. `INSERT` statements only. |
||
| 69 | * @return int|null |
||
| 70 | */ |
||
| 71 | 1 | function getInsertID(): ?int { |
|
| 73 | } |
||
| 74 | } |
||
| 75 |